-
-
Notifications
You must be signed in to change notification settings - Fork 754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NPE When using long-polling with tomcat7 - reproduce with gwt-20-managed-rpc #1849
Comments
I've seen that the exception is catched but client does'nt receive the message. |
It's is easy to reproduce Thanks |
@jimmyjim The message will be cached. Please make sure you properly configured. |
For the configuration, i follow this documentation i've tried the 2 implementations of cache too reading this page https://github.com/Atmosphere/atmosphere/wiki/Understanding-BroadcasterCache I'm searching for 3 days ! |
Here The trace, i see warning telling atmosphereresource is not suspended. but in the managedservice, there is a SuspendTrackerInterceptor.class Infos: Déploiement de l'archive /home/jim/Applications/apache-tomcat-7.0.23/webapps/gwt20-managed-rpc.war de l'application web
15:57:39.351 [pool-2-thread-3] INFO org.atmosphere.util.IOUtils - META-INF/services/org.atmosphere.cpr.AtmosphereFramework not found in class loader
15:57:39.361 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - Atmosphere is using org.atmosphere.cpr.DefaultAnnotationProcessor for processing annotation
15:57:39.361 [pool-2-thread-3] INFO o.a.cpr.DefaultAnnotationProcessor - AnnotationProcessor class org.atmosphere.cpr.DefaultAnnotationProcessor$ServletContainerInitializerAnnotationProcessor being used
15:57:39.362 [pool-2-thread-3] INFO org.atmosphere.cpr.AnnotationHandler - Found Annotation in class org.atmosphere.samples.server.ManagedGWTResource being scanned: interface org.atmosphere.config.service.ManagedService
15:57:39.372 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereHandler org.atmosphere.config.managed.ManagedAtmosphereHandler mapped to context-path /GwtRpcDemo/atmosphere/rpc and Broadcaster Class org.atmosphere.cpr.DefaultBroadcaster
15:57:39.372 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor [@ManagedService Interceptor, Atmosphere LifeCycle, Track Message Size Interceptor using |, UUID Tracking Interceptor, Atmosphere LifeCycle, Track Message Size Interceptor using |, org.atmosphere.gwt20.server.GwtRpcInterceptor@49922f9e, UUID Tracking Interceptor, org.atmosphere.gwt20.managed.AtmosphereMessageInterceptor] mapped to AtmosphereHandler org.atmosphere.config.managed.ManagedAtmosphereHandler
15:57:39.374 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - Auto detecting WebSocketHandler in /WEB-INF/classes/
15:57:39.377 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol
15:57:39.379 [pool-2-thread-3] WARN o.a.cpr.DefaultAsyncSupportResolver - Found multiple containers, please specify which one to use: org.atmosphere.container.Tomcat7CometSupport, org.atmosphere.container.TomcatCometSupport, until you do, Atmosphere will use:class org.atmosphere.container.Tomcat7CometSupport
15:57:39.380 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - Installing Default AtmosphereInterceptors
15:57:39.381 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - org.atmosphere.interceptor.CorsInterceptor : CORS Interceptor Support
15:57:39.381 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - org.atmosphere.interceptor.CacheHeadersInterceptor : Default Response's Headers Interceptor
15:57:39.381 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - org.atmosphere.interceptor.PaddingAtmosphereInterceptor : Browser Padding Interceptor Support
15:57:39.381 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - org.atmosphere.interceptor.AndroidAtmosphereInterceptor : Android Interceptor Support
15:57:39.382 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - org.atmosphere.interceptor.HeartbeatInterceptor : Heartbeat Interceptor Support
15:57:39.382 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - org.atmosphere.interceptor.SSEAtmosphereInterceptor : SSE Interceptor Support
15:57:39.382 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - org.atmosphere.interceptor.JSONPAtmosphereInterceptor : JSONP Interceptor Support
15:57:39.382 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - org.atmosphere.interceptor.JavaScriptProtocol : Atmosphere JavaScript Protocol
15:57:39.382 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor : org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor
15:57:39.383 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - org.atmosphere.interceptor.OnDisconnectInterceptor : Browser disconnection detection
15:57:39.383 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - org.atmosphere.interceptor.IdleResourceInterceptor : org.atmosphere.interceptor.IdleResourceInterceptor
15:57:39.383 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults to disable them.
15:57:39.383 [pool-2-thread-3] INFO o.a.interceptor.HeartbeatInterceptor - HeartbeatInterceptor configured with padding value 'X', client frequency 60 seconds and server frequency 0 seconds
15:57:39.384 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - Using EndpointMapper class org.atmosphere.util.DefaultEndpointMapper
15:57:39.384 [Thread-7] DEBUG o.atmosphere.cpr.AtmosphereFramework - Retrieving Atmosphere's latest version from http://async-io.org/version.html
15:57:39.384 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - Using BroadcastFilter: org.atmosphere.gwt20.managed.AtmosphereMessageFilterEncoder
15:57:39.384 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - Using BroadcasterCache: org.atmosphere.cache.UUIDBroadcasterCache
15:57:39.384 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - Default Broadcaster Class: org.atmosphere.cpr.DefaultBroadcaster
15:57:39.384 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - Broadcaster Polling Wait Time 100
15:57:39.384 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - Shared ExecutorService supported: true
15:57:39.385 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - Messaging Thread Pool Size: Unlimited
15:57:39.385 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - Async I/O Thread Pool Size: 200
15:57:39.385 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory
15:57:39.385 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - Using AtmosphereResurceFactory: org.atmosphere.cpr.DefaultAtmosphereResourceFactory
15:57:39.385 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor
15:57:39.386 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - Invoke AtmosphereInterceptor on WebSocket message true
15:57:39.386 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - HttpSession supported: false
15:57:39.386 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - Atmosphere is using DefaultAtmosphereObjectFactory for dependency injection and object creation
15:57:39.386 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - Atmosphere is using async support: org.atmosphere.container.Tomcat7CometSupport running under container: Apache Tomcat/7.0.23
15:57:39.387 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework - Atmosphere Framework 2.3.0-SNAPSHOT started.
15:57:39.387 [pool-2-thread-3] INFO o.atmosphere.cpr.AtmosphereFramework -
For Atmosphere Framework Commercial Support, visit
http://www.async-io.org/ or send an email to support@async-io.org
15:57:39.387 [pool-2-thread-3] INFO org.atmosphere.cpr.AtmosphereServlet - AtmosphereServlet with native support for Tomcat 6/7 and JBossWeb Installed.
15:57:39.836 [Thread-7] INFO o.atmosphere.cpr.AtmosphereFramework - Latest version of Atmosphere's JavaScript Client 2.2.6
15:57:39.837 [Thread-7] INFO o.atmosphere.cpr.AtmosphereFramework -
Current version of Atmosphere 2.3.0-SNAPSHOT
Newest version of Atmosphere available 2.2.4
15:57:39.844 [Thread-7] DEBUG o.a.util.analytics.HTTPGetMethod - Sending Server's information to Atmosphere's Google Analytics http://www.google-analytics.com/__utm.gif?utmwv=1&utmn=1915412866&utmcs=UTF-8&utmsr=1440x900&utmsc=32-bit&utmul=en-us&utmje=1&utmfl=9.0%20%20r28&utmcr=1&utmdt=gwt2-2.3.0-SNAPSHOT-Apache+Tomcat%2F7.0.23&utmhn=jim-inovelan&utmr=http://async-io.org&utmp=/gwt2/2.3.0-SNAPSHOT/Apache+Tomcat%2F7.0.23&utmac=UA-31990725-1&utmcc=__utma%3D'-1254132183.2064402984.1422975459844.1422975459844.1422975459844.2%3B%2B__utmb%3D-1254132183%3B%2B__utmc%3D-1254132183%3B%2B__utmz%3D-1254132183.1422975459844.2.2.utmccn%3D(direct)%7Cutmcsr%3D(direct)%7Cutmcmd%3D(none)%3B%2B__utmv%3D-1254132183 Java/1.7.0_45 (amd64; Linux 3.13.0-40-generic)
15:57:48.790 [http-nio-8080-exec-13] DEBUG o.a.i.OnDisconnectInterceptor - No Suspended Connection found for c5b18627-c29b-4f5f-add5-bcd508ccc204. Using the AtmosphereResource associated with the close message
15:57:48.790 [http-nio-8080-exec-13] DEBUG o.a.i.OnDisconnectInterceptor - AtmosphereResource c5b18627-c29b-4f5f-add5-bcd508ccc204 disconnected
févr. 03, 2015 3:57:48 PM org.atmosphere.samples.server.ManagedGWTResource disconnected
Infos: User:c5b18627-c29b-4f5f-add5-bcd508ccc204 closed the connection
15:57:48.989 [http-nio-8080-exec-14] DEBUG o.a.gwt20.server.GwtRpcInterceptor - Found GWT-RPC Atmosphere request. method: GET
févr. 03, 2015 3:57:48 PM org.atmosphere.samples.server.ManagedGWTResource onReady
Infos: Received RPC GET
15:57:49.009 [http-nio-8080-exec-16] DEBUG o.a.gwt20.server.GwtRpcInterceptor - Found GWT-RPC Atmosphere request. method: GET
15:57:50.919 [http-nio-8080-exec-11] DEBUG o.a.gwt20.server.GwtRpcInterceptor - Found GWT-RPC Atmosphere request. method: POST
15:57:50.920 [http-nio-8080-exec-11] DEBUG o.a.gwt20.server.GwtRpcInterceptor - Received message from client: 7|0|4|http://127.0.0.1:8080/gwt20-managed-rpc/GwtRpcDemo/|8477AB767FBF2809840901A023A6C058|java.lang.String/2004016611|org.atmosphere.gwt20.client.managed.RPCEvent@b(5d050a34-5b5b-44d2-b7bf-8dc503cb31f5)|1|2|3|4|
févr. 03, 2015 3:57:50 PM org.atmosphere.samples.server.ManagedGWTResource post
Infos: POST received with transport + POLLING
15:57:50.927 [http-nio-8080-exec-11] WARN o.atmosphere.cpr.DefaultBroadcaster - AtmosphereResource 5d050a34-5b5b-44d2-b7bf-8dc503cb31f5 is not suspended. If cached messages exists, this may cause unexpected situation. Suspend first
15:57:50.931 [Atmosphere-Shared-AsyncOp-1] WARN org.atmosphere.cpr.AtmosphereRequest -
java.lang.NullPointerException: null
at org.apache.catalina.connector.Request.notifyAttributeAssigned(Request.java:1553) ~[catalina.jar:7.0.23]
at org.apache.catalina.connector.Request.setAttribute(Request.java:1544) ~[catalina.jar:7.0.23]
at org.apache.catalina.connector.RequestFacade.setAttribute(RequestFacade.java:541) ~[catalina.jar:7.0.23]
at org.atmosphere.cpr.AtmosphereRequest.setAttribute(AtmosphereRequest.java:694) ~[atmosphere-runtime-native-2.3.0-SNAPSHOT.jar:2.3.0-SNAPSHOT]
at org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(DefaultBroadcaster.java:807) [atmosphere-runtime-native-2.3.0-SNAPSHOT.jar:2.3.0-SNAPSHOT]
at org.atmosphere.cpr.DefaultBroadcaster$2.run(DefaultBroadcaster.java:433) [atmosphere-runtime-native-2.3.0-SNAPSHOT.jar:2.3.0-SNAPSHOT]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_45]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_45]
at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]
15:58:49.019 [http-nio-8080-exec-21] DEBUG o.a.gwt20.server.GwtRpcInterceptor - Found GWT-RPC Atmosphere request. method: GET
15:59:49.027 [http-nio-8080-exec-22] DEBUG o.a.gwt20.server.GwtRpcInterceptor - Found GWT-RPC Atmosphere request. method: GET
16:00:49.033 [http-nio-8080-exec-19] DEBUG o.a.gwt20.server.GwtRpcInterceptor - Found GWT-RPC Atmosphere request. method: GET |
@jimmyjim Please write sample that reproduce your issue and put in on Github. Thanks! |
Ok i've pushed it on
to reproduce, deploy war in tomcat 7.0.57 (or older). i've switch protocol in server.xml to <Connector connectionTimeout="20000" port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol" redirectPort="8443"/> Thx |
|
Hi |
Yes i've read it.
I've installed a broadcastercache but the messages aren't delivered. There is no traces, the method the listener onMessage doesn't receive response. I've commit the project (with params of configuration) to reproduce it on |
I have the same issue. Even if I turn on the cache, client receive nothing. |
Here the traces with logging level set to TRACE. févr. 06, 2015 9:37:19 AM org.apache.catalina.core.AprLifecycleListener init
09:37:20.883 [localhost-startStop-1] INFO org.atmosphere.cpr.AtmosphereServlet - AtmosphereServlet with native support for Tomcat 6/7 and JBossWeb Installed.
09:37:21.121 [Thread-3] DEBUG o.a.util.analytics.HTTPGetMethod - Sending Server's information to Atmosphere's Google Analytics http://www.google-analytics.com/__utm.gif?utmwv=1&utmn=-1429195333&utmcs=UTF-8&utmsr=1440x900&utmsc=32-bit&utmul=en-us&utmje=1&utmfl=9.0%20%20r28&utmcr=1&utmdt=gwt2-2.3.0-SNAPSHOT-INOVELAN-Apache+Tomcat%2F7.0.47&utmhn=jim-inovelan&utmr=http://async-io.org&utmp=/gwt2/2.3.0-SNAPSHOT-INOVELAN/Apache+Tomcat%2F7.0.47&utmac=UA-31990725-1&utmcc=__utma%3D'-756161612.2053061404.1423211841120.1423211841120.1423211841120.2%3B%2B__utmb%3D-756161612%3B%2B__utmc%3D-756161612%3B%2B__utmz%3D-756161612.1423211841120.2.2.utmccn%3D(direct)%7Cutmcsr%3D(direct)%7Cutmcmd%3D(none)%3B%2B__utmv%3D-756161612 Java/1.7.0_45 (amd64; Linux 3.13.0-40-generic) |
Same problem here with Tomcat7, and I don't find a satisfying solution or a workaround to this. |
Anthony have you finally found the solution ? Thanks a lot. |
no, still the same problem |
@AnthonySantnet This is NOT an issue as I noted and that's expected. In 2.2.6 the log has been changed...but the application still works when such NPE happens. |
Ok, i've seen that you're catching the exception, but the application doesn't work even when setting a broadcastercache. As jimmyjim said, you can just deploy the "gwt20-managed-rpc" sample project in a tomcat container to see by yourself. |
Same problem here with
|
Is-it a bug in tomcat when the primary transport is set to long-polling?
Is it possible to disable native comet temporarily ?
The text was updated successfully, but these errors were encountered: