Free Support Forum -

NullPointerException in setLicense in multiple threads


We’re experiencing an intermittent problem with setLicense that only seems to affect our Aspose Slides deployment and only when it’s deployed in two separate web applications in Jetty. setLicense is called on every request (I’m aware that this is unnecessary, and I’ll change it) from a license file loaded into a FileInputStream, and it’ll work for a time (hours/days/weeks) before eventually starting to raise NullPointExceptions. Once it errors, it never recovers until the webserver is restarted.

There’s a hint in an earlier forum post that there might be some threading problems in the static license code. As I said, I can stop the server continually setting the license, but because of our configuration we’ll probably end up making periodic calls to setLicense when server threads are destroyed and recreated, so it would be good to know if there’s anything that can be fixed.

Thanks, and let me know if anything’s unclear.


Hi Steve,

I have observed the issue shared and you have shared that the license calls issue is random and happening some time and restarting the web server resolves the issue. I still feel it is some threading issue that one of your thread is setting the call to null. However, I have added an issue with ID 26433 as an investigation in our issue tracking system. Our development team will investigate the issue and will share their further response. I will share the further information with you as soon as some information is shared by them.

Thanks and Regards,

Hello Steve,

I have discussed the issue with our development team and they need the source project code that has been deployed for the testing and reproducing issue on our end. Please share details about your environment and web server as well.

Thanks and Regards,

Hi Mudassir,

Sorry - I didn’t get an email notification about your reply (or I missed it). Were your development team able to get anywhere with it? Sending a reproduction case is difficult because it seems to be a timing issue and I can’t send you the source code for the project. The code is running through Jython (Java-interpreted Python) in a jetty webserver. Sometimes it’ll run for a long time without needing any intervention, and sometimes the problem happens straight after the webserver starts.

It’s happening on two servers we deploy Aspose Slides on, but none of the ones we have running Cells or Words.

Hello Steve,

We need some test project code and environment details to proceed further in resolving the issue as our development team will work in this direction. I regret to share that without available of related material it is hard to resolve the issue. We really wish to resolve your issue but request your cooperation in this regard.

Thanks and Regards,