Cannot use push if using Jetty + Memcached sessions

Hi,

I am trying to use memcache to scale Jetty and Vaadin. The problem is as soon as sessions are serialized/deserialized in memcache Vaadin does not work anymore. It make the whole application unusable and doesn’t show any message (no comm problem/session expired errors)

16:38:39.349 ERROR [dw-34 - POST /PUSH/?v-uiId=0&v-csrfToken=fe755bd4-a822-4744-b665-67f6b3b51124&X-Atmosphere-tracking-id=b39292d6-2f27-d7b8-d1dd-0be2692664b6&X-Atmosphere-Framework=2.0.3.vaadin2-jquery&X-Atmosphere-Transport=polling&X-Cache-Date=0&Content-Type=application/json;%20charset=UTF-8&_=1399066719001]
 c.v.s.DefaultErrorHandler -  ! java.lang.NullPointerException: null
! at com.vaadin.server.communication.PushHandler$2.run(PushHandler.java:149)
! at com.vaadin.server.communication.PushHandler.callWithUi(PushHandler.java:238)
! at com.vaadin.server.communication.PushHandler.onRequest(PushHandler.java:307)
! at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:260)
! at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:167)
! at org.atmosphere.container.Jetty7CometSupport.service(Jetty7CometSupport.java:96)
! at org.atmosphere.container.Jetty9AsyncSupportWithWebSocket.service(Jetty9AsyncSupportWithWebSocket.java:124)
! at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:1464)
! at com.vaadin.server.communication.PushRequestHandler.handleRequest(PushRequestHandler.java:121)
! at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1387)

This is the same using STREAMING or WEBSOCKETS and using Vaadin 7.1.14 or 7.2-beta1 (or SNAPSHOT)

Anybody had any chance with Jetty and a JDBC/NoSQL session store ?

Thanks,
Laurent.

Bug report here :
http://dev.vaadin.com/ticket/12235#comment:3

It does not work with Apache Tomcat either… I don’t understand why nobody had this issue in production !

It’s related to
this change
.

Since the atmosphere connection is transient, it doesn’t get serialized with the session. So it will always be null on deserialization and the error appears.

Does anybody cluster sessions with their servlet container ?