VaadinServiceSession has already been set. Old session: null New session: n

Hi All,

I 'm getting this stack trace in my application’s log file. I don’t know what exactly is the scenario thats causing this.
Please help. The problem is both Old session & new session are being null.

I searched in forums and they suggest @Scope to be added but I’m NOT using spring.


exception: java.lang.IllegalStateException: VaadinServiceSession has already been set. Old session: null. New session: null.
	at com.vaadin.ui.UI.setSession(UI.java:336) [vaadin-server-7.0.0.jar:7.0.0]

	at com.vaadin.server.VaadinSession.removeUI(VaadinSession.java:626) [vaadin-server-7.0.0.jar:7.0.0]

	at com.vaadin.server.VaadinService.removeClosedUIs(VaadinService.java:821) [vaadin-server-7.0.0.jar:7.0.0]

	at com.vaadin.server.VaadinService.cleanupSession(VaadinService.java:784) [vaadin-server-7.0.0.jar:7.0.0]

	at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:346) [vaadin-server-7.0.0.jar:7.0.0]

	at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:201) [vaadin-server-7.0.0.jar:7.0.0]

	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]

	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:389) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

	at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

	at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

	at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

	at java.lang.Thread.run(Thread.java:661) [rt.jar:1.6.0_31]


First off, please upgrade to a more recent version of Vaadin (preferably the latest one, 7.1.5) and see if the issue still persists. Many, many bugs have been fixed since 7.0.0.

@Johannes
Is this a known issue with 7.0? Any links to related ticket/forum to indicate that?


Tickets for Vaadin 7.0.1

Maybe you find a ticket related to it. Or maybe in a future release.

7.0.0 was a tough release. Lots of changes were made which can cause many bugs which weren’t visible during testing. Your problem might be related to one of them so it’s best to update to a newer release and see if the problem still persists.
I’m sure Johannes doesn’t know any bugs by heart so it might have been a known bug back in Vaadin 7. If the problem still persists it is probably not a known bug as there is nothing in the
roadmap to the next realese
.

Not directly, AFAIK, but there have been many fixes to things that might cause issues like yours, mostly related to concurrency and proper locking.