Out of sync on session time out — how to get out?


  1. Liferay 5.x on GlassFish v3 + Vaadin 6.3.2
  2. Some stuff shows a window. Works fine in any way.
  3. Session goes time-out.
  4. On the time, when I try to use my beloved portlet with Vaadin, I am getting a red nag-screen: “Click here to re-sync”.
  5. Sure, I do.
  6. goto(4);

I remember, previously, when I used 6.2.5, I just got a big traceback on a webserver with the only message that session went away, but the whole Vaadin stuff was re-inited. Now I have these kind of things…

Also, to be very honest, I have no much brain how to understand from the following message of what exactly non-existent document is missing:

Warning: Ignoring variable change for non-existent component, VAR_PID=PID29

Certainly, because session timed out, that’s OK. But why Vaadin continues to remember all the state and refuses to re-init itself?

Are you implementing a JSR-168 (Portlet 1.0) or JSR-286 (Portlet 2.0) portlet? Session management is quite different between these two cases.

For JSR-286, sessions are managed by the portal. You can only access the portlet via the portal, and a new session should get created automatically when you make a request. If your problem occurs with a JSR-286 portlet, the problem is probably some exception being thrown from your code rather than a session timeout issue.

With JSR-168, your portlet lives as a servlet on the portal, and all requests except the initial page HTML fragment rendering go directly to the portlet. There, the session should normally be created by the portal when showing the HTML fragment, and then the same session be accessed when internal requests go to the servlet. In case something accesses the servlet directly when there is no valid portlet session, a servlet session might get created instead of the correct portlet session, or there may be some other similar issue.

The message could also be related to some other exception occurring in your code.

You could try to debug to see which exception is thrown. You can use a remote debugger, override Application.terminalError() and put a breakpoint in AbstractApplication[Servlet|Portlet]
.criticalNotification() to have some more detailed information.

Oh, yes. My bad, forgot to tell: it is JSR286 of course. Yes, I know that part about session management there, but no idea how to decrypt the message from Vaadin. Thank you for the tip, I will try to find it out with terminal as you suggested.