Free Support Forum - aspose.com

Setting license throws exceptions

Good day

I got an evaluation license, I’m playing around with Aspose.Tasks in Java. Unfortunately I cannot get the class to accept the license as the setLicense method throws exception:

“Document element did not appear. Line 1, position 1.”

I have tried passing the license as a text string, and I have tried passing it via a FileInputStream, same exception result.

Any suggestions to get the com.aspose.tasks.License class to accept the license?

@ffsca4

It is requested to please share your license file and the sample code. You may share license file in private by clicking on ‘Message’ button after clicking on my name.

Moreover, please have a look at the article link given below explaining how to set up licence using Aspose.Tasks for Java.
https://docs.aspose.com/display/tasksjava/Licensing

Apologies. My debugging skills let me down.

It seems there was some trouble with the MPP file I was using. I supplied another and my test program ran through smoothly.

I thought the exception was thrown by setLicense, but upon (many) further tries, it seems now creating a new project from MPP file is the culprit. I’m working with Office 2016, that might be an issue. The file that works is one I saved in Office 2016, but using Save As ->> MS Project 2007 format.

For now my issue is resolved, thanks.

@ffsca4

Thank you for your feedback. You are always welcome and please feel free to write us if you have any query in future.