Atmosphere / atmosphere

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

Running Atmosphere within Resin 4 #1783

Closed artegz closed 9 years ago

artegz commented 9 years ago

I'm trying to run atmosphere framework within Resin 4 application server but has encountered some problems. I've build atmosphere-chat war from sample sources and deployed it. When I've opened it in browser following exception has been occurred.

Looks like it failed while using fallback long-polling transport. I'he also tried this example with other transports and other examples (atmosphere-chat-sse, atmosphere-ee6) but without success - exception disappeared but messages not came. I've tried to run same examples within glassfish and everything works fine.

Related google groups topic (https://groups.google.com/forum/#!topic/atmosphere-framework/dA2JVfGZFic).

Sample atmosphere-chat uses atmosphere framework 2.3.0-SNAPSHOT version, but problem also reproduces with 2.2.3 version. Resin version - 4.0.41

Log:

Resin Professional 4.0.41 (built Mon, 22 Sep 2014 09:55:20 PDT)
Copyright(c) 1998-2012 Caucho Technology.  All rights reserved.

  Resin Professional has not found any valid licenses.
  Licenses belong in c:\Java\resin\licenses.
  See http://www.caucho.com/resin/sales for licensing information.
[14-11-17 20:00:35.615] {main}   Resin Professional has not found any valid licenses.
                         Licenses belong in c:\Java\resin\licenses.
                         See http://www.caucho.com/resin/sales for licensing information.

Starting Resin on Mon, 17 Nov 2014 20:00:35 +0400 (MSK)

[14-11-17 20:00:35.746] {main} <proxy-cache> requires Resin Professional.  Please see http://www.caucho.com for Resin Professional information and licensing.
[14-11-17 20:00:35.857] {main} 
[14-11-17 20:00:35.857] {main} Resin Professional 4.0.41 (built Mon, 22 Sep 2014 09:55:20 PDT)
[14-11-17 20:00:35.857] {main} 
[14-11-17 20:00:35.857] {main} Windows 7 6.1 amd64
[14-11-17 20:00:35.857] {main} Java(TM) SE Runtime Environment 1.7.0_55-b13, Cp1251, ru
[14-11-17 20:00:35.857] {main} Java HotSpot(TM) 64-Bit Server VM 24.55-b03, 64, mixed mode, Oracle Corporation
[14-11-17 20:00:35.857] {main} 
[14-11-17 20:00:35.857] {main} user.name  = KODKOD$
[14-11-17 20:00:35.907] {main} 
[14-11-17 20:00:35.907] {main} server listening to 127.0.0.1:6800
[14-11-17 20:00:35.908] {main} 
[14-11-17 20:00:35.965] {main} 
[14-11-17 20:00:35.965] {main} resin.home = c:\Java\resin
[14-11-17 20:00:35.966] {main} resin.root = c:\Java\resin
[14-11-17 20:00:35.966] {main} resin.conf = c:\Java\resin\conf\resin.xml
[14-11-17 20:00:35.966] {main} 
[14-11-17 20:00:35.966] {main} server    = 127.0.0.1:6800 (app:app-0)
[14-11-17 20:00:35.966] {main} stage      = production
[14-11-17 20:00:36.203] {resin-32} WebApp[production/webapp/default/resin-admin] active
[14-11-17 20:00:36.223] {resin-33} WebApp[production/webapp/default/ROOT] active
[14-11-17 20:00:36.453] {resin-34} WebApp[production/webapp/default/resin-doc] active
[14-11-17 20:00:36.663] {main} In-place class redefinition (HotSwap) is available.
20:00:36,713 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
20:00:36,713 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
20:00:36,713 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/c:/Java/resin/webapps/atmosphere-chat/WEB-INF/classes/logback.xml]
20:00:36,793 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
20:00:36,793 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
20:00:36,803 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
20:00:36,843 |-INFO in ch.qos.logback.classic.joran.action.LevelAction - ROOT level set to INFO
20:00:36,843 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
20:00:36,843 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
20:00:36,843 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@2e123812 - Registering current configuration as safe fallback point
20:00:36.873 WARN [resin-35] o.a.u.IOUtils [IOUtils.java:371] META-INF/services/org.atmosphere.cpr.AtmosphereFramework not found in class loader
20:00:36.913 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:2615] Atmosphere is using org.atmosphere.cpr.DefaultAnnotationProcessor for processing annotation
20:00:36.913 INFO [resin-35] o.a.c.DefaultAnnotationProcessor [DefaultAnnotationProcessor.java:136] AnnotationProcessor class org.atmosphere.cpr.DefaultAnnotationProcessor$BytecodeBasedAnnotationProcessor being used
20:00:36.933 INFO [resin-35] o.a.c.AnnotationHandler [AnnotationHandler.java:63] Found Annotation in class org.atmosphere.samples.chat.Chat being scanned: interface org.atmosphere.samples.chat.custom.Config
20:00:36.943 INFO [resin-35] o.a.s.c.c.SampleConfig [SampleConfig.java:36] Custom annotation @org.atmosphere.samples.chat.custom.Config() discovered. Starting the Chat Sample
20:00:36.943 INFO [resin-35] o.a.c.AnnotationHandler [AnnotationHandler.java:63] Found Annotation in class org.atmosphere.samples.chat.Chat being scanned: interface org.atmosphere.config.service.ManagedService
20:00:37.123 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:645] Installed AtmosphereHandler org.atmosphere.config.managed.ManagedAtmosphereHandler mapped to context-path /chat and Broadcaster Class org.atmosphere.cpr.DefaultBroadcaster
20:00:37.123 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:653] Installed AtmosphereInterceptor [@ManagedService Interceptor, Atmosphere LifeCycle,  Track Message Size Interceptor using |, UUID Tracking Interceptor] mapped to AtmosphereHandler org.atmosphere.config.managed.ManagedAtmosphereHandler
20:00:37.133 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:1958] Auto detecting WebSocketHandler in /WEB-INF/classes/
20:00:37.133 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:1613] Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol 
20:00:37.143 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:1107] Installing Default AtmosphereInterceptor
20:00:37.143 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:1147]  org.atmosphere.interceptor.CorsInterceptor : CORS Interceptor Support
20:00:37.143 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:1147]  org.atmosphere.interceptor.CacheHeadersInterceptor : Default Response's Headers Interceptor
20:00:37.143 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:1147]  org.atmosphere.interceptor.PaddingAtmosphereInterceptor : Browser Padding Interceptor Support
20:00:37.143 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:1147]  org.atmosphere.interceptor.AndroidAtmosphereInterceptor : Android Interceptor Support
20:00:37.143 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:1147]  org.atmosphere.interceptor.HeartbeatInterceptor : Heartbeat Interceptor Support
20:00:37.143 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:1147]  org.atmosphere.interceptor.SSEAtmosphereInterceptor : SSE Interceptor Support
20:00:37.143 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:1147]  org.atmosphere.interceptor.JSONPAtmosphereInterceptor : JSONP Interceptor Support
20:00:37.143 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:1147]  org.atmosphere.interceptor.JavaScriptProtocol : Atmosphere JavaScript Protocol
20:00:37.143 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:1147]  org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor : org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor
20:00:37.143 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:1147]  org.atmosphere.interceptor.OnDisconnectInterceptor : Browser disconnection detection
20:00:37.143 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:1147]  org.atmosphere.interceptor.IdleResourceInterceptor : org.atmosphere.interceptor.IdleResourceInterceptor
20:00:37.143 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:1137] Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults to disable them.
20:00:37.143 INFO [resin-35] o.a.i.HeartbeatInterceptor [HeartbeatInterceptor.java:166] HeartbeatInterceptor configured with padding value 'X', client frequency 60 seconds and server frequency 10 seconds
20:00:37.143 INFO [resin-35] o.a.i.IdleResourceInterceptor [IdleResourceInterceptor.java:66] IdleResourceInterceptor started with idle timeout set to 120000
20:00:37.153 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:943] Using EndpointMapper class org.atmosphere.util.DefaultEndpointMapper
20:00:37.153 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:952] Using BroadcasterCache: org.atmosphere.cache.UUIDBroadcasterCache
20:00:37.153 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:957] Default Broadcaster Class: org.atmosphere.cpr.DefaultBroadcaster
20:00:37.153 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:958] Broadcaster Polling Wait Time 100
20:00:37.153 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:959] Shared ExecutorService supported: true
20:00:37.153 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:966] Messaging Thread Pool Size: Unlimited
20:00:37.153 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:976] Async I/O Thread Pool Size: 200
20:00:37.153 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:982] Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory
20:00:37.153 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:983] Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor
20:00:37.153 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:993] Invoke AtmosphereInterceptor on WebSocket message true
20:00:37.153 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:994] HttpSession supported: false
20:00:37.153 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:996] Atmosphere is using org.atmosphere.inject.InjectableObjectFactory for dependency injection and object creation
20:00:37.153 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:997] Atmosphere is using async support: org.atmosphere.container.Servlet30CometSupport running under container: Resin/4.0.41 using javax.servlet/3.0
20:00:37.153 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:999] Atmosphere Framework 2.3.0-SNAPSHOT started.
20:00:37.153 INFO [resin-35] o.a.c.AtmosphereFramework [AtmosphereFramework.java:1001] 

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

