Getting some license related error

Getting below error :

Error injecting constructor, class com.aspose.psd.coreexceptions.FrameworkException: Failed to set license.
Details: String index out of range: -1
com.aspose.psd.License.setLicense(Unknown Source)

I have set the license like this →

val license = new License()

@Lakshay_Gupta could you please provide the licenses file that is used. Please also specify the version of Aspose.PSD for Java you use.
Please also check the following article: Licensing|Documentation
Maybe using stream can work for you

 com.aspose.psd.License license = new com.aspose.psd.License();


Also, please check if the paths to the license is valid.

Thank you @Dmitriy.Sorokin, the issue is resolved for me now.

1 Like