We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose License is not loading from jar

We have enterprise license for Aspose Word and this license file is placed in resources folder
Below code part of static block is used to load license file
License lic = new License();

Our process is triggered from main file and it is working fine when this main class executed from eclipse but when fat jar is built using maven shade plugin, Aspose.Words.Java.lic file in resources folder is replaced with “Aspose.License.BlackList.Real.xml” file and license is not loaded with above code.

When I changed code to below file is loaded into stream but it fail to validate the license as file does not have license information and give NPE
so i updated the content of Aspose.License.BlackList.Real.xml file with Aspose.Words.Java.lic content within jar and run the process and it is working.

Can someone explain why lic file is changed to “Aspose.License.BlackList.Real.xml” while creating fat jar


Please list complete steps that we can follow to reproduce the exact same issue on our end. Please also provide sample Java application (source code without compilation errors) here for testing. We will then investigate the scenario on our end and provide you more information. Thanks for your cooperation.