[14-11-17 20:00:37.153] {resin-35} WebApp[production/webapp/default/atmosphere-chat] active
[14-11-17 20:00:37.153] {main} Host[production/host/default] active
[14-11-17 20:00:37.153] {main} ServletService[id=app-0,cluster=app] active
[14-11-17 20:00:37.153] {main} 
[14-11-17 20:00:37.153] {main} http listening to *:8080
[14-11-17 20:00:37.163] {main} 
[14-11-17 20:00:37.163] {main} Resin[id=app-0] started in 2161ms
20:00:37.463 INFO [Thread-45] o.a.c.AtmosphereFramework [AtmosphereFramework.java:1063] Latest version of Atmosphere's JavaScript Client 2.2.5
20:00:37.463 INFO [Thread-45] o.a.c.AtmosphereFramework [AtmosphereFramework.java:1065] 

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

[14-11-17 20:00:55.751] {resin-port-8080-43} java.lang.NullPointerException
                        at com.caucho.server.http.AbstractHttpResponse.setHeader(AbstractHttpResponse.java:359)
                        at com.caucho.server.http.HttpServletResponseImpl.setHeader(HttpServletResponseImpl.java:1176)
                        at org.atmosphere.cpr.AtmosphereResponse.setHeader(AtmosphereResponse.java:316)
                        at org.atmosphere.cpr.AtmosphereFramework.configureRequestResponse(AtmosphereFramework.java:2055)
                        at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:2089)
                        at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:211)
                        at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:197)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:120)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:97)
                        at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:109)
                        at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:156)
                        at com.caucho.server.webapp.AccessLogFilterChain.doFilter(AccessLogFilterChain.java:95)
                        at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:289)
                        at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:838)
                        at com.caucho.network.listen.TcpSocketLink.dispatchRequest(TcpSocketLink.java:1348)
                        at com.caucho.network.listen.TcpSocketLink.handleRequest(TcpSocketLink.java:1304)
                        at com.caucho.network.listen.TcpSocketLink.handleRequestsImpl(TcpSocketLink.java:1288)
                        at com.caucho.network.listen.TcpSocketLink.handleRequests(TcpSocketLink.java:1196)
                        at com.caucho.network.listen.TcpSocketLink.handleAcceptTaskImpl(TcpSocketLink.java:993)
                        at com.caucho.network.listen.ConnectionTask.runThread(ConnectionTask.java:117)
                        at com.caucho.network.listen.ConnectionTask.run(ConnectionTask.java:93)
                        at com.caucho.network.listen.SocketLinkThreadLauncher.handleTasks(SocketLinkThreadLauncher.java:169)
                        at com.caucho.network.listen.TcpSocketAcceptThread.run(TcpSocketAcceptThread.java:61)
                        at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:173)
                        at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118)

