We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Tomcat fails to start servlet after upgrade to Aspose.Pdf for Java 4.1.0

Hi everybody,

In our web application we have a Tomcat 7 server used to create reports with Aspose classes.

Currently, we are using Aspose.Pdf for Java version 4.0.0 (in the main lib) folder, and Aspose.Words for Java version 13.5 and Aspose.Words for JasperReports (the the specific webapp lib folder).

When I try to upgrade to Aspose.Pdf for Java version 4.1.0 the webapps completely fail to start.

I’m attaching the logs of the start operation before and after the upgrade, hoping they can be of any use to you.

If I can help you in another way, please let me know.



EDIT:

I tried moving the Aspose.Pdf jar directly inside the specific webapp lib folder, and I got this error in the tomcat logs:

INFO: validateJarFile(C:\AGEws\tomcat7\webapps\626express\WEB-INF\lib\aspose.pdf.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

I opened the jar, and it really had the servlet classes inside, even if I do not really understand why, and I also got this exception:

javax.servlet.ServletException: Servlet.init() for servlet SingleReport threw exception org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) java.lang.Thread.run(Thread.java:722)

root cause

java.lang.NoClassDefFoundError: com/aspose/pdf/Field com.agews.suite626.servlet.old.Servlet.init(Servlet.java:49) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) java.lang.Thread.run(Thread.java:722)

Hi Matteo,


Thanks for contacting support.

I
have tested the scenario and I am able to reproduce the same problem. For the
sake of correction, I have logged it in our issue tracking system as PDFNEWJAVA-33572. We
will investigate this issue in details and will keep you updated on the status
of a correction. <o:p></o:p>

We apologize for your inconvenience.

codewarior:
We will investigate this issue in details and will keep you updated on the status of a correction.


The correction should be very simple, just remove those javax servlet classes, which clearly do NOT belong to your package.

Hi there,


Thanks for your feedback. I’ve shared your suggestion with the development team. Our team is looking into the issue and we will update you as soon as it is resolved.

Thanks for your patience and cooperation.

Best Regards,

Hi,


We have further investigated the issue and have made corrections in latest hotifx of Aspose.Pdf for Java 4.1.2. During our testings, we have tested the hotfix on various systems and its works fine. Can you please try using the latest hotfix and in case the problem still persists, please feel free to contact.

Hi,

the problem seems to have been fixed, thanks.