Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » NullPointerException while loading multiple reqeusts
NullPointerException while loading multiple reqeusts [message #1232129] Thu, 16 January 2014 09:35 Go to next message
Devesh Mishra is currently offline Devesh MishraFriend
Messages: 20
Registered: June 2013
Junior Member
Requirement:

1) Create a UI using RAP and deploy in Jboss server
2) Show the UI on the same browser using multiple iframes. So, the page will have same UI rendered multiple times.

Setup:
1) A guice filter which filters all the request going through
2) a rwt servlet to process RAP requests.

Error:
1) Some of the iframes throw a NPE. The error is intermittent but very visible (reproducible 9 times out of 10).

Error trace:
java.lang.NullPointerException
	org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.shutdownUISession(LifeCycleServiceHandler.java:163)
	org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.synchronizedService(LifeCycleServiceHandler.java:87)
	org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.service(LifeCycleServiceHandler.java:66)
	org.eclipse.rap.rwt.engine.RWTServlet.handleValidRequest(RWTServlet.java:119)
	org.eclipse.rap.rwt.engine.RWTServlet.handleRequest(RWTServlet.java:106)
	org.eclipse.rap.rwt.engine.RWTServlet.doGet(RWTServlet.java:92)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
	com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:66)
	com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
	com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
	com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
	com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
	com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
	com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
	com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
	com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
	com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
	com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
	com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
	com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
	com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
	com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)


Thanks for the all the good work RAP team is doing.
Re: NullPointerException while loading multiple reqeusts [message #1232140 is a reply to message #1232129] Thu, 16 January 2014 09:53 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 1973
Registered: July 2009
Senior Member
Hi,
does it happen with RAP 2.2?
Best,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: NullPointerException while loading multiple reqeusts [message #1232152 is a reply to message #1232140] Thu, 16 January 2014 10:08 Go to previous messageGo to next message
Devesh Mishra is currently offline Devesh MishraFriend
Messages: 20
Registered: June 2013
Junior Member
I am on RAP 2.1. I need to see if it happens with RAP 2.2 as well. I doubt its due to the creations of dummy session for GET requests.
// The GET request currently creates a dummy UI session needed for accessing the client
// information. It is not meant to be reused by other requests.
Re: NullPointerException while loading multiple reqeusts [message #1232156 is a reply to message #1232152] Thu, 16 January 2014 10:19 Go to previous messageGo to next message
Devesh Mishra is currently offline Devesh MishraFriend
Messages: 20
Registered: June 2013
Junior Member
Just found that it is not a problem with the GuiceFilter. It happens in general. following is the trace from eclipse jetty.

java.lang.NullPointerException
	at org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.service(LifeCycleServiceHandler.java:65)
	at org.eclipse.rap.rwt.engine.RWTServlet.handleValidRequest(RWTServlet.java:119)
	at org.eclipse.rap.rwt.engine.RWTServlet.handleRequest(RWTServlet.java:106)
	at org.eclipse.rap.rwt.engine.RWTServlet.doGet(RWTServlet.java:92)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1448)
	at com.google.inject.servlet.DefaultFilterPipeline.dispatch(DefaultFilterPipeline.java:43)
	at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
	at org.eclipse.jetty.server.Server.handle(Server.java:368)
	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
	at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
	at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)
	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
	at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
	at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
	at java.lang.Thread.run(Thread.java:722)
Re: NullPointerException while loading multiple reqeusts [message #1233042 is a reply to message #1232156] Sat, 18 January 2014 12:38 Go to previous messageGo to next message
Devesh Mishra is currently offline Devesh MishraFriend
Messages: 20
Registered: June 2013
Junior Member
I tried this in RAP 2.2, and no luck. The issue is there as well. Below is the trace in RAP 2.2. Please let me know if I raise a bug. Thanks

java.lang.NullPointerException
	at org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.shutdownUISession(LifeCycleServiceHandler.java:172)
	at org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.synchronizedService(LifeCycleServiceHandler.java:88)
	at org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.service(LifeCycleServiceHandler.java:67)
	at org.eclipse.rap.rwt.engine.RWTServlet.handleValidRequest(RWTServlet.java:121)
	at org.eclipse.rap.rwt.engine.RWTServlet.handleRequest(RWTServlet.java:108)
	at org.eclipse.rap.rwt.engine.RWTServlet.doGet(RWTServlet.java:92)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:457)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
	at org.eclipse.jetty.server.Server.handle(Server.java:364)
	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
	at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
	at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)
	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
	at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
	at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
	at java.lang.Thread.run(Thread.java:722)
