Vaadin 7.4.8 getUI().push(); broken with latest 9.3.0 release of Jetty

FYI: Calling getUI().push(); will break if you upgrade to the new minor relase of Jetty (9.3.0). It appears the new HTTP2/async support does not work.

Literally any getUI().push() calls will cause this:

Jun 16, 2015 12:17:42 PM org.atmosphere.cpr.AtmosphereResourceImpl notifyListeners
WARNING: Exception during suspend() operation java.lang.NullPointerException
Jun 16, 2015 12:17:42 PM com.vaadin.server.communication.PushHandler onThrowable
SEVERE: Exception in push connection
java.lang.NullPointerException
    at org.eclipse.jetty.server.Request.extractQueryParameters(Request.java:371)
    at org.eclipse.jetty.server.Request.extractParameters(Request.java:357)
    at org.eclipse.jetty.server.Request.getParameter(Request.java:989)
    at javax.servlet.ServletRequestWrapper.getParameter(ServletRequestWrapper.java:194)
    at javax.servlet.ServletRequestWrapper.getParameter(ServletRequestWrapper.java:194)
    at javax.servlet.ServletRequestWrapper.getParameter(ServletRequestWrapper.java:194)
    at org.atmosphere.cpr.AtmosphereRequest.getParameter(AtmosphereRequest.java:456)
    at javax.servlet.ServletRequestWrapper.getParameter(ServletRequestWrapper.java:194)
    at com.vaadin.server.VaadinService.hasParameter(VaadinService.java:737)
    at com.vaadin.server.VaadinService.doFindOrCreateVaadinSession(VaadinService.java:699)
    at com.vaadin.server.VaadinService.findOrCreateVaadinSession(VaadinService.java:665)
    at com.vaadin.server.VaadinService.findVaadinSession(VaadinService.java:524)
    at com.vaadin.server.communication.PushHandler.connectionLost(PushHandler.java:359)
    at com.vaadin.server.communication.PushHandler.onDisconnect(PushHandler.java:338)
    at org.atmosphere.cpr.AtmosphereResourceImpl.onDisconnect(AtmosphereResourceImpl.java:715)
    at org.atmosphere.cpr.AtmosphereResourceImpl.notifyListeners(AtmosphereResourceImpl.java:618)
    at org.atmosphere.cpr.AtmosphereResourceImpl.notifyListeners(AtmosphereResourceImpl.java:598)
    at org.atmosphere.cpr.AsynchronousProcessor.completeLifecycle(AsynchronousProcessor.java:464)
    at org.atmosphere.interceptor.OnDisconnectInterceptor.inspect(OnDisconnectInterceptor.java:77)
    at org.atmosphere.cpr.AsynchronousProcessor.invokeInterceptors(AsynchronousProcessor.java:310)
    at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:175)
    at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:104)
    at org.atmosphere.container.Servlet30CometSupport.service(Servlet30CometSupport.java:66)
    at org.atmosphere.container.Jetty9AsyncSupportWithWebSocket.service(Jetty9AsyncSupportWithWebSocket.java:170)
    at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:2075)
    at com.vaadin.server.communication.PushRequestHandler.handleRequest(PushRequestHandler.java:148)
    at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1408)
    at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:350)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)
    at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178)
    at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62)
    at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
    at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1667)
    at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:225)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1667)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1121)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1055)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:118)
    at org.eclipse.jetty.server.Server.handle(Server.java:515)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:291)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242)
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:238)
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
    at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:57)
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:191)
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:126)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
    at java.lang.Thread.run(Thread.java:744)

