When integrating Spring framework with Vaadin. (hint HERE) UI elements should be annotated as follows:
@Scope("prototype")
Otherwise you may get the following error:
@Scope("prototype")
Otherwise you may get the following error:
HTTP Status 500 - java.lang.IllegalStateException: VaadinServiceSession has already been set. Old session: com.vaadin.server.VaadinSession@77205ce5 for Test Application. New session: com.vaadin.server.VaadinSession@61fae408 for Test Application.
type Exception report
message java.lang.IllegalStateException: VaadinServiceSession has already been set. Old session: com.vaadin.server.VaadinSession@77205ce5 for Test Application. New session: com.vaadin.server.VaadinSession@61fae408 for Test Application.
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: java.lang.IllegalStateException: VaadinServiceSession has already been set. Old session: com.vaadin.server.VaadinSession@77205ce5 for Test Application. New session: com.vaadin.server.VaadinSession@61fae408 for Test Application.
com.vaadin.server.VaadinServlet.handleServiceException(VaadinServlet.java:580)
com.vaadin.server.VaadinServlet.service(VaadinServlet.java:343)
com.vaadin.server.VaadinServlet.service(VaadinServlet.java:201)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause
java.lang.IllegalStateException: VaadinServiceSession has already been set. Old session: com.vaadin.server.VaadinSession@77205ce5 for Test Application. New session: com.vaadin.server.VaadinSession@61fae408 for Test Application.
com.vaadin.ui.UI.setSession(UI.java:342)
com.vaadin.server.AbstractCommunicationManager.getBrowserDetailsUI(AbstractCommunicationManager.java:2462)
com.vaadin.server.AbstractCommunicationManager.handleBrowserDetailsRequest(AbstractCommunicationManager.java:2362)
com.vaadin.server.VaadinServlet.service(VaadinServlet.java:325)
com.vaadin.server.VaadinServlet.service(VaadinServlet.java:201)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.32 logs.
