Error happen when I update vaadin 7.5 to 8.0.5

Apr 21, 2017 5:53:24 PM org.atmosphere.cpr.AtmosphereFramework initWebSocket
INFO: Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol
Apr 21, 2017 5:53:24 PM org.atmosphere.cpr.DefaultAsyncSupportResolver newCometSupport
WARNING: Failed to create AsyncSupport class: class org.atmosphere.container.JSR356AsyncSupport, error: java.lang.reflect.InvocationTargetException
Apr 21, 2017 5:53:24 PM org.atmosphere.cpr.DefaultAsyncSupportResolver newCometSupport
SEVERE: 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.(JSR356AsyncSupport.java:51)
at org.atmosphere.container.JSR356AsyncSupport.(JSR356AsyncSupport.java:40)
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:234)
at org.atmosphere.cpr.DefaultAsyncSupportResolver.resolveWebSocket(DefaultAsyncSupportResolver.java:306)
at org.atmosphere.cpr.DefaultAsyncSupportResolver.resolve(DefaultAsyncSupportResolver.java:292)
at org.atmosphere.cpr.AtmosphereFramework.autoDetectContainer(AtmosphereFramework.java:2079)
at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:914)
at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:838)
at com.vaadin.server.communication.PushRequestHandler.initAtmosphere(PushRequestHandler.java:216)
at com.vaadin.server.communication.PushRequestHandler.(PushRequestHandler.java:84)
at com.vaadin.server.VaadinServletService.createRequestHandlers(VaadinServletService.java:53)
at com.vaadin.server.VaadinService.init(VaadinService.java:194)
at com.vaadin.server.VaadinServlet.createServletService(VaadinServlet.java:334)
at com.vaadin.server.VaadinServlet.init(VaadinServlet.java:228)
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.ServletContextHandler.startContext(ServletContextHandler.java:349)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1404)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1366)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:772)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:262)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:520)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
at org.eclipse.jetty.server.Server.start(Server.java:411)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:106)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
at org.eclipse.jetty.server.Server.doStart(Server.java:378)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
32312.jpg

I think this may be related to change made already in Vaadin 7.7. The dependencies in client were re-organized a bit. It may be that due to wrong imports and use of dependent libraries, you have gwt-dev been deployed in your application. It includes jetty, which is used for superdevmode. In your case you get this error, because wrong version of jetty is used. Check that vaadin-client dependency is used as provided.

Thank you for your answer. I knew the problem was caused by the wrong version of jetty.But I download the vaadin-all-8.0.5.zip, and used the jetty jars in vaadin-all-8.0.5.zip to replace my project’s jetty jars. error still happen. The most difficult thing is: I can’t tell the exact version of jetty from the jetty jars in vaadin-all-8.0.5.zip.Some jetty jars use 9.2.9 like jetty-io-9.2.9.v20150224.jar. Some jetty jars use 9.2.14 like jetty-jndi-9.2.14.v20151106.jar.

It should go other way. You should not let it use the jetty from Vaadin.

Please ensure that the scope of vaadin-client and vaadin-client-compiler is “provided”.

    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-client</artifactId>
        <scope>provided</scope>
    </dependency>

Thank you.
In my project still needs vaadin7 API,maybe this one is better:

com.vaadin
vaadin-compatibility-server
8.0.0

But How can konw what version of jetty should I integrate to my project?

I’ve got the same issue, any resolution on this?

I recover my project back to vaadin 7.5.No time for this problem recently.

Do you have any update on this issue?

Yes. My three years old project use Ant. Unable to update vaadin to 8.0.5 easily because of the version of jetty.

If you use Ant, you need to configure the build script so that Vaadin jars that include Jetty are not being packaged to war. Then wrong jetty is not included in deployment and executed accidentally.

Same problem.