20:00:55.859 ERROR [resin-port-8080-33] o.a.c.AsynchronousProcessor [AsynchronousProcessor.java:119] Invalid request state. Websocket protocol not supported
[14-11-17 20:00:55.890] {resin-port-8080-42} java.lang.NullPointerException
                        at com.caucho.server.http.AbstractHttpResponse.setHeader(AbstractHttpResponse.java:359)
                        at com.caucho.server.http.HttpServletResponseImpl.setHeader(HttpServletResponseImpl.java:1176)
                        at org.atmosphere.cpr.AtmosphereResponse.setHeader(AtmosphereResponse.java:316)
                        at org.atmosphere.cpr.AtmosphereFramework.configureRequestResponse(AtmosphereFramework.java:2055)
                        at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:2089)
                        at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:211)
                        at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:197)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:120)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:97)
                        at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:109)
                        at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:156)
                        at com.caucho.server.webapp.AccessLogFilterChain.doFilter(AccessLogFilterChain.java:95)
                        at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:289)
                        at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:838)
                        at com.caucho.network.listen.TcpSocketLink.dispatchRequest(TcpSocketLink.java:1348)
                        at com.caucho.network.listen.TcpSocketLink.handleRequest(TcpSocketLink.java:1304)
                        at com.caucho.network.listen.TcpSocketLink.handleRequestsImpl(TcpSocketLink.java:1288)
                        at com.caucho.network.listen.TcpSocketLink.handleRequests(TcpSocketLink.java:1196)
                        at com.caucho.network.listen.TcpSocketLink.handleAcceptTaskImpl(TcpSocketLink.java:993)
                        at com.caucho.network.listen.ConnectionTask.runThread(ConnectionTask.java:117)
                        at com.caucho.network.listen.ConnectionTask.run(ConnectionTask.java:93)
                        at com.caucho.network.listen.SocketLinkThreadLauncher.handleTasks(SocketLinkThreadLauncher.java:169)
                        at com.caucho.network.listen.TcpSocketAcceptThread.run(TcpSocketAcceptThread.java:61)
                        at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:173)
                        at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118)

