Error in startup

Hello,

I get this error in start-up, please note that I have a working license and the issue only happened with images.Please advise

com.aspose.imaging.coreexceptions.FrameworkException: Invalid license signature. Please make sure the license file was not modified.
at com.aspose.imaging.License$a.a(Unknown Source) ~[aspose-imaging-23.11-jdk16.jar:23.11]
at com.aspose.imaging.License.setLicense(Unknown Source) ~[aspose-imaging-23.11-jdk16.jar:23.11]

Hi, @aabuhijleh
Thank you for using Aspose.Imaging.
Could you provide your code?
Which method do you use - License.setLicense(String) or License.setLicense(InputStream) ?
If the second one, please be sure that the position of the InputStream is at the start of it.

I used the below code for all Aspsoe Jars but I get the error only with images, please advise

public void setImagingLicense() throws Exception {
	Objects.requireNonNull(license, ERROR_LICENSE_IS_NULL);
	
	com.aspose.imaging.License imagingLicense = new com.aspose.imaging.License();

	try (ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(license);) {
		imagingLicense.setLicense(byteArrayInputStream);
	}
}

@aabuhijleh
Thank you for the details. Please, let me try it on my side.

Hi, @aabuhijleh.
I have tested the code

byte[] license = Files.readAllBytes(Paths.get("Aspose.Imaging.Java.lic"));

com.aspose.imaging.License imagingLicense = new com.aspose.imaging.License();
try (ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(license)) {
	imagingLicense.setLicense(byteArrayInputStream);
}

And it works fine with a correct license.
Please, make sure that the variable license in your code contains correct data. For example, compare the length of the array license.length with the length of your license file.
Please, notify me about your results.

Hello,

today I get the below error

java.lang.NullPointerException: null
at com.aspose.diagram.l0.f(Unknown Source) ~[aspose-diagram-23.10.jar:23.10.0.0]
at com.aspose.diagram.l0.a(Unknown Source) ~[aspose-diagram-23.10.jar:23.10.0.0]
at com.aspose.diagram.License.setLicense(Unknown Source) ~[aspose-diagram-23.10.jar:23.10.0.0]

Can you please check and advise?

Thanks

@aabuhijleh
I am sorry but I can not help with it since I am an Aspose.Imaging developer, not Aspose.Diagram. It would be better to ask the Aspose.Diagram team.