Hello ,
I am using groupdocs-Annotation 18.8.jar and groupdocs-watermark 18.8.jar in the same project .
While adding the watermark in the file below line throws exception.
java.lang.IllegalAccessError: tried to access class com.aspose.email.as from class com.groupdocs.watermark.bc
Caused by: java.lang.IllegalAccessError: tried to access class com.aspose.email. as from class com.groupdocs.watermark.bc at com.groupdocs.watermark.bc.wC(Unknown Source) at com.groupdocs.watermark.ao.(Unknown Source) at com.groupdocs.watermark.ao.vJ(Unknown Source) at com.groupdocs.watermark.DocumentFactory.a(Unknown Source) at com.groupdocs.watermark.DocumentFactory.load(Unknown Source) at com.groupdocs.watermark.DocumentFactory.load(Unknown Source) at com.groupdocs.watermark.Document.load(Unknown Source) at org.infotech.jdol.client.utility.groupdocs.WatermarkUtility.addWaterm ark(WatermarkUtility.java:51)
We are unable to reproduce this issue at our end. Can you please share a simple application along-with problematic file? We’ll then further investigate the issue.
We integrated GroupDocs.Annotaiton for Java 18.10 and GroupDocs.Watermark for Java 18.8 in a single project.
We investigated this issue using a standalone Java application.
However, for further investigation, can you please share a simple web application (without any dependencies) using that we can reproduce the issue.
Secondly, you can also try to reproduce this exception in a standalone application and then share that with us.
I have solved that issue .I Just changed the sequence of jar files. Loaded the groupdocs-watermark jar at the first place before the annotation and signature jar. You can see the screen-shot attached.
But started giving new exception while loading the license for annotation jar. I think com.groupdocs.email is creating this ambiguity.Because same path is present in the all three jar file.
Please find the error log below :
Exception in thread “main” java.lang.NoSuchMethodError: com.aspose.email.internal.i.b.Cg()Lcom/aspose/email/internal/i/b; at com.aspose.email.b.b$e.(Unknown Source) at com.aspose.email.b.b$e.(Unknown Source) at com.aspose.email.b.b$c.(Unknown Source) at com.aspose.email.b.b$h.(Unknown Source) at com.aspose.email.b.b$h.(Unknown Source) at com.aspose.email.b.b.b(Unknown Source) at com.aspose.email.b.b.z(Unknown Source) at com.aspose.email.internal.g.cD$a.(Unknown Source) at com.aspose.email.internal.g.cD.(Unknown Source) at com.aspose.email.acj.a(Unknown Source) at com.aspose.email.acj.a(Unknown Source) at com.aspose.email.License.a(Unknown Source) at com.aspose.email.License.setLicense(Unknown Source) at com.groupdocs.annotation.internal.c.g.f.l.aspose.a.fH(Unknown Source) at com.groupdocs.annotation.internal.c.g.f.l.aspose.a.r(Unknown Source) at com.groupdocs.annotation.internal.c.g.f.l.b.jTb(Unknown Source) at com.groupdocs.annotation.internal.c.g.f.l.b.b(Unknown Source) at com.groupdocs.annotation.internal.c.g.f.handler.a.a(Unknown Source) at com.groupdocs.annotation.internal.c.g.f.handler.a.a(Unknown Source) at com.groupdocs.annotation.common.license.License.setLicense(Unknown Source) at MainClass.loadLicense(MainClass.java:153) at MainClass.main(MainClass.java:23)
Yes.In Standalone application also
com.groupdocs.annotation.common.license.License l = new com.groupdocs.annotation.common.license.License();
on this line its throwing exception for me.
If you want to get the same behavior at your end then add the jars in the following sequence
as shown in the attached file jarlistSequence.png (182.9 KB)
This issue is reproduced at our end as well.
Hence, it has been logged in our internal issue tracking system with ID : ANNOTATIONJAVA-1130. We’re now investigating it. As we have any further updates, we’ll notify you.