Skip to content
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 if header-param not set #31

Closed
cproinger opened this issue Sep 27, 2011 · 5 comments
Closed

NPE if header-param not set #31

cproinger opened this issue Sep 27, 2011 · 5 comments
Assignees

Comments

@cproinger
Copy link

when i let the atmosphere-framework inject my resource-method with a broadcaster like this

public Broadcastable someMethod(@HeaderParam(ResourceConstants.X_REQUEST_ID) final Broadcaster bc) {

the framework runs into a null-pointer-exception

java.lang.RuntimeException: java.lang.NullPointerException
at org.atmosphere.handler.ReflectorServletProcessor.onRequest(ReflectorServletProcessor.java:155) ~[atmosphere-runtime-0.7.2.jar:0.7.2]
at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:191) ~[atmosphere-runtime-0.7.2.jar:0.7.2]
at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:142) ~[atmosphere-runtime-0.7.2.jar:0.7.2]
at org.atmosphere.container.Jetty7CometSupport.service(Jetty7CometSupport.java:81) ~[atmosphere-runtime-0.7.2.jar:0.7.2]
at org.atmosphere.cpr.AtmosphereServlet.doCometSupport(AtmosphereServlet.java:1156) ~[atmosphere-runtime-0.7.2.jar:0.7.2]
at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:1138) ~[atmosphere-runtime-0.7.2.jar:0.7.2]

instead a HTTP 400 Bad-Request or something should be responded.

@ghost ghost assigned jfarcand Sep 27, 2011
@jfarcand
Copy link
Member

Just tested and it works form me with 0.8. Can you give it a try?

@cproinger
Copy link
Author

i just tested it with version 0.8.0-RC2-SNAPSHOT and i still get a NPE. was that the version you tried?

23:20:09.321 [qtp2132679615-17 - /containers/1/take] WARN org.eclipse.jetty.util.log - /containers/1/take
java.lang.RuntimeException: java.lang.NullPointerException
at org.atmosphere.handler.ReflectorServletProcessor.onRequest(ReflectorServletProcessor.java:154) ~[atmosphere-runtime-0.8.0-RC2-SNAPSHOT.jar:0.8.0-RC2-SNAPSHOT]
at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:201) ~[atmosphere-runtime-0.8.0-RC2-SNAPSHOT.jar:0.8.0-RC2-SNAPSHOT]
at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:141) ~[atmosphere-runtime-0.8.0-RC2-SNAPSHOT.jar:0.8.0-RC2-SNAPSHOT]
at org.atmosphere.container.Jetty7CometSupport.service(Jetty7CometSupport.java:83) ~[atmosphere-runtime-0.8.0-RC2-SNAPSHOT.jar:0.8.0-RC2-SNAPSHOT]
at org.atmosphere.cpr.AtmosphereServlet.doCometSupport(AtmosphereServlet.java:1163) ~[atmosphere-runtime-0.8.0-RC2-SNAPSHOT.jar:0.8.0-RC2-SNAPSHOT]
at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:1144) ~[atmosphere-runtime-0.8.0-RC2-SNAPSHOT.jar:0.8.0-RC2-SNAPSHOT]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) ~[servlet-api-2.5.jar:2.5]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) ~[servlet-api-2.5.jar:2.5]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:534) ~[jetty-servlet-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:475) [jetty-servlet-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:921) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:403) [jetty-servlet-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:184) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:856) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.Server.handle(Server.java:348) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:596) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1052) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:599) [jetty-http-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:212) [jetty-http-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:510) [jetty-io-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34) [jetty-io-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40) [jetty-io-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:450) [jetty-util-7.2.1.v20101111.jar:7.2.1.v20101111]
at java.lang.Thread.run(Thread.java:619) [na:1.6.0_23-ea]

i will provide a test-case in a few weeks when i have time. it's just a minor problem to me right now.

@jfarcand
Copy link
Member

Salut,

can you paste the entire stack trace? I need to see where the NPE is coming from. Thanks!

@cproinger
Copy link
Author

now i get it. the problem is that no Broadcaster is injected if the header-parameter is not set. therefore i get a NPE in my code. should i throw a HTTP 400 myself or should this be in the responsibility of the container?