Jun 16, 2015 12:17:42 PM org.atmosphere.cpr.AtmosphereResourceImpl notifyListeners
WARNING: Listener error {}
java.lang.NullPointerException
    at org.eclipse.jetty.server.Request.extractQueryParameters(Request.java:371)
    at org.eclipse.jetty.server.Request.restoreParameters(Request.java:1044)
    at org.eclipse.jetty.server.Request.getParameter(Request.java:991)
    at javax.servlet.ServletRequestWrapper.getParameter(ServletRequestWrapper.java:194)
    at javax.servlet.ServletRequestWrapper.getParameter(ServletRequestWrapper.java:194)
    at javax.servlet.ServletRequestWrapper.getParameter(ServletRequestWrapper.java:194)
    at org.atmosphere.cpr.AtmosphereRequest.getParameter(AtmosphereRequest.java:456)
    at javax.servlet.ServletRequestWrapper.getParameter(ServletRequestWrapper.java:194)
    at com.vaadin.server.VaadinService.hasParameter(VaadinService.java:737)
    at com.vaadin.server.VaadinService.doFindOrCreateVaadinSession(VaadinService.java:699)
    at com.vaadin.server.VaadinService.findOrCreateVaadinSession(VaadinService.java:665)
    at com.vaadin.server.VaadinService.findVaadinSession(VaadinService.java:524)
    at com.vaadin.server.communication.PushHandler.connectionLost(PushHandler.java:359)
    at com.vaadin.server.communication.PushHandler.onThrowable(PushHandler.java:345)
    at org.atmosphere.cpr.AtmosphereResourceImpl.onThrowable(AtmosphereResourceImpl.java:668)
    at org.atmosphere.cpr.AtmosphereResourceImpl.notifyListeners(AtmosphereResourceImpl.java:649)
    at org.atmosphere.cpr.AtmosphereResourceImpl.notifyListeners(AtmosphereResourceImpl.java:598)
    at org.atmosphere.cpr.AsynchronousProcessor.completeLifecycle(AsynchronousProcessor.java:464)
    at org.atmosphere.interceptor.OnDisconnectInterceptor.inspect(OnDisconnectInterceptor.java:77)
    at org.atmosphere.cpr.AsynchronousProcessor.invokeInterceptors(AsynchronousProcessor.java:310)
    at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:175)
    at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:104)
    at org.atmosphere.container.Servlet30CometSupport.service(Servlet30CometSupport.java:66)
    at org.atmosphere.container.Jetty9AsyncSupportWithWebSocket.service(Jetty9AsyncSupportWithWebSocket.java:170)
    at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:2075)
    at com.vaadin.server.communication.PushRequestHandler.handleRequest(PushRequestHandler.java:148)
    at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1408)
    at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:350)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)
    at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178)
    at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62)
    at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
    at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1667)
    at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:225)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1667)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1121)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1055)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:118)
    at org.eclipse.jetty.server.Server.handle(Server.java:515)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:291)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242)
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:238)
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
    at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:57)
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:191)
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:126)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
    at java.lang.Thread.run(Thread.java:744)

Created https://github.com/Atmosphere/atmosphere/issues/1998 for this

It seems to be a problem only with websockets, if you use long polling you won’t see any issues

Will also work if you set Jetty to use JSR-356 standard websockets using the servlet init parameter

        <init-param>
            <param-name>org.atmosphere.cpr.asyncSupport</param-name>
            <param-value>org.atmosphere.container.JSR356AsyncSupport</param-value>
        </init-param>

The JSR-356 workaround didn’t work for me, I had the same results as in this post:
https://vaadin.com/forum#!/thread/10746645

Any update on when this will be fixed? It seems Vaadin needs to upgraded to Atmosphere 2.3.3 or higher.

Indeed, according to the Atmosphere issue tracker, this problem has been fixed in Atmosphere 2.3.3. Yet even the Vaadin version 7.6.4 is still using Atmosphere 2.2.7-vaadin1. I hope there will be an update soon.

I need the updated version of atmosphere too, otherwise vaadin doesnt work with any current version 9.3 of Jetty.

Is it possible to update atmosphere within vaadin myself? Because the latest 7.6.4 version of vaadin is still using the outdated version.

Opened a bug report at Vaadin issue tracker:
https://dev.vaadin.com/ticket/19742

hi. I’ve tried to deploy an embedded version of jetty (with latest vaadin release) into equinox with the same results: nullpointer on “_metadata”. But… if I register the same vaadinservlet with a simple HttpService based on jetty … it goes smoothly. Why?
EDIT:
Sorry, I didn’t notice the falling back to BlockingIOCometSupport

For me the issue does not only exist when closing a tab, but in general when I tried using SSL.

