Null pointer exception using Push

He there,

I integrated the new push mechanism in my project.
When i login i got the follwing error:

2013-11-08 10:48:59,077 ERROR [org.apache.catalina.core.ContainerBase.[Catalina]
.[localhost]
.
[/rosbnp].[Ros50 Application]
] Servlet.service() for servlet [Ros50 Application]
in context with path
[/myproject] threw exception
java.lang.NullPointerException
at org.atmosphere.client.TrackMessageSizeInterceptor.inspect(TrackMessageSizeInterceptor.java:96)
at org.atmosphere.cpr.AsynchronousProcessor.invokeInterceptors(AsynchronousProcessor.java:286)
at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:243)
at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:166)
at org.atmosphere.container.BlockingIOCometSupport.service(BlockingIOCometSupport.java:101)
at org.atmosphere.container.Tomcat7BIOSupportWithWebSocket.doService(Tomcat7BIOSupportWithWebSocket.java:65)
at org.atmosphere.container.TomcatWebSocketUtil.doService(TomcatWebSocketUtil.java:87)
at org.atmosphere.container.Tomcat7BIOSupportWithWebSocket.service(Tomcat7BIOSupportWithWebSocket.java:61)
at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:1448)
at com.vaadin.server.communication.PushRequestHandler.handleRequest(PushRequestHandler.java:109)
at com.vaadin.server.communication.PushRequestHandler.handleSessionExpired(PushRequestHandler.java:142)
at com.vaadin.server.VaadinService.handleSessionExpired(VaadinService.java:1480)
at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1381)
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:238)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.valves.CometConnectionManagerValve.invoke(CometConnectionManagerValve.java:186)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1686)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)

so … this is only happing if i rout my web address through an apache server?!?

why is that? anybody got an idea?

Vaadin version 7.1.6
atmosphere version 1.0.14
pushmode automatic

thanks for help

steffan

Yes, it’s a
known Atmosphere issue
. The NPE is harmless, though; the only effect is spamming the log, so fixing it hasn’t been a high priority.

so i have to wait for another atmosphere version

thanks anyway

Is the NPE still thrown if you force HTTP streaming to be used as the push transport with @Push(transport=PushMode.STREAMING)? The issue seems to be that the Apache proxy doesn’t support WebSockets and strips the WebSocket upgrade header from the request, so if you use the proxy it never makes sense to even try WebSockets before falling back to streaming.

thanks for the advice. but unfortunatelly no change :-I

Hi,

I was facing the same issue once I have enabled the push mode. My application is yes in front of an apache proxy, but putting trasnport mode to streaming does not solve the issue.

Is there any update to this issue ??

This will probably be fixed in Vaadin 7.2.0, shipping with an Atmosphere 2.0 version, unless someone can show that it causes actual erroneous behavior in addition to the exception logged. The log spam is inconvenient but hardly a critical issue.