WARNING: Failed to create AsyncSupport class: class org.atmosphere.container.JSR356AsyncSupport, error: java.lang.reflect.InvocationTargetException сен 15, 2017 11:57:41 AM org.atmosphere.cpr.DefaultAsyncSupportResolver newCometSupport SEVERE: 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:51) at org.atmosphere.container.JSR356AsyncSupport.<init>(JSR356AsyncSupport.java:40) 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:422) at org.atmosphere.cpr.DefaultAsyncSupportResolver.newCometSupport(DefaultAsyncSupportResolver.java:237) at org.atmosphere.cpr.DefaultAsyncSupportResolver.resolveWebSocket(DefaultAsyncSupportResolver.java:308) at org.atmosphere.cpr.DefaultAsyncSupportResolver.resolve(DefaultAsyncSupportResolver.java:294) at org.atmosphere.cpr.AtmosphereFramework.autoDetectContainer(AtmosphereFramework.java:2080) at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:914) at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:838 Using:
<jetty.version>9.3.20.v20170531</jetty.version>

        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-servlet</artifactId>
            <version>${jetty.version}</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-continuation</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-server</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty.websocket</groupId>
            <artifactId>websocket-server</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty.websocket</groupId>
            <artifactId>javax-websocket-server-impl</artifactId>
            <version>${jetty.version}</version>
        </dependency>
       <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-server</artifactId>
            <version>${vaadin.version}</version>
        </dependency>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-client</artifactId>
            <version>${vaadin.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-client-compiler</artifactId>
            <version>${vaadin.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-client-compiled</artifactId>
            <version>${vaadin.version}</version>
        </dependency>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-themes</artifactId>
            <version>${vaadin.version}</version>
        </dependency>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-push</artifactId>
            <version>${vaadin.version}</version>
        </dependency>

[code]
@Title(“wwwq”)
@Theme(“tests-valo-dark”)
@Push(value = PushMode.AUTOMATIC)
public class ReceiveOrderVaadinUI extends UI {

@WebServlet(value = "/*", asyncSupported = true)
@VaadinServletConfiguration(productionMode = false, ui = ReceiveOrderVaadinUI.class)
public static class Servlet extends VaadinServlet {
}

[/code]I accessing servlet with url path:
https://192.168.0.70:8443/weboperator/

Yes.Vaadin jars that include Jetty are not being packaged to war. But I don’t know what jetty jars I can use.

Please provide some demo-project with Jetty embedded and PUSH realized without that “java.lang.IllegalStateException: Unable to configure jsr356 at that stage. ServerContainer is null” problem.

The same problem using vaadin 14 with wildfly.

Any solution?

17:49:12,597 WARN  [com.vaadin.flow.server.communication.JSR356WebsocketInitializer]
 (ServerService Thread Pool -- 138) Failed to initialize Atmosphere for Vaadin Servlet: java.lang.RuntimeException: Atmosphere init failed
	at com.vaadin.flow.server.communication.PushRequestHandler.initAtmosphere(PushRequestHandler.java:227)
	at com.vaadin.flow.server.communication.JSR356WebsocketInitializer.initAtmosphereForVaadinServlet(JSR356WebsocketInitializer.java:184)
	at com.vaadin.flow.server.communication.JSR356WebsocketInitializer.init(JSR356WebsocketInitializer.java:149)
	at com.vaadin.flow.server.communication.JSR356WebsocketInitializer.contextInitialized(JSR356WebsocketInitializer.java:118)
	at com.vaadin.flow.server.startup.ServletContextListeners.contextInitialized(ServletContextListeners.java:42)
	at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187)
	at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:217)
	at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:186)
	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
	at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1504)
	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1504)
	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1504)
	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1504)
	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1504)
	at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:252)
	at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:96)
	at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:78)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266)
	at java.util.concurrent.FutureTask.run(FutureTask.java)
	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
	at java.lang.Thread.run(Thread.java:748)
	at org.jboss.threads.JBossThread.run(JBossThread.java:485)
Caused by: javax.servlet.ServletException: java.lang.IllegalStateException: Unable to configure jsr356 at that stage
	at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:955)
	at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:838)
	at com.vaadin.flow.server.communication.PushRequestHandler.initAtmosphere(PushRequestHandler.java:218)
	... 27 more
Caused by: java.lang.IllegalStateException: Unable to configure jsr356 at that stage
	at org.atmosphere.util.IOUtils.guestRawServletPath(IOUtils.java:297)
	at org.atmosphere.util.IOUtils.guestServletPath(IOUtils.java:255)
	at org.primefaces.push.impl.PushEndpointMapper.configure(PushEndpointMapper.java:47)
	at org.atmosphere.cpr.AtmosphereFramework.initEndpointMapper(AtmosphereFramework.java:1791)
	at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:911)
	... 29 more