Free Support Forum -

com.aspose.cells.CellsException: Cannot find black listed licenses resource or black list is invalid. Please report this error to Aspose

I am not able to set the license for aspose cells on web application, we have temporary license for non-commercial use only, below is the code which is used to set the license
License license = new License();

INPUT_STREAM_OF_THE_LIC is not null and it is initialized with the correct input-stream of the license file. When we set the license locally i.e. on standalone JVM it works fine, but we get below error when we deploy on web application.

Caused by: com.aspose.cells.CellsException: Cannot find black listed licenses resource or black list is invalid. Please report this error to Aspose.
at com.aspose.cells.License.b(Unknown Source)
at com.aspose.cells.License.d(Unknown Source)
at com.aspose.cells.License.a(Unknown Source)
at com.aspose.cells.License.setLicense(Unknown Source)
at com.agentrics.ezmarket.commons.excel.impl.aspose.AsposeAPI.(
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
at java.lang.reflect.Constructor.newInstance(
at org.springframework.beans.BeanUtils.instantiateClass(
… 180 more
Caused by: java.lang.NullPointerException
… 190 more

When I debugged the byte code of the “com.aspose.cells.License” it seems that we have problem locating to the resource file named “Aspose.License.BlackList.xml”.

The same issue was reported for aspose powerpoint in the forum Cannot find black listed and it seems you guys have fixed the issue of the resource loading for the black list, but don’t know how it still getting the exception.
Could you please tell me if I need to do something else for the web application deployment or is it a issue. and the web application we are using is “jboss-4.2.1.GA” and soon well be migrating to “jboss-6.1.0.Final”.

Mahesh Pujari


Can you please try this?

Make some folder on some drive say: c:\myfolder

Place license file there and then modify your code like this

Note: Suppose your license file name is Aspose.Total.lic so the full path to your license will be c:\myfolder\Aspose.Total.lic



License license = new License();

If you still could not resolve it then let me know.

I made the changes told by you and I end up with the same exception. As a note I think its the resource loading issue (ClassLoader) for Aspose, where in the method “b” of License class, it tries to load the resource named “Aspose.License.BlackList.xml” and can’t find it, when we run locally i.e. from standalone JVM its not a problem, the exception comes only when we deploy our web application and we try to set the license as stream or as file name.

Mahesh Pujari


We have tested a simple web application with jboss-6.1.0.Final and cannot find the issue. Our code looks like following:

License lic = new License();


Workbook wb = new Workbook();“res.xls”);
And it works fine. Would you please try the jboss-6.1.0.Final to check whether it can work? If you have the same issue, please create a simple web application that we can deploy it to jboss server directly to reproduce the issue. We will test and check it soon.