Powered by Jetty://

Re: NullPointerException while loading multiple reqeusts [message #1233057 is a reply to message #1233042] Sat, 18 January 2014 13:31 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 1973
Registered: July 2009
Senior Member
Hi,
yes... please file a bug. Also, please create a simple project (maybe a
war for deployment) in order to fast check and reproduce the issue. Does
it happens only in JBoss? Did you try with Tomcat or Jetty?
Best,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: NullPointerException while loading multiple reqeusts [message #1234282 is a reply to message #1233057] Tue, 21 January 2014 16:00 Go to previous messageGo to next message
Devesh Mishra is currently offline Devesh MishraFriend
Messages: 20
Registered: June 2013
Junior Member
Thanks. I will file a bug. I tested in Jboss 7.1 and Embedded Jetty. It happens in both. Thanks
Re: NullPointerException while loading multiple reqeusts [message #1234291 is a reply to message #1234282] Tue, 21 January 2014 16:18 Go to previous messageGo to next message
Devesh Mishra is currently offline Devesh MishraFriend
Messages: 20
Registered: June 2013
Junior Member
https://bugs.eclipse.org/bugs/show_bug.cgi?id=426269
Re: NullPointerException while loading multiple reqeusts [message #1697108 is a reply to message #1234291] Mon, 01 June 2015 16:00 Go to previous messageGo to next message
Arnaud MERGEY is currently offline Arnaud MERGEYFriend
Messages: 167
Registered: March 2010
Location: France
Senior Member
I do not know if it is related, but since 3.0 RC2, I have randomly an exception when my application start
This does not seems to bother it, I do not see any issue, just this stacktrace once at startup, then it does not occur anymore

java.lang.NullPointerException
at org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.service(LifeCycleServiceHandler.java:66)
at org.eclipse.rap.rwt.engine.RWTServlet.handleValidRequest(RWTServlet.java:135)
at org.eclipse.rap.rwt.engine.RWTServlet.handleRequest(RWTServlet.java:117)
at org.eclipse.rap.rwt.engine.RWTServlet.doPost(RWTServlet.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.rap.rwt.osgi.internal.CutOffContextPathWrapper.service(CutOffContextPathWrapper.java:106)
at org.eclipse.equinox.http.servlet.internal.HttpServiceRuntimeImpl$LegacyServlet.service(HttpServiceRuntimeImpl.java:1271)
at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:162)
at org.eclipse.equinox.http.servlet.internal.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:50)
Re: NullPointerException while loading multiple reqeusts [message #1697112 is a reply to message #1697108] Mon, 01 June 2015 16:27 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 1973
Registered: July 2009
Senior Member
Hi Arnaud,
I hope this is fixed in RC3. See https://git.eclipse.org/r/#/c/49000/.
Could you please check and report it ASAP. We are very very close to the
release build and if the issue persists we still have short time to fix it.
Thanks,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: NullPointerException while loading multiple reqeusts [message #1697652 is a reply to message #1697112] Fri, 05 June 2015 16:24 Go to previous message
Arnaud MERGEY is currently offline Arnaud MERGEYFriend
Messages: 167
Registered: March 2010
Location: France
Senior Member
Hello,
I confirm RC3 fixed this issue

Thanks
Previous Topic:how to custom error page instead of error 500
Next Topic:No polling with ProgressMonitorDialog and deployed application
Goto Forum:
  


Current Time: Wed Jul 08 06:37:25 GMT 2015

Powered by FUDForum. Page generated in 0.02665 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software