final String context = VaadinServlet.getCurrent()
.getServletContext().getContextPath();
Page.getCurrent().setLocation(context);
VaadinSession.getCurrent().close();
produces following errors after logout and using the (new) application
Warnung: Tried to unregister VerticalLayout (79) which is not registered
Sep 13, 2013 2:43:40 PM com.vaadin.ui.ConnectorTracker unregisterConnector
Warnung: Tried to unregister Panel (11) which is not registered
Sep 13, 2013 2:43:40 PM org.apache.catalina.core.StandardWrapperValve invoke
Schwerwiegend: Servlet.service() for servlet [Test]
in context with path
[/Test] threw exception
java.lang.RuntimeException: The given connector with id 10 is not the one that was registered for that id
I’m guessing that your setLocation isn’t routing you to the correct path.
Try something like this:
getUI().getPage().setLocation("/myapp"); //replace myapp with the name of your app
getSession().close();
I also saw that you can replace /myapp with something like just / or /* but i’m not sure which one it was.
This error can also happen when a component (for example, an static component) is shared between two sessions (= client).
In my Vaadin 6 application we had an static label that we used as argument to Table#addContainerProperty in columns with AbstractComponent type. It worked perfectly in Vaadin 6, but it doesn’t in Vaadin 7. It has sense, but we spent some time trying to resolve this bug when we upgraded our Vaadin version