Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

It seems like Vaadin Push made the session expired message never appear

Lance Stine
6 years ago Jul 28, 2016 6:05pm


I have a web app that push was added to. It seems like about that time the session expired window stopped appearing. Instead the app is unresponsive to anything the user does except a page refresh.

In the javascript console there are messages saying that the wigitset knows that the server is out of session in various ways. There are a lot of them right now. I'm not sure which ones are helpful. Here are some of the messages it logs:

com.mvsc.czrmis.vaadin.widgetset.CombiningWidgetSet-0.js:6510 POST http://localhost:8080/CZRMIS_MAIN/HEARTBEAT/?v-uiId=0 410 (Gone)

WARNING: Heartbeat request returned 410com.vaadin.client.ApplicationConnection

SEVERE: Session expired: null

INFO: Setting hearbeat interval to -1sec.

com.vaadin.client.communication.MessageSenderWARNING: Trying to send RPC from not yet started or stopped application

I have to use my own implementation of AtmosphereInterceptor to work with the application's framework. I've cut session timeout and heart beat to 1 minute for troubleshooting. Here are some code snipits:

<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

Vaadin servlet

@WebServlet(name = "servlet", urlPatterns = {"/*"}, asyncSupported = true,
  initParams = { @WebInitParam(name = "org.atmosphere.cpr.AtmosphereInterceptor",
  value = "com.myorg.MyAtmosphereInterceptor")})
  @VaadinServletConfiguration(heartbeatInterval = 1,
    closeIdleSessions = true, productionMode = false,
    ui = MyUI.class,
    widgetset = "com.myorg.vaadin.widgetset.CombiningWidgetSet")
public final class CzrmisVaadinServlet extends VaadinServlet implements SessionInitListener


public class JpaUtilAtmosphereInterceptor implements AtmosphereInterceptor {
private Logger logger = Logger.getLogger(JpaUtilAtmosphereInterceptor.class);
private final ServerExecutionTimer serverExecutionTimer;

public JpaUtilAtmosphereInterceptor() { }

public void configure(AtmosphereConfig config) { }

public Action inspect(AtmosphereResource atmosphereResource) {
  if (Util.getUser() == null) {
    VaadinSession session = (VaadinSession) atmosphereResource.getRequest().getSession().getAttribute("com.vaadin.server.VaadinSession.mysession");
    if (session != null) {
       final User user = (User) session.getAttribute(USER);
       if (user != null) {
  return Action.CONTINUE;

public void postInspect(AtmosphereResource atmosphereResource) {

UI class

public final class MyUI extends UI {
... all sorts of things going on here

Thanks for any help

Finally, I'm using
com.vaadin:vaadin-server:7.6.4 and the same version for the client, compler, ...etc
tomcat 7 and 8 have the same problem

Lance Stine
6 years ago Mar 13, 2017 10:25pm