User Tools

Site Tools


unable_to_configure_jsr356_at_that_stage._servercontainer_is_null

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

unable_to_configure_jsr356_at_that_stage._servercontainer_is_null [2017/02/14 10:06] (current)
mihael created
Line 1: Line 1:
 +====== Unable to configure jsr356 at that stage. ServerContainer is null. ======
 +
 +===== Environment =====
 +
 +  * Karaf 4.x
 +  * Vaadin 8
 +  * Java 8
 +
 +===== Error Message =====
 +
 +<​code>​
 +2017-02-14 10:​08:​26,​979 | WARN  | ender-1-thread-1 | DefaultAsyncSupportResolver ​     | 116 - com.vaadin.external.org.slf4j - 1.6.1 | Failed to create AsyncSupport class: class org.atmosphere.container.JSR356AsyncSupport,​ error: java.lang.reflect.InvocationTargetException
 +2017-02-14 10:​08:​26,​979 | ERROR | ender-1-thread-1 | DefaultAsyncSupportResolver ​     | 116 - com.vaadin.external.org.slf4j - 1.6.1 | 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)[119:​com.vaadin.external.atmosphere.runtime:​2.4.5.vaadin1]
 + at org.atmosphere.container.JSR356AsyncSupport.<​init>​(JSR356AsyncSupport.java:​40)[119:​com.vaadin.external.atmosphere.runtime:​2.4.5.vaadin1]
 + at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)[:​1.8.0_111]
 + at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:​62)[:​1.8.0_111]
 + at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:​45)[:​1.8.0_111]
 + at java.lang.reflect.Constructor.newInstance(Constructor.java:​423)[:​1.8.0_111]
 + at org.atmosphere.cpr.DefaultAsyncSupportResolver.newCometSupport(DefaultAsyncSupportResolver.java:​234)[119:​com.vaadin.external.atmosphere.runtime:​2.4.5.vaadin1]
 + at org.atmosphere.cpr.DefaultAsyncSupportResolver.resolveWebSocket(DefaultAsyncSupportResolver.java:​306)[119:​com.vaadin.external.atmosphere.runtime:​2.4.5.vaadin1]
 + at org.atmosphere.cpr.DefaultAsyncSupportResolver.resolve(DefaultAsyncSupportResolver.java:​292)[119:​com.vaadin.external.atmosphere.runtime:​2.4.5.vaadin1]
 + at org.atmosphere.cpr.AtmosphereFramework.autoDetectContainer(AtmosphereFramework.java:​2079)[119:​com.vaadin.external.atmosphere.runtime:​2.4.5.vaadin1]
 + at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:​914)[119:​com.vaadin.external.atmosphere.runtime:​2.4.5.vaadin1]
 + at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:​838)[119:​com.vaadin.external.atmosphere.runtime:​2.4.5.vaadin1]
 + at com.vaadin.server.communication.PushRequestHandler.initAtmosphere(PushRequestHandler.java:​217)[111:​com.vaadin.server:​8.0.0]
 + at com.vaadin.server.communication.PushRequestHandler.<​init>​(PushRequestHandler.java:​85)[111:​com.vaadin.server:​8.0.0]
 + at com.vaadin.server.VaadinServletService.createRequestHandlers(VaadinServletService.java:​53)[111:​com.vaadin.server:​8.0.0]
 + at tiles.web.OsgiVaadinServlet$1.createRequestHandlers(OsgiVaadinServlet.java:​35)[177:​de.sgbs.tiles.web:​3.0.0]
 + at com.vaadin.server.VaadinService.init(VaadinService.java:​195)[111:​com.vaadin.server:​8.0.0]
 + at tiles.web.OsgiVaadinServlet.createServletService(OsgiVaadinServlet.java:​41)[177:​de.sgbs.tiles.web:​3.0.0]
 + at com.vaadin.server.VaadinServlet.init(VaadinServlet.java:​227)[111:​com.vaadin.server:​8.0.0]
 + at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:​616)[88:​org.eclipse.jetty.servlet:​9.2.19.v20160908]
 + at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:​396)[88:​org.eclipse.jetty.servlet:​9.2.19.v20160908]
 + at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:​871)[88:​org.eclipse.jetty.servlet:​9.2.19.v20160908]
 + at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:​298)[88:​org.eclipse.jetty.servlet:​9.2.19.v20160908]
 + at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.startContext(HttpServiceContext.java:​601)[106:​org.ops4j.pax.web.pax-web-jetty:​4.3.0]
 + at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:​741)[87:​org.eclipse.jetty.server:​9.2.19.v20160908]
 + at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doStart(HttpServiceContext.java:​260)[106:​org.ops4j.pax.web.pax-web-jetty:​4.3.0]
 + at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:​68)[90:​org.eclipse.jetty.util:​9.2.19.v20160908]
 + at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl$1.start(JettyServerImpl.java:​279)[106:​org.ops4j.pax.web.pax-web-jetty:​4.3.0]
 + at org.ops4j.pax.web.service.internal.HttpServiceStarted.end(HttpServiceStarted.java:​1096)[108:​org.ops4j.pax.web.pax-web-runtime:​4.3.0]
 + at org.ops4j.pax.web.service.internal.HttpServiceProxy.end(HttpServiceProxy.java:​417)[108:​org.ops4j.pax.web.pax-web-runtime:​4.3.0]
 + at org.ops4j.pax.web.extender.war.internal.RegisterWebAppVisitorWC.end(RegisterWebAppVisitorWC.java:​380)[104:​org.ops4j.pax.web.pax-web-extender-war:​4.3.0]
 + at org.ops4j.pax.web.extender.war.internal.model.WebApp.accept(WebApp.java:​692)[104:​org.ops4j.pax.web.pax-web-extender-war:​4.3.0]
 + at org.ops4j.pax.web.extender.war.internal.WebAppPublisher$WebAppDependencyListener.register(WebAppPublisher.java:​237)[104:​org.ops4j.pax.web.pax-web-extender-war:​4.3.0]
 + at org.ops4j.pax.web.extender.war.internal.WebAppPublisher$WebAppDependencyListener.addingService(WebAppPublisher.java:​182)[104:​org.ops4j.pax.web.pax-web-extender-war:​4.3.0]
 + at org.ops4j.pax.web.extender.war.internal.WebAppPublisher$WebAppDependencyListener.addingService(WebAppPublisher.java:​135)[104:​org.ops4j.pax.web.pax-web-extender-war:​4.3.0]
 + at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:​941)[org.osgi.core-6.0.0.jar:​]
 + at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:​870)[org.osgi.core-6.0.0.jar:​]
 + at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:​256)[org.osgi.core-6.0.0.jar:​]
 + at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:​183)[org.osgi.core-6.0.0.jar:​]
 + at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:​318)[org.osgi.core-6.0.0.jar:​]
 + at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:​261)[org.osgi.core-6.0.0.jar:​]
 + at org.ops4j.pax.web.extender.war.internal.WebAppPublisher.publish(WebAppPublisher.java:​101)[104:​org.ops4j.pax.web.pax-web-extender-war:​4.3.0]
 + at org.ops4j.pax.web.extender.war.internal.WebObserver.deploy(WebObserver.java:​219)[104:​org.ops4j.pax.web.pax-web-extender-war:​4.3.0]
 + at org.ops4j.pax.web.extender.war.internal.WebObserver$1.doStart(WebObserver.java:​179)[104:​org.ops4j.pax.web.pax-web-extender-war:​4.3.0]
 + at org.ops4j.pax.web.extender.war.internal.extender.SimpleExtension.start(SimpleExtension.java:​59)[104:​org.ops4j.pax.web.pax-web-extender-war:​4.3.0]
 + at org.ops4j.pax.web.extender.war.internal.extender.AbstractExtender$1.run(AbstractExtender.java:​281)[104:​org.ops4j.pax.web.pax-web-extender-war:​4.3.0]
 + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:​511)[:​1.8.0_111]
 + at java.util.concurrent.FutureTask.run(FutureTask.java:​266)[:​1.8.0_111]
 + at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:​180)[:​1.8.0_111]
 + at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:​293)[:​1.8.0_111]
 + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:​1142)[:​1.8.0_111]
 + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:​617)[:​1.8.0_111]
 + at java.lang.Thread.run(Thread.java:​745)[:​1.8.0_111]
 +2017-02-14 10:​08:​26,​982 | WARN  | ender-1-thread-1 | DefaultAsyncSupportResolver ​     | 116 - com.vaadin.external.org.slf4j - 1.6.1 | Found multiple containers, please specify which one to use: org.atmosphere.container.Jetty7CometSupport,​ org.atmosphere.container.Jetty7CometSupport, ​ until you do, Atmosphere will use:class org.atmosphere.container.Jetty7CometSupport
 +</​code>​
 +
 +===== Workaround =====
 +
 +Set the Servlet init parameter //​org.atmosphere.websocket.suppressJSR356//​ to ''​true''​ like
 +
 +    <​init-param>​
 +        <​param-name>​org.atmosphere.websocket.suppressJSR356</​param-name>​
 +        <​param-value>​true</​param-value>​
 +    </​init-param>​
 +
 +{{tag>​vaadin osgi karaf java}}
  
unable_to_configure_jsr356_at_that_stage._servercontainer_is_null.txt ยท Last modified: 2017/02/14 10:06 by mihael