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

Free Support Forum - aspose.com

Stackoverflow in Words.Java 17.7

I’m using Words.Java in a Tomcat web application. Since installing the latest version, 17.7, Tomcat won’t start anymore due to a StackOverflowError scanning for annotations. This is the stacktrace that is provided:

Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web application [] due to a StackOverflowError. Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies. The class hierarchy being processed was [com.aspose.words.zzS2->com.aspose.words.zzS1->com.aspose.words.zzS2]
	at org.apache.catalina.startup.ContextConfig.checkHandlesTypes(ContextConfig.java:2099)
	at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2043)
	at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1989)
	at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1959)
	at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1912)
	at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1154)
	at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:771)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:298)
	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5076)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
	... 42 more

Any thoughts on why this is happening since 17.7?

@inceptionEhv,

Thanks for your inquiry. Please remove all Aspose.Words Jar files from your application and include the latest Jar file. Please also restart the server. Hope this helps you.

If you still face problem, please share your document and code example here to reproduce this issue at our end. Thanks for your cooperation.

Best Regards,
Tahir Manzoor

All previous versions of the jar files were already removed from the application. Note that the problem doesn’t occur when loading a Word document, but at startup of tomcat. We have included the Words.Java 17.7 jarfile in the WEB-INF/lib folder of our web-application and the stackoverflow occurs when Tomcat is started. In fact it prevents Tomcat from starting up alltogether!

We are using tomcat 8.5.15 at the moment and java 1.8.0.112.

@inceptionEhv,

Thanks for sharing the detail. We are setting up Tomcat 8.5.15 at our end and will test this scenario. We will get back to you soon.

Best Regards,
Tahir Manzoor

Hi Tahir,

I do have to apologize. After reviewing our setup again, it turns out that the 17.6 version indeed was still on the classpath. We had a configuration error on our build servers which resulted in adding both versions to the classpath. Again my apologies for the confusion.

Greetings,
Ron

@inceptionEhv,

It is nice to hear from you that your problem has been solved. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.

Best Regards,
Tahir Manzoor