[14-11-17 20:01:00.924] {resin-port-8080-42} java.lang.NullPointerException
                        at com.caucho.server.http.AbstractHttpResponse.setHeader(AbstractHttpResponse.java:359)
                        at com.caucho.server.http.HttpServletResponseImpl.setHeader(HttpServletResponseImpl.java:1176)
                        at org.atmosphere.cpr.AtmosphereResponse.setHeader(AtmosphereResponse.java:316)
                        at org.atmosphere.cpr.AtmosphereFramework.configureRequestResponse(AtmosphereFramework.java:2055)
                        at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:2089)
                        at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:211)
                        at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:197)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:120)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:97)
                        at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:109)
                        at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:156)
                        at com.caucho.server.webapp.AccessLogFilterChain.doFilter(AccessLogFilterChain.java:95)
                        at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:289)
                        at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:838)
                        at com.caucho.network.listen.TcpSocketLink.dispatchRequest(TcpSocketLink.java:1348)
                        at com.caucho.network.listen.TcpSocketLink.handleRequest(TcpSocketLink.java:1304)
                        at com.caucho.network.listen.TcpSocketLink.handleRequestsImpl(TcpSocketLink.java:1288)
                        at com.caucho.network.listen.TcpSocketLink.handleRequests(TcpSocketLink.java:1196)
                        at com.caucho.network.listen.TcpSocketLink.handleAcceptTaskImpl(TcpSocketLink.java:993)
                        at com.caucho.network.listen.ConnectionTask.runThread(ConnectionTask.java:117)
                        at com.caucho.network.listen.ConnectionTask.run(ConnectionTask.java:93)
                        at com.caucho.network.listen.SocketLinkThreadLauncher.handleTasks(SocketLinkThreadLauncher.java:169)
                        at com.caucho.network.listen.TcpSocketAcceptThread.run(TcpSocketAcceptThread.java:61)
                        at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:173)
                        at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118)

[14-11-17 20:01:05.929] {resin-port-8080-42} java.lang.NullPointerException
                        at com.caucho.server.http.AbstractHttpResponse.setHeader(AbstractHttpResponse.java:359)
                        at com.caucho.server.http.HttpServletResponseImpl.setHeader(HttpServletResponseImpl.java:1176)
                        at org.atmosphere.cpr.AtmosphereResponse.setHeader(AtmosphereResponse.java:316)
                        at org.atmosphere.cpr.AtmosphereFramework.configureRequestResponse(AtmosphereFramework.java:2055)
                        at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:2089)
                        at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:211)
                        at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:197)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:120)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:97)
                        at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:109)
                        at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:156)
                        at com.caucho.server.webapp.AccessLogFilterChain.doFilter(AccessLogFilterChain.java:95)
                        at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:289)
                        at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:838)
                        at com.caucho.network.listen.TcpSocketLink.dispatchRequest(TcpSocketLink.java:1348)
                        at com.caucho.network.listen.TcpSocketLink.handleRequest(TcpSocketLink.java:1304)
                        at com.caucho.network.listen.TcpSocketLink.handleRequestsImpl(TcpSocketLink.java:1288)
                        at com.caucho.network.listen.TcpSocketLink.handleRequests(TcpSocketLink.java:1196)
                        at com.caucho.network.listen.TcpSocketLink.handleAcceptTaskImpl(TcpSocketLink.java:993)
                        at com.caucho.network.listen.ConnectionTask.runThread(ConnectionTask.java:117)
                        at com.caucho.network.listen.ConnectionTask.run(ConnectionTask.java:93)
                        at com.caucho.network.listen.SocketLinkThreadLauncher.handleTasks(SocketLinkThreadLauncher.java:169)
                        at com.caucho.network.listen.TcpSocketAcceptThread.run(TcpSocketAcceptThread.java:61)
                        at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:173)
                        at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118)

[14-11-17 20:01:10.960] {resin-port-8080-42} java.lang.NullPointerException
                        at com.caucho.server.http.AbstractHttpResponse.setHeader(AbstractHttpResponse.java:359)
                        at com.caucho.server.http.HttpServletResponseImpl.setHeader(HttpServletResponseImpl.java:1176)
                        at org.atmosphere.cpr.AtmosphereResponse.setHeader(AtmosphereResponse.java:316)
                        at org.atmosphere.cpr.AtmosphereFramework.configureRequestResponse(AtmosphereFramework.java:2055)
                        at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:2089)
                        at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:211)
                        at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:197)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:120)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:97)
                        at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:109)
                        at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:156)
                        at com.caucho.server.webapp.AccessLogFilterChain.doFilter(AccessLogFilterChain.java:95)
                        at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:289)
                        at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:838)
                        at com.caucho.network.listen.TcpSocketLink.dispatchRequest(TcpSocketLink.java:1348)
                        at com.caucho.network.listen.TcpSocketLink.handleRequest(TcpSocketLink.java:1304)
                        at com.caucho.network.listen.TcpSocketLink.handleRequestsImpl(TcpSocketLink.java:1288)
                        at com.caucho.network.listen.TcpSocketLink.handleRequests(TcpSocketLink.java:1196)
                        at com.caucho.network.listen.TcpSocketLink.handleAcceptTaskImpl(TcpSocketLink.java:993)
                        at com.caucho.network.listen.ConnectionTask.runThread(ConnectionTask.java:117)
                        at com.caucho.network.listen.ConnectionTask.run(ConnectionTask.java:93)
                        at com.caucho.network.listen.SocketLinkThreadLauncher.handleTasks(SocketLinkThreadLauncher.java:169)
                        at com.caucho.network.listen.TcpSocketAcceptThread.run(TcpSocketAcceptThread.java:61)
                        at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:173)
                        at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118)

[14-11-17 20:01:15.987] {resin-port-8080-42} java.lang.NullPointerException
                        at com.caucho.server.http.AbstractHttpResponse.setHeader(AbstractHttpResponse.java:359)
                        at com.caucho.server.http.HttpServletResponseImpl.setHeader(HttpServletResponseImpl.java:1176)
                        at org.atmosphere.cpr.AtmosphereResponse.setHeader(AtmosphereResponse.java:316)
                        at org.atmosphere.cpr.AtmosphereFramework.configureRequestResponse(AtmosphereFramework.java:2055)
                        at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:2089)
                        at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:211)
                        at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:197)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:120)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:97)
                        at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:109)
                        at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:156)
                        at com.caucho.server.webapp.AccessLogFilterChain.doFilter(AccessLogFilterChain.java:95)
                        at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:289)
                        at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:838)
                        at com.caucho.network.listen.TcpSocketLink.dispatchRequest(TcpSocketLink.java:1348)
                        at com.caucho.network.listen.TcpSocketLink.handleRequest(TcpSocketLink.java:1304)
                        at com.caucho.network.listen.TcpSocketLink.handleRequestsImpl(TcpSocketLink.java:1288)
                        at com.caucho.network.listen.TcpSocketLink.handleRequests(TcpSocketLink.java:1196)
                        at com.caucho.network.listen.TcpSocketLink.handleAcceptTaskImpl(TcpSocketLink.java:993)
                        at com.caucho.network.listen.ConnectionTask.runThread(ConnectionTask.java:117)
                        at com.caucho.network.listen.ConnectionTask.run(ConnectionTask.java:93)
                        at com.caucho.network.listen.SocketLinkThreadLauncher.handleTasks(SocketLinkThreadLauncher.java:169)
                        at com.caucho.network.listen.TcpSocketAcceptThread.run(TcpSocketAcceptThread.java:61)
                        at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:173)
                        at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118)