11.10.2011 10:04:19 com.sun.jersey.server.impl.application.WebApplicationImpl _handleRequest
SCHWERWIEGEND: The RuntimeException could not be mapped to a response, re-throwing to the HTTP container
java.lang.NullPointerException
at org.atmosphere.jersey.AtmosphereFilter$Filter.suspend(AtmosphereFilter.java:459)
at org.atmosphere.jersey.AtmosphereFilter$Filter.filter(AtmosphereFilter.java:244)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1412)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1345)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1335)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.atmosphere.util.AtmosphereFilterChain.doFilter(AtmosphereFilterChain.java:155)
at org.atmosphere.util.AtmosphereFilterChain.invokeFilterChain(AtmosphereFilterChain.java:116)
at org.atmosphere.handler.ReflectorServletProcessor$FilterChainServletWrapper.service(ReflectorServletProcessor.java:294)
at org.atmosphere.handler.ReflectorServletProcessor.onRequest(ReflectorServletProcessor.java:152)
at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:191)
at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:142)
at org.atmosphere.container.Jetty7CometSupport.service(Jetty7CometSupport.java:81)
at org.atmosphere.cpr.AtmosphereServlet.doCometSupport(AtmosphereServlet.java:1156)
at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:1138)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:534)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:475)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:921)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:403)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:184)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:856)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114)
at org.eclipse.jetty.server.Server.handle(Server.java:348)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:596)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1052)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:599)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:212)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:510)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:450)
at java.lang.Thread.run(Thread.java:619)
10:04:19.342 [CoreProcessor-5] INFO o.m.core.VirtualAnswerContainer - Callback handler has thrown exception
java.lang.NullPointerException: null
at org.mozartspaces.web.resources.ContainerResource$ReadOrTakeEntriesRequestCallbackHandler.requestProcessed(ContainerResource.java:107) ~[classes/:na]
at org.mozartspaces.core.VirtualAnswerContainer.removeRequestAndSetResponse(VirtualAnswerContainer.java:103) ~[classes/:na]
at org.mozartspaces.core.EmbeddedResponseHandler.processResponse(EmbeddedResponseHandler.java:87) [classes/:na]
at org.mozartspaces.runtime.ResponseDistributor.distribute(ResponseDistributor.java:115) [classes/:na]
at org.mozartspaces.runtime.ResponseDistributor.distributeAnswer(ResponseDistributor.java:99) [classes/:na]
at org.mozartspaces.runtime.tasks.AbstractTask.processRequest(AbstractTask.java:282) [classes/:na]
at org.mozartspaces.runtime.tasks.AbstractTask.run(AbstractTask.java:122) [classes/:na]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_23-ea]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_23-ea]
at java.lang.Thread.run(Thread.java:619) [na:1.6.0_23-ea]
10:04:19.342 [qtp386033562-14 - /containers/1/take] ERROR o.a.h.ReflectorServletProcessor - onRequest()
java.lang.NullPointerException: null
at org.atmosphere.jersey.AtmosphereFilter$Filter.suspend(AtmosphereFilter.java:459) ~[atmosphere-jersey-0.7.2.jar:0.7.2]
at org.atmosphere.jersey.AtmosphereFilter$Filter.filter(AtmosphereFilter.java:244) ~[atmosphere-jersey-0.7.2.jar:0.7.2]
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1412) ~[jersey-server-1.7.jar:1.7]
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1345) ~[jersey-server-1.7.jar:1.7]
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1335) ~[jersey-server-1.7.jar:1.7]
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) ~[jersey-server-1.7.jar:1.7]
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) ~[jersey-server-1.7.jar:1.7]
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699) ~[jersey-server-1.7.jar:1.7]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) [servlet-api-2.5.jar:2.5]
at org.atmosphere.util.AtmosphereFilterChain.doFilter(AtmosphereFilterChain.java:155) ~[atmosphere-runtime-0.7.2.jar:0.7.2]
at org.atmosphere.util.AtmosphereFilterChain.invokeFilterChain(AtmosphereFilterChain.java:116) ~[atmosphere-runtime-0.7.2.jar:0.7.2]
at org.atmosphere.handler.ReflectorServletProcessor$FilterChainServletWrapper.service(ReflectorServletProcessor.java:294) ~[atmosphere-runtime-0.7.2.jar:0.7.2]
at org.atmosphere.handler.ReflectorServletProcessor.onRequest(ReflectorServletProcessor.java:152) ~[atmosphere-runtime-0.7.2.jar:0.7.2]
at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:191) [atmosphere-runtime-0.7.2.jar:0.7.2]
at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:142) [atmosphere-runtime-0.7.2.jar:0.7.2]
at org.atmosphere.container.Jetty7CometSupport.service(Jetty7CometSupport.java:81) [atmosphere-runtime-0.7.2.jar:0.7.2]
at org.atmosphere.cpr.AtmosphereServlet.doCometSupport(AtmosphereServlet.java:1156) [atmosphere-runtime-0.7.2.jar:0.7.2]
at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:1138) [atmosphere-runtime-0.7.2.jar:0.7.2]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) [servlet-api-2.5.jar:2.5]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) [servlet-api-2.5.jar:2.5]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:534) [jetty-servlet-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:475) [jetty-servlet-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:921) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:403) [jetty-servlet-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:184) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:856) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.Server.handle(Server.java:348) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:596) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1052) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:599) [jetty-http-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:212) [jetty-http-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:510) [jetty-io-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34) [jetty-io-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40) [jetty-io-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:450) [jetty-util-7.2.1.v20101111.jar:7.2.1.v20101111]
at java.lang.Thread.run(Thread.java:619) [na:1.6.0_23-ea]
10:04:19.343 [qtp386033562-14 - /containers/1/take] WARN org.eclipse.jetty.util.log - /containers/1/take
java.lang.RuntimeException: java.lang.NullPointerException
at org.atmosphere.handler.ReflectorServletProcessor.onRequest(ReflectorServletProcessor.java:155) ~[atmosphere-runtime-0.7.2.jar:0.7.2]
at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:191) ~[atmosphere-runtime-0.7.2.jar:0.7.2]
at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:142) ~[atmosphere-runtime-0.7.2.jar:0.7.2]
at org.atmosphere.container.Jetty7CometSupport.service(Jetty7CometSupport.java:81) ~[atmosphere-runtime-0.7.2.jar:0.7.2]
at org.atmosphere.cpr.AtmosphereServlet.doCometSupport(AtmosphereServlet.java:1156) ~[atmosphere-runtime-0.7.2.jar:0.7.2]
at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:1138) ~[atmosphere-runtime-0.7.2.jar:0.7.2]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) ~[servlet-api-2.5.jar:2.5]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) ~[servlet-api-2.5.jar:2.5]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:534) ~[jetty-servlet-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:475) [jetty-servlet-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:921) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:403) [jetty-servlet-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:184) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:856) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.Server.handle(Server.java:348) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:596) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1052) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:599) [jetty-http-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:212) [jetty-http-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426) [jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:510) [jetty-io-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34) [jetty-io-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40) [jetty-io-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:450) [jetty-util-7.2.1.v20101111.jar:7.2.1.v20101111]
at java.lang.Thread.run(Thread.java:619) [na:1.6.0_23-ea]
Caused by: java.lang.NullPointerException: null
at org.atmosphere.jersey.AtmosphereFilter$Filter.suspend(AtmosphereFilter.java:459) ~[atmosphere-jersey-0.7.2.jar:0.7.2]
at org.atmosphere.jersey.AtmosphereFilter$Filter.filter(AtmosphereFilter.java:244) ~[atmosphere-jersey-0.7.2.jar:0.7.2]
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1412) ~[jersey-server-1.7.jar:1.7]
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1345) ~[jersey-server-1.7.jar:1.7]
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1335) ~[jersey-server-1.7.jar:1.7]
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) ~[jersey-server-1.7.jar:1.7]
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) ~[jersey-server-1.7.jar:1.7]
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699) ~[jersey-server-1.7.jar:1.7]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) ~[servlet-api-2.5.jar:2.5]
at org.atmosphere.util.AtmosphereFilterChain.doFilter(AtmosphereFilterChain.java:155) ~[atmosphere-runtime-0.7.2.jar:0.7.2]
at org.atmosphere.util.AtmosphereFilterChain.invokeFilterChain(AtmosphereFilterChain.java:116) ~[atmosphere-runtime-0.7.2.jar:0.7.2]
at org.atmosphere.handler.ReflectorServletProcessor$FilterChainServletWrapper.service(ReflectorServletProcessor.java:294) ~[atmosphere-runtime-0.7.2.jar:0.7.2]
at org.atmosphere.handler.ReflectorServletProcessor.onRequest(ReflectorServletProcessor.java:152) ~[atmosphere-runtime-0.7.2.jar:0.7.2]
... 27 common frames omitted
10:04:19.344 [qtp386033562-14 - /containers/1/take] DEBUG org.eclipse.jetty.util.log - [POST /containers/1/take]@1970754472 org.eclipse.jetty.server.Request@757753a8
10:04:19.349 [qtp386033562-14 - /containers/1/take] DEBUG org.eclipse.jetty.util.log - RESPONSE /containers/1/take 500
10:04:19.360 [qtp386033562-15] DEBUG org.eclipse.jetty.util.log - EOF
org.eclipse.jetty.io.EofException: null
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:319) ~[jetty-http-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:212) ~[jetty-http-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426) ~[jetty-server-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:510) [jetty-io-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34) [jetty-io-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40) [jetty-io-7.2.1.v20101111.jar:7.2.1.v20101111]
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:450) [jetty-util-7.2.1.v20101111.jar:7.2.1.v20101111]
at java.lang.Thread.run(Thread.java:619) [na:1.6.0_23-ea]

@jfarcand
Copy link
Member

I've tested 0.8.0-RC2 with

@GET
@Suspend(resumeOnBroadcast = true, listeners = {EventsLogger.class})
@Path("headerInjection")
public Broadcastable headerInjection(@HeaderParam("topic") Broadcaster topic) {
    return new Broadcastable(topic);
}

Now I'm throwing

javax.ws.rs.WebApplicationException: java.lang.IllegalStateException: Broadcaster cannot be null

Thanks for reporting the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants