Code works locally, errors on second pass in production environment

This code works locally run multiple times. In our production environment, it works once and then throws a null pointer exception

at com.aspose.font.FontEnvironment.lif(Unknown Source)
at com.aspose.font.I644.lif(Unknown Source)
at Source)
at com.squish.uploader.ConvertFont.(

FileSystemStreamSource fsss = new FileSystemStreamSource(fontFile.getPath());
FontDefinition fd = new FontDefinition(FontType.TTF, new FontFileDefinition(“ttf”, fsss));
Font font =, fsss);

I have confirmed that nothing is null.

No form of loading a font works more than one time without restarting the webserver.

All versions of jdk1.8*
Have tried several versions of Java, both native and open, currently running amazon-corretto-8.332.08.1 (the same Java version works correctly locally).


Is it happening with a specific font file or with any font file? Would you please make sure to use the latest version of the API and if the issue still persists, please let us know.

Yes, it’s any font file and yet we are using the most current version of the API 21.12.

Once is called in the running webserver instance it returns a NPE for all subsequent calls. I have tested on multiple webservers running multiple versions of Java with the same results.


We are checking it and will get back to you shortly.


An investigation ticket as FONTJAVA-29 has been logged in our issue management system to further analyze this case. We will look into its details and keep you posted with the status of its rectification. Please be patient and spare us some time.

We are sorry for the inconvenience.

Hello, I’m checking in on this support ticket.

This issue has prevented us from utilizing the license that we purchased.

Thank you,

-Bill Ensley


We are afraid that the earlier logged ticket has not been yet resolved. However, we have recorded your concerns and will surely inform you once we have some updates about resolution of the ticket. Please spare us some time.

We are sorry for the inconvenience.

Any update on this?

I am also facing the same issue.

I am trying aspose font for creating fonts in tomcat. I am facing this issue when a font is created the second time.

First time works, and if i run it in loop works fine. Running in multi thread or in tomcat throws the below exception.

Any help would be great.

com.aspose.font.FontEnvironment.lif(Unknown Source) Source) Source) Source)


The issue has been updated as per the concerns you have shared. We will surely investigate the ticket FONTJAVA-29 from this perspective and let you know as soon as it is resolved. Please be patient and spare us some time.

We are sorry for the inconvenience.

Sorry Dragonriders, I’ve been waiting almost 6 months for a solution and nothing has been done. My next step is to try and bundle my package up and run it as a Lambda in AWS as those are short lived and spawn a new engine that should short circuit this error. I’ve run all the same test you have, I can run it locally until I’m blue in the face but once it runs in a web container like Tomcat, something gets stuck.


We humbly apologize for the delay and the inconvenience you have been facing due to this error. Your concerns have already been recorded and the ticket is escalated to the next level of the priority. We will surely inform you as soon as it is resolved. We again apologize for the inconvenience.

It’s been over a year now and this error has still not been resolved. At this point this software is clearly not a viable product.


We really regret that the earlier logged ticket could not get resolved due to other maintenance tasks in the queue. We have already raised the issue priority and are reviving it again after recording your concerns. Please accept our humble apology. We will let you know once we have some updates about ticket resolution.

Still waiting with no response or timeframe. Several thousand dollars down the drain for broken software. Not a good look Aspose.


Please accept our humble apology for the inconvenience and delay you have been facing. We realize the significance of the issue and we have already raised its priority. There are other issues and enhancements as well that are in pipeline and we have been working on it in order to get this ticket resolved. Nevertheless, we have recorded your concerns already and will be working on getting a reliable ETA for you now. We will soon share some updates about ticket resolution.

We again apologize for the inconvenience caused.