[14-11-17 20:01:20.988] {resin-port-8080-42} java.lang.NullPointerException
                        at com.caucho.server.http.AbstractHttpResponse.setHeader(AbstractHttpResponse.java:359)
                        at com.caucho.server.http.HttpServletResponseImpl.setHeader(HttpServletResponseImpl.java:1176)
                        at org.atmosphere.cpr.AtmosphereResponse.setHeader(AtmosphereResponse.java:316)
                        at org.atmosphere.cpr.AtmosphereFramework.configureRequestResponse(AtmosphereFramework.java:2055)
                        at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:2089)
                        at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:211)
                        at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:197)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:120)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:97)
                        at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:109)
                        at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:156)
                        at com.caucho.server.webapp.AccessLogFilterChain.doFilter(AccessLogFilterChain.java:95)
                        at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:289)
                        at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:838)
                        at com.caucho.network.listen.TcpSocketLink.dispatchRequest(TcpSocketLink.java:1348)
                        at com.caucho.network.listen.TcpSocketLink.handleRequest(TcpSocketLink.java:1304)
                        at com.caucho.network.listen.TcpSocketLink.handleRequestsImpl(TcpSocketLink.java:1288)
                        at com.caucho.network.listen.TcpSocketLink.handleRequests(TcpSocketLink.java:1196)
                        at com.caucho.network.listen.TcpSocketLink.handleAcceptTaskImpl(TcpSocketLink.java:993)
                        at com.caucho.network.listen.ConnectionTask.runThread(ConnectionTask.java:117)
                        at com.caucho.network.listen.ConnectionTask.run(ConnectionTask.java:93)
                        at com.caucho.network.listen.SocketLinkThreadLauncher.handleTasks(SocketLinkThreadLauncher.java:169)
                        at com.caucho.network.listen.TcpSocketAcceptThread.run(TcpSocketAcceptThread.java:61)
                        at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:173)
                        at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118)

[14-11-17 20:02:23.540] {resin-main-link} Resin[id=app-0] stop request from watchdog 'watchdog@admin.resin.caucho'
WarningService: Shutdown: Resin shutdown from watchdog stop 'watchdog@admin.resin.caucho'
[14-11-17 20:02:23.542] {resin-main-link} WarningService: Shutdown: Resin shutdown from watchdog stop 'watchdog@admin.resin.caucho'
[14-11-17 20:02:23.673] {resin-shutdown} ServletService[id=app-0,cluster=app] stopping
[14-11-17 20:02:23.674] {resin-shutdown} Host[production/host/default] stopping
[14-11-17 20:02:23.674] {resin-shutdown} WebApp[production/webapp/default/atmosphere-chat] stopping
[14-11-17 20:02:23.689] {resin-shutdown} WebApp[production/webapp/default/resin-doc] stopping
[14-11-17 20:02:23.693] {resin-shutdown} WebApp[production/webapp/default/ROOT] stopping
[14-11-17 20:02:23.693] {resin-shutdown} WebApp[production/webapp/default/resin-admin] stopping

Shutdown Resin reason: OK
artegz commented 9 years ago

Related issue at Resin bug tracker - http://bugs.caucho.com/view.php?id=5830

rvowles commented 7 years ago

@jfarcand this is causing Jetty 4 v20170914 to explode under Chrome. Jetty is allowing two headers - an Upgrade: "" and Upgrade: "WebSocket" (and Server: "" and Server: "Jetty v....") which is making Chrome fail because of two headers.

Jetty expects this to be passed as null (thus unsetting it). I have had to add a response delegate to remove the header. It appears to be a Jetty bug.