简体   繁体   中英

Vaadin: IllegalStateException “UI id has already been defined' after session timeout”

My Vaadin application throws following exception after session timeout and page refresh attempt.

java.lang.IllegalStateException: UI id has already been defined
    at com.vaadin.ui.UI.doInit(UI.java:519)
    at com.vaadin.server.AbstractCommunicationManager.getBrowserDetailsUI(AbstractCommunicationManager.java:2468)
    at com.vaadin.server.AbstractCommunicationManager.handleBrowserDetailsRequest(AbstractCommunicationManager.java:2362)
    at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:325)
    at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:201)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)...

I would appreciate any thoughts on what this means and why happens.

This code removes problem for me

@PreserveOnRefresh
public class MyVaadinUI extends UI {
...

In my case the reason of that exception was this Spring integration plugin. I guess it was managing UI instances as singletones. We decided to use manual Spring context creation. That solved the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM