Vaadin and Tomcat gives IllegalStateException

Hi Vaadin Forum,

I have been struggling for more then 2 days with this IllegalStateException being thrown in Tomcat and I hope you can help me, since I think it is due to some cyclic dependency in Vaadin Component. Please correct me if my assumption is wrong:

I’m running Tomcat 7.0.42 and Vaadin 7.3.0.

When deploying an application I get this expcetion in the logs of Tomcat:

Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web application
[/demo-portlet] 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.vaadin.ui.ComboBox->com.vaadin.ui.Select->com.vaadin.ui.ComboBox]

at org.apache.catalina.startup.ContextConfig.checkHandlesTypes(ContextConfig.java:2172)
at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2119)
at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1994)
at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1960)
at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1945)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1319)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:376)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 10 more

As you can see it seems like the trace is saying that there is a cyclic dependency between ComBox and Select components of Vaading, causing the -Xss64m configured for Tomcat to not be enough. I’ve tied several higher values for -Xss none of them is working.

Thank you in advanced for any help you can provide. If I forgot to add information which is necessary for you to point me in the right direction, please let me know as well.

Hi,

I think the only way this could happen is if you have some very old conflicting version of Vaadin on the classpath. ComboBox originally extended Select; this was changed almost three years ago during Vaadin 7.0 development when Select was deprecated.

Hi Shurbann,

Have you solved the problem?

I have the same error.

vaadin.version “7.3.5” in portlet deployment.

thanks in advance,

I solved,

I removed com.vaadin.ui.Select.class into vaadin-server-7.3.5.jar. This class is deprecated and not imported from other classes.

This is because of a polluted classpath. Check your server’s file system, i.e. your deployment(s).
There is certainly an other version of vaadin present, which leads to this java.lang.IllegalStateException.

For me, somehow an old vaadin.jar (version 6) was present after deployment. I had to clean the temp folder of my server (tomcat) and to redeploy.

In my opinion, just removing the class inside vaadin-server-x.y.z.jar is not optimal, as it manipulates a thrid-party-library and potentially implies work every time a build is triggered, with maven for instance. So solving the problem at its root is the best option.