Skip to content

Websocket support for Vaadin 8 is broken with pax-web 8.0.33 #2135

@rh-desoftware

Description

@rh-desoftware

When deploying a Vaadin 8 application into Karaf 4.4.8 with pax-web 8.0.33 the following exception occurs when access the web application:

The problem can be reproduces with this sample project: https://github.com/rh-desoftware/vaadin8_karaf_demo

09:24:14.810 INFO [qtp1595367122-443] Installed AtmosphereHandler com.vaadin.server.communication.PushAtmosphereHandler mapped to context-path: /*
09:24:14.812 INFO [qtp1595367122-443] Installed the following AtmosphereInterceptor mapped to AtmosphereHandler com.vaadin.server.communication.PushAtmosphereHandler
09:24:14.847 INFO [qtp1595367122-443] Atmosphere is using org.atmosphere.util.VoidAnnotationProcessor for processing annotation
09:24:14.856 INFO [qtp1595367122-443] Using ForkJoinPool  java.util.concurrent.ForkJoinPool. Set the org.atmosphere.cpr.broadcaster.maxAsyncWriteThreads to -1 to fully use its power.
09:24:14.862 INFO [qtp1595367122-443] Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol
09:24:14.873 WARN [qtp1595367122-443] Failed to create AsyncSupport class: class org.atmosphere.container.JSR356AsyncSupport, error: java.lang.reflect.InvocationTargetException
09:24:14.874 ERROR [qtp1595367122-443] Real error: Unable to configure jsr356 at that stage. ServerContainer is null
java.lang.IllegalStateException: Unable to configure jsr356 at that stage. ServerContainer is null
        at org.atmosphere.container.JSR356AsyncSupport.<init>(JSR356AsyncSupport.java:53) ~[!/:2.4.30.vaadin4]
        at org.atmosphere.container.JSR356AsyncSupport.<init>(JSR356AsyncSupport.java:42) ~[!/:2.4.30.vaadin4]
        at jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62) ~[?:?]
        at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502) ~[?:?]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:486) ~[?:?]
        at org.atmosphere.cpr.DefaultAsyncSupportResolver.newCometSupport(DefaultAsyncSupportResolver.java:237) ~[!/:2.4.30.vaadin4]
        at org.atmosphere.cpr.DefaultAsyncSupportResolver.resolveWebSocket(DefaultAsyncSupportResolver.java:308) ~[!/:2.4.30.vaadin4]
        at org.atmosphere.cpr.DefaultAsyncSupportResolver.resolve(DefaultAsyncSupportResolver.java:294) ~[!/:2.4.30.vaadin4]
        at org.atmosphere.cpr.AtmosphereFramework.autoDetectContainer(AtmosphereFramework.java:2092) ~[!/:2.4.30.vaadin4]
        at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:914) ~[!/:2.4.30.vaadin4]
        at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:838) ~[!/:2.4.30.vaadin4]
        at com.vaadin.server.communication.PushRequestHandler.initAtmosphere(PushRequestHandler.java:206) ~[!/:8.14.0]
        at com.vaadin.server.communication.PushRequestHandler.<init>(PushRequestHandler.java:79) ~[!/:8.14.0]
        at com.vaadin.server.VaadinServletService.createRequestHandlers(VaadinServletService.java:68) ~[!/:8.14.0]
        at com.vaadin.server.VaadinService.init(VaadinService.java:219) ~[!/:8.14.0]
        at com.vaadin.server.VaadinServlet.createServletService(VaadinServlet.java:417) ~[!/:8.14.0]
        at com.vaadin.server.VaadinServlet.createServletService(VaadinServlet.java:396) ~[!/:8.14.0]
        at com.vaadin.server.VaadinServlet.init(VaadinServlet.java:226) ~[!/:8.14.0]
        at org.ops4j.pax.web.service.spi.servlet.OsgiInitializedServlet.init(OsgiInitializedServlet.java:68) ~[?:?]
        at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:632) ~[?:?]
        at org.eclipse.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:486) ~[?:?]
        at org.eclipse.jetty.servlet.ServletHolder.prepare(ServletHolder.java:759) ~[?:?]
        at org.ops4j.pax.web.service.jetty.internal.PaxWebServletHolder.prepare(PaxWebServletHolder.java:295) ~[?:?]
        at org.ops4j.pax.web.service.jetty.internal.PaxWebServletHandler.doHandle(PaxWebServletHandler.java:330) ~[?:?]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[?:?]
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600) ~[?:?]
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[?:?]
        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[?:?]
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) ~[?:?]
        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[?:?]
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) ~[?:?]
        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[?:?]
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505) ~[?:?]
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) ~[?:?]
        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[?:?]
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) ~[?:?]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[?:?]
        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:234) ~[?:?]
        at org.ops4j.pax.web.service.jetty.internal.PrioritizedHandlerCollection.handle(PrioritizedHandlerCollection.java:96) ~[?:?]
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[?:?]
        at org.eclipse.jetty.server.Server.handle(Server.java:516) ~[?:?]
        at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) ~[?:?]
        at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732) ~[?:?]
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479) ~[?:?]
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) ~[?:?]
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) ~[?:?]
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) ~[?:?]
        at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) ~[?:?]
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) ~[?:?]
        at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) ~[?:?]
        at java.lang.Thread.run(Thread.java:1583) [?:?]

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions