Atmosphere / atmosphere

Event Driven WebSockets Framework with Cross-Browser Fallbacks
http://async-io.org/
3.69k stars 750 forks source link

[WebLogic] jsr356 support broken #1856

Closed jfarcand closed 9 years ago

jfarcand commented 9 years ago

jsr356 doesn't initialize properly on WebLogic 12.1.3.0 and fallback to 'BlockingIO' which is quite bad.

jfarcand commented 9 years ago

Should workaround the WebLogic issue with #1854

tapioaali commented 9 years ago

I'm still getting IllegalStateException: Not in 'deploy' scope when doing call

container.addEndpoint(ServerEndpointConfig.Builder.create(JSR356Endpoint.class, b.toString()).configurator(configurator).build());

at JSR356AsyncSupport with Weblogic 12.1.3. Any idea what causes that?

tapioaali commented 9 years ago

Also getting error

<Error> <HTTP> <BEA-101388> <The ServletContext was passed to the ServletContextListener.contextInitialized method of a ServletContextListener that was neither declared in web.xml or web-fragment.xml, nor annotated with javax.servlet.annotation.WebListener.> 

Could this be related?

jfarcand commented 9 years ago

@tjkaal How are you testing? Have you set the 'org.atmosphere.servletvalue in web.xml or is yourservlet-nameset toAtmosphere`? Please take a look at the commit fro a better understaing.

Artur- commented 9 years ago

Looks to me like WebLogic does not allow adding JSR356 websocket endpoints in Servlet.init (https://java.net/jira/browse/TYRUS-255).

With Atmosphere-sample master, the chat sample now fails with

weblogic.application.ModuleException: java.lang.IllegalStateException: ServerContainer is null. Make sure you are using JDK7 and your server has websocket support enabled at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140) at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:216) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:211) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42) Truncated. see log file for complete stacktrace Caused By: java.lang.IllegalStateException: ServerContainer is null. Make sure you are using JDK7 and your server has websocket support enabled at org.atmosphere.container.JSR356AsyncSupport.(JSR356AsyncSupport.java:43) at org.atmosphere.cpr.AtmosphereInitializer.onStartup(AtmosphereInitializer.java:68) at weblogic.servlet.internal.WebAppServletContext.initContainerInitializer(WebAppServletContext.java:1373) at weblogic.servlet.internal.WebAppServletContext.initContainerInitializers(WebAppServletContext.java:1331) at weblogic.servlet.internal.WebAppServletContext.initContainerInitializers(WebAppServletContext.java:1317)

jfarcand commented 9 years ago

@Artur- It just works for me as this code is never executed, the endpoint is initialized inside AtmosphereInitializer class. Are you sure you have the latest 2.3.0-SNAPSHOT

starting weblogic with Java version:
Listening for transport dt_socket at address: 9009
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
Starting WLS with line:
/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java  -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=9009,server=y,suspend=n -Djava.compiler=NONE  -Xms512m -Xmx512m -Dweblogic.Name=myserver -Djava.security.policy=/containers/wls12130/wlserver/server/lib/weblogic.policy   -Djava.endorsed.dirs=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/endorsed:/containers/wls12130/wlserver/../oracle_common/modules/endorsed  -ea -da:com.bea... -da:javelin... -da:weblogic... -ea:com.bea.wli... -ea:com.bea.broker... -ea:com.bea.sbconsole... -Dwls.home=/containers/wls12130/wlserver/server -Dweblogic.home=/containers/wls12130/wlserver/server     -Dweblogic.utils.cmm.lowertier.ServiceDisabled=true  weblogic.Server
Listening for transport dt_socket at address: 9009
<12-Feb-2015 8:23:55 o'clock AM EST> <Info> <Security> <BEA-090905> <Disabling the CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true.>
<12-Feb-2015 8:23:55 o'clock AM EST> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG128 to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true.>
<12-Feb-2015 8:23:56 o'clock AM EST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 25.25-b02 from Oracle Corporation.>
<12-Feb-2015 8:23:56 o'clock AM EST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 12.1.3.0.0  Tue Jan 27 02:49:44 UTC 2015 1654890 >
<12-Feb-2015 8:23:58 o'clock AM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.>
<12-Feb-2015 8:23:58 o'clock AM EST> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool.>
<12-Feb-2015 8:23:58 o'clock AM EST> <Info> <WorkManager> <BEA-002942> <CMM memory level becomes 0. Setting standby thread pool size to 256.>
<Feb 12, 2015 8:23:58 AM EST> <Notice> <Log Management> <BEA-170019> <The server log file /Users/jfarcand/workspace/containers/wls12130/user_projects/domains/mydomain/servers/myserver/logs/myserver.log is opened. All server side log events will be written to this file.>
<Feb 12, 2015 8:23:59 AM EST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
<Feb 12, 2015 8:24:00 AM EST> <Warning> <Store> <BEA-280109> <The JVM was unable to load the native wlfileio library for the store "_WLS_myserver". File and paging stores will continue to function correctly. Specifically, file stores that are configured with a transactionally safe synchronous write policy will continue to operate safely and transactionally but may open with a different write-policy. Other store types may not be able to open.>
<Feb 12, 2015 8:24:01 AM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY.>
<Feb 12, 2015 8:24:01 AM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.>
Feb 12, 2015 8:24:01 AM weblogic.wsee.WseeCoreMessages logWseeServiceStarting
INFO: The Wsee Service is starting
<Feb 12, 2015 8:24:01 AM EST> <Notice> <Log Management> <BEA-170027> <The server has successfully established a connection with the Domain level Diagnostic Service.>
<Feb 12, 2015 8:24:01 AM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN.>
<Feb 12, 2015 8:24:01 AM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING.>
<Feb 12, 2015 8:24:01 AM EST> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 10.0.1.10:7001 for protocols iiop, t3, ldap, snmp, http.>
<Feb 12, 2015 8:24:01 AM EST> <Notice> <Server> <BEA-002613> <Channel "Default[2]" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, snmp, http.>
<Feb 12, 2015 8:24:01 AM EST> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 0:0:0:0:0:0:0:1:7001 for protocols iiop, t3, ldap, snmp, http.>
<Feb 12, 2015 8:24:01 AM EST> <Warning> <Server> <BEA-002611> <The hostname "localhost", maps to multiple IP addresses: 127.0.0.1, 0:0:0:0:0:0:0:1.>
<Feb 12, 2015 8:24:01 AM EST> <Notice> <WebLogicServer> <BEA-000331> <Started the WebLogic Server Administration Server "myserver" for domain "mydomain" running in development mode.>
<Feb 12, 2015 8:24:01 AM EST> <Notice> <WebLogicServer> <BEA-000360> <The server started in RUNNING mode.>
<Feb 12, 2015 8:24:01 AM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING.>
Feb 12, 2015 8:24:26 AM org.atmosphere.container.JSR356AsyncSupport <init>
INFO: JSR 356 Mapping path /{path}
<Feb 12, 2015 8:24:26 AM EST> <Error> <HTTP> <BEA-101388> <The ServletContext was passed to the ServletContextListener.contextInitialized method of a ServletContextListener that was neither declared in web.xml or web-fragment.xml, nor annotated with javax.servlet.annotation.WebListener.>
Feb 12, 2015 8:24:26 AM org.atmosphere.cpr.AtmosphereServlet configureFramework
WARNING: WebLogic 12c unable to retrieve Servlet. Please make sure your servlet-name is 'AtmosphereServlet' or set org.atmosphere.servlet to the current value
<Feb 12, 2015 8:24:26 AM EST> <Warning> <org.atmosphere.cpr.AtmosphereServlet> <BEA-000000> <WebLogic 12c unable to retrieve Servlet. Please make sure your servlet-name is 'AtmosphereServlet' or set org.atmosphere.servlet to the current value>
Feb 12, 2015 8:24:26 AM org.atmosphere.util.IOUtils readServiceFile
INFO: META-INF/services/org.atmosphere.cpr.AtmosphereFramework not found in class loader
Feb 12, 2015 8:24:26 AM org.atmosphere.cpr.AtmosphereFramework autoConfigureService
INFO: Atmosphere is using org.atmosphere.cpr.DefaultAnnotationProcessor for processing annotation
Feb 12, 2015 8:24:26 AM org.atmosphere.cpr.DefaultAnnotationProcessor configure
INFO: AnnotationProcessor class org.atmosphere.cpr.DefaultAnnotationProcessor$ServletContainerInitializerAnnotationProcessor being used
Feb 12, 2015 8:24:26 AM org.atmosphere.cpr.AnnotationHandler handleAnnotation
INFO: Found Annotation in class org.atmosphere.samples.chat.Chat being scanned: interface org.atmosphere.config.service.ManagedService
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework addAtmosphereHandler
INFO: Installed AtmosphereHandler org.atmosphere.config.managed.ManagedAtmosphereHandler mapped to context-path /chat and Broadcaster Class org.atmosphere.cpr.DefaultBroadcaster
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework addAtmosphereHandler
INFO: Installed AtmosphereInterceptor [@ManagedService Interceptor, Atmosphere LifeCycle,  Track Message Size Interceptor using |, UUID Tracking Interceptor] mapped to AtmosphereHandler org.atmosphere.config.managed.ManagedAtmosphereHandler
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AnnotationHandler handleAnnotation
INFO: Found Annotation in class org.atmosphere.samples.chat.Chat being scanned: interface org.atmosphere.samples.chat.custom.Config
Feb 12, 2015 8:24:27 AM org.atmosphere.samples.chat.custom.SampleConfig handle
INFO: Custom annotation @org.atmosphere.samples.chat.custom.Config() discovered. Starting the Chat Sample
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AnnotationHandler handleAnnotation
INFO: Found Annotation in class org.atmosphere.samples.chat.custom.SampleConfig being scanned: interface org.atmosphere.config.AtmosphereAnnotation
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.DefaultAnnotationProcessor$ServletContainerInitializerAnnotationProcessor scanForCustomAnnotation
WARNING: Unable to scan using File. Scanning classpath
<Feb 12, 2015 8:24:27 AM EST> <Warning> <org.atmosphere.cpr.DefaultAnnotationProcessor> <BEA-000000> <Unable to scan using File. Scanning classpath>
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework autoDetectWebSocketHandler
INFO: Auto detecting WebSocketHandler in /WEB-INF/classes/
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework initWebSocket
INFO: Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework configureAtmosphereInterceptor
INFO: Installing Default AtmosphereInterceptors
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.CorsInterceptor : CORS Interceptor Support
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.CacheHeadersInterceptor : Default Response's Headers Interceptor
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.PaddingAtmosphereInterceptor : Browser Padding Interceptor Support
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.AndroidAtmosphereInterceptor : Android Interceptor Support
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.HeartbeatInterceptor : Heartbeat Interceptor Support
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.SSEAtmosphereInterceptor : SSE Interceptor Support
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.JSONPAtmosphereInterceptor : JSONP Interceptor Support
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.JavaScriptProtocol : Atmosphere JavaScript Protocol
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor : org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.OnDisconnectInterceptor : Browser disconnection detection
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework newAInterceptor
INFO:   org.atmosphere.interceptor.IdleResourceInterceptor : org.atmosphere.interceptor.IdleResourceInterceptor
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework configureAtmosphereInterceptor
INFO: Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults to disable them.
Feb 12, 2015 8:24:27 AM org.atmosphere.interceptor.HeartbeatInterceptor configure
INFO: HeartbeatInterceptor configured with padding value 'X', client frequency 60 seconds and server frequency 10 seconds
Feb 12, 2015 8:24:27 AM org.atmosphere.interceptor.IdleResourceInterceptor start
INFO: IdleResourceInterceptor started with idle timeout set to 120000
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Using EndpointMapper class org.atmosphere.util.DefaultEndpointMapper
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Using BroadcasterCache: org.atmosphere.cache.UUIDBroadcasterCache
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Default Broadcaster Class: org.atmosphere.cpr.DefaultBroadcaster
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Broadcaster Polling Wait Time 100
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Shared ExecutorService supported: true
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Messaging Thread Pool Size: Unlimited
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Async I/O Thread Pool Size: 200
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Using AtmosphereResurceFactory: org.atmosphere.cpr.DefaultAtmosphereResourceFactory
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Invoke AtmosphereInterceptor on WebSocket message true
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: HttpSession supported: false
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Atmosphere is using org.atmosphere.inject.InjectableObjectFactory for dependency injection and object creation
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Atmosphere is using async support: org.atmosphere.container.JSR356AsyncSupport running under container: WebLogic Server 12.1.3.0.0 Tue Jan 27 02:49:44 UTC 2015 1654890 Oracle WebLogic Server Module Dependencies 12.1 Tue Mar 11 15:35:15 MDT 2014 WebLogic Jersey Server Integration 3.0 Fri Feb 21 10:55:11 UTC 2014  using javax.servlet/3.0 and jsr356/WebSocket API
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework info
INFO: Atmosphere Framework 2.3.0-SNAPSHOT started.
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework info
INFO:

    For Atmosphere Framework Commercial Support, visit
    http://www.async-io.org/ or send an email to support@async-io.org

Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework$5 run
INFO: Latest version of Atmosphere's JavaScript Client 2.2.7
Feb 12, 2015 8:24:27 AM org.atmosphere.cpr.AtmosphereFramework$5 run
INFO:

    Current version of Atmosphere 2.3.0-SNAPSHOT
    Newest version of Atmosphere available 2.2.5

Feb 12, 2015 8:24:43 AM org.atmosphere.samples.chat.Chat onReady
INFO: Browser af4f10fc-346b-4ad1-ad8c-25de21950fe5 connected
Feb 12, 2015 8:24:43 AM org.atmosphere.samples.chat.Chat onReady
INFO: BroadcasterFactory used org.atmosphere.cpr.DefaultBroadcasterFactory
Feb 12, 2015 8:24:45 AM org.atmosphere.samples.chat.Chat onMessage
INFO: dsa just send dsa
Feb 12, 2015 8:24:45 AM org.atmosphere.samples.chat.Chat onMessage
INFO: dsa just send das
Feb 12, 2015 8:24:45 AM org.atmosphere.samples.chat.Chat onMessage
jfarcand commented 9 years ago

@anantagarwal Please use the mailing list for question https://groups.google.com/group/atmosphere-framework?pli=1

jfarcand commented 9 years ago

@pavelbucek Since I have you :-), why WebLogic 12.1.3.0.0 mandates JDK8+ for jsr356? Without JDK8 it always fails with:

<Apr 17, 2015 9:54:31 AM EDT> <Error> <Deployer> <BEA-149231> <Unable to set the activation state to true for the application "atmosphere-chat".
weblogic.application.ModuleException: java.lang.IllegalStateException: ServerContainer is null. Make sure you are using 1.8+ and your server has websocket support enabled
    at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140)
    at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:216)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:211)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
    Truncated. see log file for complete stacktrace
Caused By: java.lang.IllegalStateException: ServerContainer is null. Make sure you are using 1.8+ and your server has websocket support enabled
    at org.atmosphere.container.JSR356AsyncSupport.<init>(JSR356AsyncSupport.java:48)
    at org.atmosphere.cpr.AtmosphereInitializer.onStartup(AtmosphereInitializer.java:77)
    at weblogic.servlet.internal.WebAppServletContext.initContainerInitializer(WebAppServletContext.java:1373)
    at weblogic.servlet.internal.WebAppServletContext.initContainerInitializers(WebAppServletContext.java:1331)
    at weblogic.servlet.internal.WebAppServletContext.initContainerInitializers(WebAppServletContext.java:1317)
    Truncated. see log file for complete stacktrace
pavelbucek commented 9 years ago

I don't think that this message is produced by WLS - it certainly look suspicious.

And it should not require JDK 8 to run, from what I recall, WLS 12.1.3 is certified on JDK 1.7 .. hmm.. the requirement somehow comes from here: https://github.com/Atmosphere/atmosphere/blob/d45e8e19a907c931129576e11220d5b3904e48a9/modules/cpr/src/main/java/org/atmosphere/container/JSR356AsyncSupport.java#L44 .. I don't think it has to be there.

jfarcand commented 9 years ago

@pavelbucek The issue is the following with 12.1.3 0. When org.atmosphere.cpr.ContainerInitializer gets called, the javax.websocket.server.ServerContainer is null with JDK 1.7

<Apr 17, 2015 10:11:23 AM EDT> <Error> <ServletContext-/atmosphere-chat> <BEA-000000> <Unable to initialize websocket support
java.lang.IllegalStateException: javax.websocket.server.ServerContainer is null. Make sure you are using 1.8+ and your server has websocket support enabled
    at org.atmosphere.container.JSR356AsyncSupport.<init>(JSR356AsyncSupport.java:53)
    at org.atmosphere.cpr.ContainerInitializer.onStartup(ContainerInitializer.java:74)
    at weblogic.servlet.internal.WebAppServletContext.initContainerInitializer(WebAppServletContext.java:1373)
    at weblogic.servlet.internal.WebAppServletContext.initContainerInitializers(WebAppServletContext.java:1331)
    at weblogic.servlet.internal.WebAppServletContext.initContainerInitializers(WebAppServletContext.java:1317)
    Truncated. see log file for complete stacktrace

Then later in the deployment Atmosphere will try again, but this time will get a valid instance of javax.websocket.server.ServerContainer, but will fail with

Caused By: java.lang.IllegalStateException: Not in 'deploy' scope.
    at org.glassfish.tyrus.server.TyrusServerContainer.addEndpoint(TyrusServerContainer.java:192)
    at org.atmosphere.container.JSR356AsyncSupport.<init>(JSR356AsyncSupport.java:76)
    at org.atmosphere.container.JSR356AsyncSupport.<init>(JSR356AsyncSupport.java:40)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    Truncated. see log file for complete stacktrace

Please note that with JDK 8 it works, so there are clearly an issue with 1.7, hence that's why I've put the warning.

jfarcand commented 9 years ago

@pavelbucek Try it yourself by just dropping this war. Will works with 1.8, fail with 1.7 . Clearly the javax.websocket.server.ServerContainer is not properly set with 1.7

jfarcand commented 9 years ago

@anantagarwal Working for you :-)

pavelbucek commented 9 years ago

sorry, I don't have 12.1.3 installed right now and I have other things I have to do.. anyway, my guess is that it might be related to ordering of Servlet filters registration - you should be able to check that during your ServletContextInitializer#onStartup invocation (ctx.getFilterRegistrations etc..). If your filter is registered (initialized to be exact) before TyrusServletFilter, then that is your issue.

I have no clue why this would be related to used JDK, but.. there were some (lots) of changes in collections and maybe it could introduce changes in ordering..

jfarcand commented 9 years ago

@pavelbucek OK thanks anyway. You don't install your own food? If I had the choice I won't either :-)

That's clearly an ordering bug in WebLogic and unfortunately nothing can be done from Atmosphere.

pavelbucek commented 9 years ago

that's not fair ;) I do have devel env with 12.2.1 set up, but that most likely won't reproduce this issue..

as for the conclusion - it might be it, I wouldn't do definitive statements before further testing. Atmosphere can deal with it, but it wouldn't be nice. You just need to make sure that the Atmosphere filter is registered after Tyrus filter. Or you can rewrite websocket endpoints registration to use javax.websocket.server.ServerApplicationConfig. It can be dynamic in very similar fashion as the feature you are using - #getEndpointConfigs is invoked when the app/filter is initialized.

jfarcand commented 9 years ago

@pavelbucek Atmosphere is deployed as a Servlet not a Filter. And also since it is only broken on WebLogic I won't touch that code :-)