The following warning is thrown when executing the java program.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.aspose.psd.internal.gJ.c (file:/C:/Users/leonardo.laurindo/.m2/repository/com/aspose/aspose-psd/21.7/aspose-psd-21.7-jdk16.jar) to field java.io.ByteArrayInputStream.buf
WARNING: Please consider reporting this to the maintainers of com.aspose.psd.internal.gJ.c
When applying the license:
com.aspose.psd.License psdLicense = new com.aspose.psd.License();
psdLicense.setLicense(getLicenseAsInputStream());
@ipm.aspose could you please send me the License File you tried to use, then we can make an investigation. To send me the License File safely you can use the following instructions: How to Send License File to Support Team
@ipm.aspose I can’t confirm the issue. Provided license file works fine. Could you please provide the code of getLicenseAsInputStream() method.
For the test I used the following code:
com.aspose.psd.License license = new com.aspose.psd.License();
String initialFile = "C:\\Users\\DmitriySorokin\\Downloads\\aspose.total.license\\aspose.total.license";
InputStream targetStream = new FileInputStream(initialFile);
license.setLicense(targetStream);
import java.io.InputStream;
import org.apache.commons.io.IOUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import reactor.util.Logger;
import reactor.util.Loggers;
@Configuration
public class ThumbnailAsposeLicense {
@Value("${aspose.license}")
private String license;
@Bean
public void loadImagingLicense() {
try {
com.aspose.imaging.License imagingLicense = new com.aspose.imaging.License();
imagingLicense.setLicense(this.getLicenseAsInputStream());
} catch (Exception e) {
}
}
@Bean
public void loadPdfLicense() {
try {
com.aspose.pdf.License pdflicense = new com.aspose.pdf.License();
pdflicense.setLicense(this.getLicenseAsInputStream());
} catch (Exception e) {
}
}
@Bean
public void loadWordsLicense() {
try {
com.aspose.words.License wordsLicense = new com.aspose.words.License();
wordsLicense.setLicense(this.getLicenseAsInputStream());
} catch (Exception e) {
}
}
@Bean
public void loadCellsLicense() {
try {
com.aspose.cells.License cellsLicense = new com.aspose.cells.License();
cellsLicense.setLicense(getLicenseAsInputStream());
} catch (Exception e) {
}
}
@Bean
public void loadSlidesLicense() {
try {
com.aspose.slides.License slidesLicense = new com.aspose.slides.License();
slidesLicense.setLicense(getLicenseAsInputStream());
} catch (Exception e) {
}
}
@Bean
public void loadCadLicense() {
try {
com.aspose.cad.License cadLicense = new com.aspose.cad.License();
cadLicense.setLicense(getLicenseAsInputStream());
} catch (Exception e) {
}
}
@Bean
public void loadPsdLicense() {
try {
com.aspose.psd.License psdLicense = new com.aspose.psd.License();
psdLicense.setLicense(getLicenseAsInputStream());
} catch (Exception e) {
}
}
private InputStream getLicenseAsInputStream() {
return IOUtils.toInputStream(license, "UTF-8");
}
}
We are still investigating your issue. You can track status of your issue by the id PSDJAVA-374