So I can’t use SSL with vaadin/jetty due to the old atmosphere version :confused:
I hope your bug tracker helps more than this forum. I feel vaadin ignores us here :

Artur commented on the GitHub issue here:
https://github.com/vaadin/atmosphere/issues/1#issuecomment-216443724

If anyone has the chance to try this out I’d be interested to know how it goes.

Hi, I’ve tried with vaadin 7.6.5 and atmosphere runtime 2.3.7.
I’m using a jetty embedded version and the simple Push annotation (default transport) and PreserveOnRefresh . Unfortunatly after page load completing, a notification appears: “Session Expired”.
There’s no error into log. Even after some time, no timeout error.
This is my log after vaadin servlet is started

mag 03, 2016 7:21:11 PM com.vaadin.server.DefaultDeploymentConfiguration checkProductionMode
AVVERTENZA: 
=================================================================
Vaadin is running in DEBUG MODE.
Add productionMode=true to web.xml to disable debug features.
To show debug window, add ?debug to your application URL.
=================================================================
mag 03, 2016 7:21:11 PM com.vaadin.server.VaadinService checkAtmosphereSupport
AVVERTENZA: 
=================================================================
Vaadin depends on Atmosphere 2.2.7.vaadin1 but version 2.3.7.vaadin1 was found.
This might cause compatibility problems if push is used.
=================================================================
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework addAtmosphereHandler
INFORMAZIONI: Installed AtmosphereHandler com.vaadin.server.communication.PushAtmosphereHandler mapped to context-path: /*
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework addAtmosphereHandler
INFORMAZIONI: Installed the following AtmosphereInterceptor mapped to AtmosphereHandler com.vaadin.server.communication.PushAtmosphereHandler
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework autoConfigureService
INFORMAZIONI: Atmosphere is using org.atmosphere.util.VoidAnnotationProcessor for processing annotation
mag 03, 2016 7:21:11 PM org.atmosphere.util.ForkJoinPool <init>
INFORMAZIONI: Using ForkJoinPool  org.atmosphere.util.JDK7ForkJoinPool. Set the org.atmosphere.cpr.broadcaster.maxAsyncWriteThreads to -1 to fully use its power.
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework initWebSocket
INFORMAZIONI: Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol 
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework configureAtmosphereInterceptor
INFORMAZIONI: Installing Default AtmosphereInterceptors
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFORMAZIONI:     org.atmosphere.interceptor.CorsInterceptor : CORS Interceptor Support
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFORMAZIONI:     org.atmosphere.interceptor.CacheHeadersInterceptor : Default Response's Headers Interceptor
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFORMAZIONI:     org.atmosphere.interceptor.PaddingAtmosphereInterceptor : Browser Padding Interceptor Support
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFORMAZIONI:     org.atmosphere.interceptor.AndroidAtmosphereInterceptor : Android Interceptor Support
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework configureAtmosphereInterceptor
INFORMAZIONI: Dropping Interceptor org.atmosphere.interceptor.HeartbeatInterceptor
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFORMAZIONI:     org.atmosphere.interceptor.SSEAtmosphereInterceptor : SSE Interceptor Support
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFORMAZIONI:     org.atmosphere.interceptor.JSONPAtmosphereInterceptor : JSONP Interceptor Support
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFORMAZIONI:     org.atmosphere.interceptor.JavaScriptProtocol : Atmosphere JavaScript Protocol
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFORMAZIONI:     org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor : org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFORMAZIONI:     org.atmosphere.interceptor.OnDisconnectInterceptor : Browser disconnection detection
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFORMAZIONI:     org.atmosphere.interceptor.IdleResourceInterceptor : org.atmosphere.interceptor.IdleResourceInterceptor
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework configureAtmosphereInterceptor
INFORMAZIONI: Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults to disable them.
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFORMAZIONI: Installed AtmosphereInterceptor CORS Interceptor Support with priority FIRST_BEFORE_DEFAULT 
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFORMAZIONI: Installed AtmosphereInterceptor Default Response's Headers Interceptor with priority AFTER_DEFAULT 
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFORMAZIONI: Installed AtmosphereInterceptor Browser Padding Interceptor Support with priority AFTER_DEFAULT 
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFORMAZIONI: Installed AtmosphereInterceptor Android Interceptor Support with priority AFTER_DEFAULT 
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFORMAZIONI: Installed AtmosphereInterceptor SSE Interceptor Support with priority AFTER_DEFAULT 
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFORMAZIONI: Installed AtmosphereInterceptor JSONP Interceptor Support with priority AFTER_DEFAULT 
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFORMAZIONI: Installed AtmosphereInterceptor Atmosphere JavaScript Protocol with priority AFTER_DEFAULT 
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFORMAZIONI: Installed AtmosphereInterceptor org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor with priority AFTER_DEFAULT 
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFORMAZIONI: Installed AtmosphereInterceptor Browser disconnection detection with priority AFTER_DEFAULT 
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFORMAZIONI: Installed AtmosphereInterceptor org.atmosphere.interceptor.IdleResourceInterceptor with priority BEFORE_DEFAULT 
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Using EndpointMapper class org.atmosphere.util.DefaultEndpointMapper
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Using BroadcasterCache: org.atmosphere.cache.UUIDBroadcasterCache
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Default Broadcaster Class: org.atmosphere.cpr.DefaultBroadcaster
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Broadcaster Shared List Resources: false
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Broadcaster Polling Wait Time 100
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Shared ExecutorService supported: true
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Messaging ExecutorService Pool Size unavailable - Not instance of ThreadPoolExecutor
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Async I/O Thread Pool Size: 200
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Using AtmosphereResurceFactory: org.atmosphere.cpr.DefaultAtmosphereResourceFactory
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Invoke AtmosphereInterceptor on WebSocket message true
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: HttpSession supported: true
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Atmosphere is using org.atmosphere.inject.InjectableObjectFactory for dependency injection and object creation
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Atmosphere is using async support: org.atmosphere.container.Jetty9AsyncSupportWithWebSocket running under container: jetty/9.3.8.v20160314 with WebSocket enabled.
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Atmosphere Framework 2.3.7.vaadin1 started.
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.Universe broadcasterFactory
AVVERTENZA: More than one Universe configured. Universe class will gives wrong object reference org.atmosphere.cpr.DefaultBroadcasterFactory@672e87c2
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.Universe resourceFactory
AVVERTENZA: More than one Universe configured. Universe class will gives wrong object reference org.atmosphere.cpr.DefaultAtmosphereResourceFactory@d30325e
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.Universe sessionResourceFactory
AVVERTENZA: More than one Universe configured. Universe class will gives wrong object reference org.atmosphere.cpr.DefaultAtmosphereResourceSessionFactory@651cbc52
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.Universe framework
AVVERTENZA: More than one Universe configured. Universe class will gives wrong object reference com.vaadin.server.communication.PushRequestHandler$2@21196db4
mag 03, 2016 7:21:11 PM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFORMAZIONI: Installed AtmosphereInterceptor  Track Message Size Interceptor using | with priority BEFORE_DEFAULT 

Try setting the init parameter “org.atmosphere.cpr.asyncSupport” to “org.atmosphere.container.JSR356AsyncSupport”

Now It’s an IllegalStateException.

mag 03, 2016 7:31:16 PM com.vaadin.server.DefaultDeploymentConfiguration checkProductionMode
AVVERTENZA: 
=================================================================
Vaadin is running in DEBUG MODE.
Add productionMode=true to web.xml to disable debug features.
To show debug window, add ?debug to your application URL.
=================================================================
mag 03, 2016 7:31:16 PM com.vaadin.server.VaadinService checkAtmosphereSupport
AVVERTENZA: 
=================================================================
Vaadin depends on Atmosphere 2.2.7.vaadin1 but version 2.3.7.vaadin1 was found.
This might cause compatibility problems if push is used.
=================================================================
mag 03, 2016 7:31:16 PM org.atmosphere.cpr.AtmosphereFramework addAtmosphereHandler
INFORMAZIONI: Installed AtmosphereHandler com.vaadin.server.communication.PushAtmosphereHandler mapped to context-path: /*
mag 03, 2016 7:31:16 PM org.atmosphere.cpr.AtmosphereFramework addAtmosphereHandler
INFORMAZIONI: Installed the following AtmosphereInterceptor mapped to AtmosphereHandler com.vaadin.server.communication.PushAtmosphereHandler
mag 03, 2016 7:31:16 PM org.atmosphere.cpr.DefaultAsyncSupportResolver newCometSupport
GRAVE: Failed to create AsyncSupport class: org.atmosphere.container.JSR356AsyncSupport, error: java.lang.reflect.InvocationTargetException
mag 03, 2016 7:31:16 PM org.atmosphere.cpr.DefaultAsyncSupportResolver newCometSupport
GRAVE: Real error: org.atmosphere.container.JSR356AsyncSupport, error: java.lang.IllegalStateException: Unable to configure jsr356 at that stage. ServerContainer is null
mag 03, 2016 7:31:16 PM org.atmosphere.cpr.AtmosphereFramework init
GRAVE: Failed to initialize Atmosphere Framework
java.lang.IllegalArgumentException: Unable to create org.atmosphere.container.JSR356AsyncSupport
    at org.atmosphere.cpr.DefaultAsyncSupportResolver.newCometSupport(DefaultAsyncSupportResolver.java:252)
    at org.atmosphere.cpr.AtmosphereFramework.doInitParams(AtmosphereFramework.java:1427)
    at org.atmosphere.cpr.AtmosphereFramework.doInitParams(AtmosphereFramework.java:1402)
    at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:850)
    at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:810)
    at com.vaadin.server.communication.PushRequestHandler.initAtmosphere(PushRequestHandler.java:219)
    at com.vaadin.server.communication.PushRequestHandler.<init>(PushRequestHandler.java:89)
    at com.vaadin.server.VaadinServletService.createRequestHandlers(VaadinServletService.java:53)
    at com.vaadin.server.VaadinService.init(VaadinService.java:191)
    at com.vaadin.server.VaadinServlet.createServletService(VaadinServlet.java:317)
...
    at com.vaadin.server.VaadinServlet.init(VaadinServlet.java:223)
   ....
    at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:640)
    at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:419)
    at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:875)
    at org.eclipse.jetty.servlet.ServletHandler.updateMappings(ServletHandler.java:1542)
    at org.eclipse.jetty.servlet.ServletHandler.setServletMappings(ServletHandler.java:1601)
    at org.eclipse.jetty.servlet.ServletHandler.addServletWithMapping(ServletHandler.java:1006)
    at org.eclipse.jetty.servlet.ServletContextHandler.addServlet(ServletContextHandler.java:436)
  ....
    at org.eclipse.equinox.internal.cm.ManagedServiceTracker$1.run(ManagedServiceTracker.java:276)
    at org.eclipse.equinox.internal.cm.SerializedTaskQueue$1.run(SerializedTaskQueue.java:36)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.atmosphere.cpr.DefaultAsyncSupportResolver.newCometSupport(DefaultAsyncSupportResolver.java:244)
    ... 22 more
Caused by: java.lang.IllegalStateException: Unable to configure jsr356 at that stage. ServerContainer is null
    at org.atmosphere.container.JSR356AsyncSupport.<init>(JSR356AsyncSupport.java:53)
    at org.atmosphere.container.JSR356AsyncSupport.<init>(JSR356AsyncSupport.java:40)
    ... 27 more

Sounds like you are missing the Jetty jar which contains JSR356 websockets support

I’m checking, but It seems to be there. I’m using

<dependency> <groupId>org.eclipse.jetty.websocket</groupId> <artifactId>javax-websocket-server-impl</artifactId> <version>9.3.8.v20160314</version> </dependency> It gives me always an IllegalStateException
Maybe It’s a class loader issue (I’m working on an OSGi system) .

Hi! My problem seems to be solved. It was an
old problem
. So now this is my log

[code]
mag 04, 2016 10:36:03 AM com.vaadin.server.DefaultDeploymentConfiguration checkProductionMode
AVVERTENZA:

Vaadin is running in DEBUG MODE.
Add productionMode=true to web.xml to disable debug features.
To show debug window, add ?debug to your application URL.

mag 04, 2016 10:36:03 AM com.vaadin.server.VaadinService checkAtmosphereSupport
AVVERTENZA:

Vaadin depends on Atmosphere 2.2.7.vaadin1 but version 2.3.7.vaadin1 was found.
This might cause compatibility problems if push is used.

mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework addAtmosphereHandler
INFORMAZIONI: Installed AtmosphereHandler com.vaadin.server.communication.PushAtmosphereHandler mapped to context-path: /*
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework addAtmosphereHandler
INFORMAZIONI: Installed the following AtmosphereInterceptor mapped to AtmosphereHandler com.vaadin.server.communication.PushAtmosphereHandler
mag 04, 2016 10:36:03 AM org.atmosphere.container.JSR356AsyncSupport
INFORMAZIONI: JSR 356 Mapping path /vaadin7.prova
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework autoConfigureService
INFORMAZIONI: Atmosphere is using org.atmosphere.util.VoidAnnotationProcessor for processing annotation
mag 04, 2016 10:36:03 AM org.atmosphere.util.ForkJoinPool
INFORMAZIONI: Using ForkJoinPool org.atmosphere.util.JDK7ForkJoinPool. Set the org.atmosphere.cpr.broadcaster.maxAsyncWriteThreads to -1 to fully use its power.
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework initWebSocket
INFORMAZIONI: Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework configureAtmosphereInterceptor
INFORMAZIONI: Installing Default AtmosphereInterceptors
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFORMAZIONI: org.atmosphere.interceptor.CorsInterceptor : CORS Interceptor Support
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFORMAZIONI: org.atmosphere.interceptor.CacheHeadersInterceptor : Default Response’s Headers Interceptor
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFORMAZIONI: org.atmosphere.interceptor.PaddingAtmosphereInterceptor : Browser Padding Interceptor Support
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFORMAZIONI: org.atmosphere.interceptor.AndroidAtmosphereInterceptor : Android Interceptor Support
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework configureAtmosphereInterceptor
INFORMAZIONI: Dropping Interceptor org.atmosphere.interceptor.HeartbeatInterceptor
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFORMAZIONI: org.atmosphere.interceptor.SSEAtmosphereInterceptor : SSE Interceptor Support
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFORMAZIONI: org.atmosphere.interceptor.JSONPAtmosphereInterceptor : JSONP Interceptor Support
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFORMAZIONI: org.atmosphere.interceptor.JavaScriptProtocol : Atmosphere JavaScript Protocol
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFORMAZIONI: org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor : org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFORMAZIONI: org.atmosphere.interceptor.OnDisconnectInterceptor : Browser disconnection detection
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFORMAZIONI: org.atmosphere.interceptor.IdleResourceInterceptor : org.atmosphere.interceptor.IdleResourceInterceptor
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework configureAtmosphereInterceptor
INFORMAZIONI: Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults to disable them.
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFORMAZIONI: Installed AtmosphereInterceptor CORS Interceptor Support with priority FIRST_BEFORE_DEFAULT
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFORMAZIONI: Installed AtmosphereInterceptor Default Response’s Headers Interceptor with priority AFTER_DEFAULT
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFORMAZIONI: Installed AtmosphereInterceptor Browser Padding Interceptor Support with priority AFTER_DEFAULT
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFORMAZIONI: Installed AtmosphereInterceptor Android Interceptor Support with priority AFTER_DEFAULT
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFORMAZIONI: Installed AtmosphereInterceptor SSE Interceptor Support with priority AFTER_DEFAULT
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFORMAZIONI: Installed AtmosphereInterceptor JSONP Interceptor Support with priority AFTER_DEFAULT
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFORMAZIONI: Installed AtmosphereInterceptor Atmosphere JavaScript Protocol with priority AFTER_DEFAULT
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFORMAZIONI: Installed AtmosphereInterceptor org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor with priority AFTER_DEFAULT
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFORMAZIONI: Installed AtmosphereInterceptor Browser disconnection detection with priority AFTER_DEFAULT
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFORMAZIONI: Installed AtmosphereInterceptor org.atmosphere.interceptor.IdleResourceInterceptor with priority BEFORE_DEFAULT
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Using EndpointMapper class org.atmosphere.util.DefaultEndpointMapper
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Using BroadcasterCache: org.atmosphere.cache.UUIDBroadcasterCache
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Default Broadcaster Class: org.atmosphere.cpr.DefaultBroadcaster
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Broadcaster Shared List Resources: false
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Broadcaster Polling Wait Time 100
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Shared ExecutorService supported: true
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Messaging ExecutorService Pool Size unavailable - Not instance of ThreadPoolExecutor
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Async I/O Thread Pool Size: 200
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Using AtmosphereResurceFactory: org.atmosphere.cpr.DefaultAtmosphereResourceFactory
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Invoke AtmosphereInterceptor on WebSocket message true
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: HttpSession supported: true
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Atmosphere is using org.atmosphere.inject.InjectableObjectFactory for dependency injection and object creation
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Atmosphere is using async support: org.atmosphere.container.JSR356AsyncSupport running under container: jetty/9.3.8.v20160314 using javax.servlet/3.0 and jsr356/WebSocket API
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework info
INFORMAZIONI: Atmosphere Framework 2.3.7.vaadin1 started.
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.Universe broadcasterFactory
AVVERTENZA: More than one Universe configured. Universe class will gives wrong object reference org.atmosphere.cpr.DefaultBroadcasterFactory@4deb144a
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.Universe resourceFactory
AVVERTENZA: More than one Universe configured. Universe class will gives wrong object reference org.atmosphere.cpr.DefaultAtmosphereResourceFactory@41787c05
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.Universe sessionResourceFactory
AVVERTENZA: More than one Universe configured. Universe class will gives wrong object reference org.atmosphere.cpr.DefaultAtmosphereResourceSessionFactory@18e7ef4a
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.Universe framework
AVVERTENZA: More than one Universe configured. Universe class will gives wrong object reference com.vaadin.server.communication.PushRequestHandler$2@4ab7f754
mag 04, 2016 10:36:03 AM org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFORMAZIONI: Installed AtmosphereInterceptor Track Message Size Interceptor using | with priority BEFORE_DEFAULT
[/code]I’m worried about the latest log lines about “More than one Universe configured.” messages.

the code I’m using is

ServletContextHandler handler = getHandler();
if(handler!=null){   
     VaadinServlet servlet = initServlet();
     ServerContainer container = (ServerContainer) handler.getServletContext().getAttribute(ServerContainer.class.getName());
     if(container ==null){
            container = WebSocketServerContainerInitializer.configureContext( handler );    
     }               
     ServletHolder h = new ServletHolder("vaadinServlet", servlet);
     h.setInitParameter("org.atmosphere.cpr.asyncSupport", "org.atmosphere.container.JSR356AsyncSupport");
     h.setAsyncSupported(true);
     handler.addServlet(h, servletAlias+"/*");
}

could somebody try it on it’s own machine ( outside OSGi too) to exclude any system configuration dependencies?

I just tried Vaadin 7.6.5 with atmosphere-runtime 2.4.3.vaadin1 and oops:

java.lang.IncompatibleClassChangeError: Found interface org.atmosphere.cpr.AtmosphereRequest, but class was expected at com.vaadin.server.communication.PushAtmosphereHandler.onRequest(PushAtmosphereHandler.java:75) I have then downgraded to atmosphere-runtime 2.3.7.vaadin1 and the app now always shows that “Session Expired” and does not respond to any clicks besides the Esc button which reloads the page and shows the “Session Expired” again. Both Firefox 46.0 and Chromium 49.*. The same with atmosphere-runtime 2.2.9.vaadin1. So it seems that “Here lies dragons” :slight_smile:

There is still an unresolved problem in the Atmosphere + Jetty 9.3 + native websockets combo causing an immediate session expiration when used with Vaadin. The solution for this is to use JSR-356 (standard) websockets instead by setting the init parameter mentioned above

The safest bet right now is to use 2.2.9.vaadin1 + JSR-356. Atmosphere 2.4 has some minor API changes so it requires Vaadin framework changes also. Those won’t be done until Vaadin 8 however as Atmosphere 2.4 does not work with Java 6.