Latest words.jasperreports and words.java libraries are not compatible

Hi support,

I am trying to update my Aspose Word Libraries to the newest ones, i.e.

aspose.words.jasperreports-2.8.1.jar
aspose.words.java-16.8.0.jar

It seems that these libraries are not signed with the same certificate because I get the following error:

java.lang.SecurityException: class “com.aspose.words.awjr206”'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java:895)
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:665)
at java.lang.ClassLoader.defineClass(ClassLoader.java:758)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.deron.te.bi.report.AsposeBiReportDocxExporter.(AsposeBiReportDocxExporter.java:43)
at com.deron.te.bi.report.BiReportExporterFactory.getReportExporter(BiReportExporterFactory.java:35)
at com.deron.te.bi.report.BiDefaultReport.exportReport(BiDefaultReport.java:1728)
at com.deron.te.bi.report.BiDefaultReport.run(BiDefaultReport.java:211)
at com.deron.te.report.exec.ReportEngine$1.run(ReportEngine.java:446)
END-STACK===============================


Many thanks for your help
Dan

Hi Dan,

Thanks for your inquiry. To ensure a timely and accurate response, please attach the following resources here for testing:

  • Share some detail about your use case.
  • Your input Word or Jrprint file.
  • Please create a simple Java application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we'll start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip them and Click 'Reply' button that will bring you to the 'reply page' and there at the bottom you can include any attachments with that post by clicking the 'Add/Update' button.

Hi Tahir,

The library aspose.words.jasperreports-2.8.1.jar is signed using a Verisign certificate
but the library aspose.words.java-16.8.0.jar is signed using a Symantec certificate.
Both files must be signed using the SAME certificate because they contain the same package ‘com.aspose.words’.
In the actual state, these libraries can only be used separately.

Many thanks
Dan



Hi Dan,

Thanks for sharing the detail. Could you please share complete detail of your use case to use Aspose.Words for Java and Aspose.Words for JasperReports together? We will then provide you more information about your query.
dan.albutiu:
The library aspose.words.jasperreports-2.8.1.jar is signed using a Verisign certificate
but the library aspose.words.java-16.8.0.jar is signed using a Symantec certificate.
We are in communication with our product team about this query and will get back to you soon.

Hi Tahir,

To reproduce the error do these steps:

1) Add on your classpath these jar files

aspose-words-16.8.0-jdk16.jar
aspose.words.jasperreports-6.2.0.jar (from release 2.8.1)
commons-logging-1.2.jar (apache)
jasperreports-javaflow-6.1.1.jar

2) Create this class (package of your choice)

package test;

import com.aspose.words.;
import com.aspose.words.jasperreports.
;

public class TestAspose {

public static void main(String[] args) {
System.out.println(“TestAspose start”);
try{
AWDocxExporter exporter = new AWDocxExporter();
}catch(Exception e){
e.printStackTrace();
}
try{
Document srcDoc = new Document();
}catch(Exception e){
e.printStackTrace();
}
System.out.println(“TestAspose end”);
}
}


3) This is the result of the execution of the class
TestAspose start
java.lang.SecurityException: class “com.aspose.words.Document”'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java:895)
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:665)
at java.lang.ClassLoader.defineClass(ClassLoader.java:758)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.deron.te.report.TestAspose.main(TestAspose.java:17)
TestAspose end

4) The solution is to sign the libraries using the same certificate, because they both contain the package ‘com.aspose.words’.

Best regards
Dan

Hi Dan,


Thanks for sharing the detail. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSJAVA-1444. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.