-
-
Notifications
You must be signed in to change notification settings - Fork 756
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
Comments
Just tested and it works form me with 0.8. Can you give it a try? |
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 i will provide a test-case in a few weeks when i have time. it's just a minor problem to me right now. |
Salut, can you paste the entire stack trace? I need to see where the NPE is coming from. Thanks! |
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 |
I've tested 0.8.0-RC2 with
Now I'm throwing javax.ws.rs.WebApplicationException: java.lang.IllegalStateException: Broadcaster cannot be null Thanks for reporting the issue. |
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.
The text was updated successfully, but these errors were encountered: