Tapestry
  1. Tapestry
  2. TAPESTRY-1377

NullPointerException invoking methods on the Request service

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.3
    • Fix Version/s: 5.0.8
    • Component/s: tapestry-core
    • Labels:
      None
    • Environment:
      Tapestry, Spring Framework, Acegi Security

      Description

      In web.xml filters are applied in the order Acegi, Spring OpenSessionInView, Tapestry to make sure that all requests get processed by Acegi for security checking first, then OpenSessionInView makes sure there is an active Hibernate session.

      When the request gets to Tapestry an NPE is thrown:

      java.lang.NullPointerException
      at $Request_11171fec8ae.getContextPath($Request_11171fec8ae.java)
      at $Request_11171fec858.getContextPath($Request_11171fec858.java)
      at org.apache.tapestry.internal.services.RequestRenderer.render(RequestRenderer.java:34)
      at org.apache.tapestry.internal.services.RequestRenderer.render(RequestRenderer.java:24)
      at $ObjectRenderer_11171fec8ad.render($ObjectRenderer_11171fec8ad.java)
      at $ObjectRenderer_11171fec855.render($ObjectRenderer_11171fec855.java)
      at org.apache.tapestry.corelib.components.RenderObject.beginRender(RenderObject.java:37)
      at org.apache.tapestry.corelib.components.RenderObject.beginRender(RenderObject.java)
      at org.apache.tapestry.internal.structure.ComponentPageElementImpl$10$1.run(ComponentPageElementImpl.java:345)
      at org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:932)
      at org.apache.tapestry.internal.structure.ComponentPageElementImpl.access$100(ComponentPageElementImpl.java:69)
      at org.apache.tapestry.internal.structure.ComponentPageElementImpl$10.render(ComponentPageElementImpl.java:349)
      at org.apache.tapestry.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:57)
      at org.apache.tapestry.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:40)
      at $PageMarkupRenderer_11171fec8a6.renderPageMarkup($PageMarkupRenderer_11171fec8a6.java)
      at org.apache.tapestry.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:45)
      at $PageResponseRenderer_11171fec86d.renderPageResponse($PageResponseRenderer_11171fec86d.java)
      at org.apache.tapestry.internal.services.DefaultRequestExceptionHandler.handleRequestException(DefaultRequestExceptionHandler.java:60)
      at $RequestExceptionHandler_11171fec860.handleRequestException($RequestExceptionHandler_11171fec860.java)
      at org.apache.tapestry.services.TapestryModule$3.service(TapestryModule.java:745)
      at $RequestHandler_11171fec87f.service($RequestHandler_11171fec87f.java)
      at org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:63)
      at $RequestHandler_11171fec87f.service($RequestHandler_11171fec87f.java)
      at org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:91)
      at org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:82)
      at org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77)
      at org.apache.tapestry.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:104)
      at $RequestHandler_11171fec87f.service($RequestHandler_11171fec87f.java)
      at $RequestHandler_11171fec87b.service($RequestHandler_11171fec87b.java)
      at org.apache.tapestry.services.TapestryModule$11.service(TapestryModule.java:1179)
      at $HttpServletRequestHandler_11171fec87a.service($HttpServletRequestHandler_11171fec87a.java)
      at org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:115)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1040)
      at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:173)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1040)
      at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
      at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
      at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
      at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
      at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
      at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
      at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178)
      at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
      at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
      at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
      at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
      at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1040)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:352)
      at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:230)
      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:627)
      at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
      at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
      at org.mortbay.jetty.Server.handle(Server.java:286)
      at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:444)
      at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:701)
      at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
      at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:203)
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:340)
      at org.mortbay.jetty.nio.HttpChannelEndPoint.run(HttpChannelEndPoint.java:270)
      at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)

      1. bugdemo.tgz
        8 kB
        Robert Zeigler

        Activity

        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12569210 ] jira [ 12590468 ]
        Mark Thomas made changes -
        Workflow jira [ 12400038 ] Default workflow, editable Closed status [ 12569210 ]
        Howard M. Lewis Ship made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 5.0.8 [ 12312898 ]
        Resolution Fixed [ 1 ]
        Howard M. Lewis Ship made changes -
        Summary NPE in Request.getContextPath() NullPointerException invoking methods on the Request service
        Assignee Howard M. Lewis Ship [ hlship ]
        Hide
        Howard M. Lewis Ship added a comment -

        I've tested against the supplied example project and all seems to be working now.

        Show
        Howard M. Lewis Ship added a comment - I've tested against the supplied example project and all seems to be working now.
        Hide
        Howard M. Lewis Ship added a comment -

        This is the real stack trace:

        java.lang.NullPointerException
        at $Request_1177f9ee274.getSession($Request_1177f9ee274.java)
        at $Request_1177f9ee258.getSession($Request_1177f9ee258.java)
        at org.apache.tapestry.internal.services.SessionApplicationStatePersistenceStrategy.exists(SessionApplicationStatePersistenceStrategy.java:79)
        at org.apache.tapestry.internal.services.ApplicationStateManagerImpl$ApplicationStateAdapter.exists(ApplicationStateManagerImpl.java:54)
        at org.apache.tapestry.internal.services.ApplicationStateManagerImpl.exists(ApplicationStateManagerImpl.java:137)
        at $ApplicationStateManager_1177f9ee272.exists($ApplicationStateManager_1177f9ee272.java)
        at org.rz.bugdemo.services.AppModule$1.service(AppModule.java:46)
        at $RequestFilter_1177f9ee26a.service($RequestFilter_1177f9ee26a.java)
        at $RequestHandler_1177f9ee26c.service($RequestHandler_1177f9ee26c.java)
        at org.apache.tapestry.internal.services.LocalizationFilter.service(LocalizationFilter.java:43)
        at $RequestHandler_1177f9ee26c.service($RequestHandler_1177f9ee26c.java)
        at org.apache.tapestry.services.TapestryModule$2.service(TapestryModule.java:485)
        at $RequestHandler_1177f9ee26c.service($RequestHandler_1177f9ee26c.java)
        at org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:79)
        at $RequestHandler_1177f9ee26c.service($RequestHandler_1177f9ee26c.java)
        at org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:94)
        at org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:85)
        at org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77)
        at org.apache.tapestry.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:107)
        at $RequestHandler_1177f9ee26c.service($RequestHandler_1177f9ee26c.java)
        at $RequestHandler_1177f9ee264.service($RequestHandler_1177f9ee264.java)
        at org.apache.tapestry.services.TapestryModule$11.service(TapestryModule.java:871)
        at $HttpServletRequestHandler_1177f9ee263.service($HttpServletRequestHandler_1177f9ee263.java)
        at org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:164)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:722)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:404)
        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
        at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
        at org.mortbay.jetty.Server.handle(Server.java:324)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
        at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
        at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

        The ExceptionReport fails with a different stack trace.

        Show
        Howard M. Lewis Ship added a comment - This is the real stack trace: java.lang.NullPointerException at $Request_1177f9ee274.getSession($Request_1177f9ee274.java) at $Request_1177f9ee258.getSession($Request_1177f9ee258.java) at org.apache.tapestry.internal.services.SessionApplicationStatePersistenceStrategy.exists(SessionApplicationStatePersistenceStrategy.java:79) at org.apache.tapestry.internal.services.ApplicationStateManagerImpl$ApplicationStateAdapter.exists(ApplicationStateManagerImpl.java:54) at org.apache.tapestry.internal.services.ApplicationStateManagerImpl.exists(ApplicationStateManagerImpl.java:137) at $ApplicationStateManager_1177f9ee272.exists($ApplicationStateManager_1177f9ee272.java) at org.rz.bugdemo.services.AppModule$1.service(AppModule.java:46) at $RequestFilter_1177f9ee26a.service($RequestFilter_1177f9ee26a.java) at $RequestHandler_1177f9ee26c.service($RequestHandler_1177f9ee26c.java) at org.apache.tapestry.internal.services.LocalizationFilter.service(LocalizationFilter.java:43) at $RequestHandler_1177f9ee26c.service($RequestHandler_1177f9ee26c.java) at org.apache.tapestry.services.TapestryModule$2.service(TapestryModule.java:485) at $RequestHandler_1177f9ee26c.service($RequestHandler_1177f9ee26c.java) at org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:79) at $RequestHandler_1177f9ee26c.service($RequestHandler_1177f9ee26c.java) at org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:94) at org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:85) at org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77) at org.apache.tapestry.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:107) at $RequestHandler_1177f9ee26c.service($RequestHandler_1177f9ee26c.java) at $RequestHandler_1177f9ee264.service($RequestHandler_1177f9ee264.java) at org.apache.tapestry.services.TapestryModule$11.service(TapestryModule.java:871) at $HttpServletRequestHandler_1177f9ee263.service($HttpServletRequestHandler_1177f9ee263.java) at org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:164) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:722) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:404) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450) The ExceptionReport fails with a different stack trace.
        Hide
        Howard M. Lewis Ship added a comment -

        Verified in 5.0.7 and 5.0.8-SNAPSHOT (thanks for the example!). I think this is an order-of-operations thing, it's just a matter of getting the Request into RequestGlobals earlier (then overwritting it at the end of the pipeline, in case a filter substituted it).

        Show
        Howard M. Lewis Ship added a comment - Verified in 5.0.7 and 5.0.8-SNAPSHOT (thanks for the example!). I think this is an order-of-operations thing, it's just a matter of getting the Request into RequestGlobals earlier (then overwritting it at the end of the pipeline, in case a filter substituted it).
        Robert Zeigler made changes -
        Field Original Value New Value
        Attachment bugdemo.tgz [ 12360627 ]
        Hide
        Robert Zeigler added a comment -

        eclipse project built using 5.0.5-SNAPSHOT quickstart archetype which consistently reproduces the error.

        Show
        Robert Zeigler added a comment - eclipse project built using 5.0.5-SNAPSHOT quickstart archetype which consistently reproduces the error.
        Hide
        Robert Zeigler added a comment -

        Seeing the same thing. In my case, I see it when I'm trying to check for the existence of an ASO in a custom RequestFilter.
        Stack trace looks basically the same, once you get further down. I'll try grabbing the developer preview of java 6 for os x and see if the problem goes away, as reported by Ben.

        12:00:55.516 ERROR! [SocketListener0-1] org.apache.tapestry.internal.services.DefaultRequestExceptionHandler.handleRequestException(DefaultRequestExceptionHandler.java:50) >28> Processing of request failed with uncaught exception: java.lang.NullPointerException
        java.lang.NullPointerException
        at $Request_11368fa64ee.getSession($Request_11368fa64ee.java)
        at $Request_11368fa64d7.getSession($Request_11368fa64d7.java)
        at org.apache.tapestry.internal.services.SessionApplicationStatePersistenceStrategy.exists(SessionApplicationStatePersistenceStrategy.java:79)
        at org.apache.tapestry.internal.services.ApplicationStateManagerImpl$ApplicationStateAdapter.exists(ApplicationStateManagerImpl.java:59)
        at org.apache.tapestry.internal.services.ApplicationStateManagerImpl.exists(ApplicationStateManagerImpl.java:144)
        at $ApplicationStateManager_11368fa64ec.exists($ApplicationStateManager_11368fa64ec.java)
        at org.edkey.attendance.services.AuthenticationFilter.service(AuthenticationFilter.java:43)
        at $RequestFilter_11368fa64e4.service($RequestFilter_11368fa64e4.java)
        at $RequestHandler_11368fa64e6.service($RequestHandler_11368fa64e6.java)
        at org.edkey.attendance.services.CayenneFilter.service(CayenneFilter.java:39)
        at $RequestFilter_11368fa64e3.service($RequestFilter_11368fa64e3.java)
        at $RequestHandler_11368fa64e6.service($RequestHandler_11368fa64e6.java)
        at org.edkey.attendance.services.AppModule$1.service(AppModule.java:57)
        at $RequestFilter_11368fa64e2.service($RequestFilter_11368fa64e2.java)
        at $RequestHandler_11368fa64e6.service($RequestHandler_11368fa64e6.java)
        at org.apache.tapestry.internal.services.LocalizationFilter.service(LocalizationFilter.java:43)
        at $RequestHandler_11368fa64e6.service($RequestHandler_11368fa64e6.java)
        at org.apache.tapestry.services.TapestryModule$3.service(TapestryModule.java:667)
        at $RequestHandler_11368fa64e6.service($RequestHandler_11368fa64e6.java)
        at org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:63)
        at $RequestHandler_11368fa64e6.service($RequestHandler_11368fa64e6.java)
        at org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:91)
        at org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:82)
        at org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77)
        at org.apache.tapestry.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:104)
        at $RequestHandler_11368fa64e6.service($RequestHandler_11368fa64e6.java)
        at $RequestHandler_11368fa64dd.service($RequestHandler_11368fa64dd.java)
        at org.apache.tapestry.services.TapestryModule$11.service(TapestryModule.java:1045)
        at $HttpServletRequestHandler_11368fa64dc.service($HttpServletRequestHandler_11368fa64dc.java)
        at org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:135)
        at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
        at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
        at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
        at org.mortbay.http.HttpServer.service(HttpServer.java:909)
        at org.mortbay.http.HttpConnection.service(HttpConnection.java:820)
        at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986)
        at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837)
        at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245)
        at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
        at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

        12:00:56.162 ERROR! [SocketListener0-1] org.apache.tapestry.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:65) >33> Render queue error in BeginRender[core/ExceptionReport:renderobject_0]: org.apache.tapestry.ioc.internal.util.TapestryException
        org.apache.tapestry.ioc.internal.util.TapestryException [at classpath:org/apache/tapestry/corelib/pages/ExceptionReport.html, line 45, column 41]
        at org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:935)
        at org.apache.tapestry.internal.structure.ComponentPageElementImpl.access$100(ComponentPageElementImpl.java:69)
        at org.apache.tapestry.internal.structure.ComponentPageElementImpl$10.render(ComponentPageElementImpl.java:349)
        at org.apache.tapestry.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:57)
        at org.apache.tapestry.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:40)
        at $PageMarkupRenderer_11368fa6517.renderPageMarkup($PageMarkupRenderer_11368fa6517.java)
        at org.apache.tapestry.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:45)
        at $PageResponseRenderer_11368fa64cc.renderPageResponse($PageResponseRenderer_11368fa64cc.java)
        at org.apache.tapestry.internal.services.DefaultRequestExceptionHandler.handleRequestException(DefaultRequestExceptionHandler.java:60)
        at $RequestExceptionHandler_11368fa64e0.handleRequestException($RequestExceptionHandler_11368fa64e0.java)
        at org.apache.tapestry.services.TapestryModule$3.service(TapestryModule.java:676)
        at $RequestHandler_11368fa64e6.service($RequestHandler_11368fa64e6.java)
        at org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:63)
        at $RequestHandler_11368fa64e6.service($RequestHandler_11368fa64e6.java)
        at org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:91)
        at org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:82)
        at org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77)
        at org.apache.tapestry.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:104)
        at $RequestHandler_11368fa64e6.service($RequestHandler_11368fa64e6.java)
        at $RequestHandler_11368fa64dd.service($RequestHandler_11368fa64dd.java)
        at org.apache.tapestry.services.TapestryModule$11.service(TapestryModule.java:1045)
        at $HttpServletRequestHandler_11368fa64dc.service($HttpServletRequestHandler_11368fa64dc.java)
        at org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:135)
        at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
        at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
        at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
        at org.mortbay.http.HttpServer.service(HttpServer.java:909)
        at org.mortbay.http.HttpConnection.service(HttpConnection.java:820)
        at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986)
        at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837)
        at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245)
        at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
        at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
        Caused by: java.lang.NullPointerException
        at $Request_11368fa64ee.getContextPath($Request_11368fa64ee.java)
        at $Request_11368fa64d7.getContextPath($Request_11368fa64d7.java)
        at org.apache.tapestry.internal.services.RequestRenderer.render(RequestRenderer.java:34)
        at org.apache.tapestry.internal.services.RequestRenderer.render(RequestRenderer.java:24)
        at $ObjectRenderer_11368fa6521.render($ObjectRenderer_11368fa6521.java)
        at $ObjectRenderer_11368fa64c2.render($ObjectRenderer_11368fa64c2.java)
        at org.apache.tapestry.corelib.components.RenderObject.beginRender(RenderObject.java:37)
        at org.apache.tapestry.corelib.components.RenderObject.beginRender(RenderObject.java)
        at org.apache.tapestry.internal.structure.ComponentPageElementImpl$10$1.run(ComponentPageElementImpl.java:345)
        at org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:923)
        ... 35 more

        12:00:56.164 ERROR! [SocketListener0-1] org.apache.tapestry.internal.services.PagePoolImpl.release(PagePoolImpl.java:83) >20> Page Page[core/ExceptionReport en] is dirty, and will be discarded (rather than returned to the page pool).
        [ERROR] attendance Tapestry 5 Application /:
        org.apache.tapestry.ioc.internal.util.TapestryException [at classpath:org/apache/tapestry/corelib/pages/ExceptionReport.html, line 45, column 41]
        at org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:935)
        at org.apache.tapestry.internal.structure.ComponentPageElementImpl.access$100(ComponentPageElementImpl.java:69)
        at org.apache.tapestry.internal.structure.ComponentPageElementImpl$10.render(ComponentPageElementImpl.java:349)
        at org.apache.tapestry.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:57)
        at org.apache.tapestry.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:40)
        at $PageMarkupRenderer_11368fa6517.renderPageMarkup($PageMarkupRenderer_11368fa6517.java)
        at org.apache.tapestry.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:45)
        at $PageResponseRenderer_11368fa64cc.renderPageResponse($PageResponseRenderer_11368fa64cc.java)
        at org.apache.tapestry.internal.services.DefaultRequestExceptionHandler.handleRequestException(DefaultRequestExceptionHandler.java:60)
        at $RequestExceptionHandler_11368fa64e0.handleRequestException($RequestExceptionHandler_11368fa64e0.java)
        at org.apache.tapestry.services.TapestryModule$3.service(TapestryModule.java:676)
        at $RequestHandler_11368fa64e6.service($RequestHandler_11368fa64e6.java)
        at org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:63)
        at $RequestHandler_11368fa64e6.service($RequestHandler_11368fa64e6.java)
        at org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:91)
        at org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:82)
        at org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77)
        at org.apache.tapestry.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:104)
        at $RequestHandler_11368fa64e6.service($RequestHandler_11368fa64e6.java)
        at $RequestHandler_11368fa64dd.service($RequestHandler_11368fa64dd.java)
        at org.apache.tapestry.services.TapestryModule$11.service(TapestryModule.java:1045)
        at $HttpServletRequestHandler_11368fa64dc.service($HttpServletRequestHandler_11368fa64dc.java)
        at org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:135)
        at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
        at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
        at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
        at org.mortbay.http.HttpServer.service(HttpServer.java:909)
        at org.mortbay.http.HttpConnection.service(HttpConnection.java:820)
        at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986)
        at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837)
        at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245)
        at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
        at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
        Caused by: java.lang.NullPointerException
        at $Request_11368fa64ee.getContextPath($Request_11368fa64ee.java)
        at $Request_11368fa64d7.getContextPath($Request_11368fa64d7.java)
        at org.apache.tapestry.internal.services.RequestRenderer.render(RequestRenderer.java:34)
        at org.apache.tapestry.internal.services.RequestRenderer.render(RequestRenderer.java:24)
        at $ObjectRenderer_11368fa6521.render($ObjectRenderer_11368fa6521.java)
        at $ObjectRenderer_11368fa64c2.render($ObjectRenderer_11368fa64c2.java)
        at org.apache.tapestry.corelib.components.RenderObject.beginRender(RenderObject.java:37)
        at org.apache.tapestry.corelib.components.RenderObject.beginRender(RenderObject.java)
        at org.apache.tapestry.internal.structure.ComponentPageElementImpl$10$1.run(ComponentPageElementImpl.java:345)
        at org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:923)
        ... 35 more

        Show
        Robert Zeigler added a comment - Seeing the same thing. In my case, I see it when I'm trying to check for the existence of an ASO in a custom RequestFilter. Stack trace looks basically the same, once you get further down. I'll try grabbing the developer preview of java 6 for os x and see if the problem goes away, as reported by Ben. 12:00:55.516 ERROR! [SocketListener0-1] org.apache.tapestry.internal.services.DefaultRequestExceptionHandler.handleRequestException(DefaultRequestExceptionHandler.java:50) >28> Processing of request failed with uncaught exception: java.lang.NullPointerException java.lang.NullPointerException at $Request_11368fa64ee.getSession($Request_11368fa64ee.java) at $Request_11368fa64d7.getSession($Request_11368fa64d7.java) at org.apache.tapestry.internal.services.SessionApplicationStatePersistenceStrategy.exists(SessionApplicationStatePersistenceStrategy.java:79) at org.apache.tapestry.internal.services.ApplicationStateManagerImpl$ApplicationStateAdapter.exists(ApplicationStateManagerImpl.java:59) at org.apache.tapestry.internal.services.ApplicationStateManagerImpl.exists(ApplicationStateManagerImpl.java:144) at $ApplicationStateManager_11368fa64ec.exists($ApplicationStateManager_11368fa64ec.java) at org.edkey.attendance.services.AuthenticationFilter.service(AuthenticationFilter.java:43) at $RequestFilter_11368fa64e4.service($RequestFilter_11368fa64e4.java) at $RequestHandler_11368fa64e6.service($RequestHandler_11368fa64e6.java) at org.edkey.attendance.services.CayenneFilter.service(CayenneFilter.java:39) at $RequestFilter_11368fa64e3.service($RequestFilter_11368fa64e3.java) at $RequestHandler_11368fa64e6.service($RequestHandler_11368fa64e6.java) at org.edkey.attendance.services.AppModule$1.service(AppModule.java:57) at $RequestFilter_11368fa64e2.service($RequestFilter_11368fa64e2.java) at $RequestHandler_11368fa64e6.service($RequestHandler_11368fa64e6.java) at org.apache.tapestry.internal.services.LocalizationFilter.service(LocalizationFilter.java:43) at $RequestHandler_11368fa64e6.service($RequestHandler_11368fa64e6.java) at org.apache.tapestry.services.TapestryModule$3.service(TapestryModule.java:667) at $RequestHandler_11368fa64e6.service($RequestHandler_11368fa64e6.java) at org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:63) at $RequestHandler_11368fa64e6.service($RequestHandler_11368fa64e6.java) at org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:91) at org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:82) at org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77) at org.apache.tapestry.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:104) at $RequestHandler_11368fa64e6.service($RequestHandler_11368fa64e6.java) at $RequestHandler_11368fa64dd.service($RequestHandler_11368fa64dd.java) at org.apache.tapestry.services.TapestryModule$11.service(TapestryModule.java:1045) at $HttpServletRequestHandler_11368fa64dc.service($HttpServletRequestHandler_11368fa64dc.java) at org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:135) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568) at org.mortbay.http.HttpContext.handle(HttpContext.java:1530) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633) at org.mortbay.http.HttpContext.handle(HttpContext.java:1482) at org.mortbay.http.HttpServer.service(HttpServer.java:909) at org.mortbay.http.HttpConnection.service(HttpConnection.java:820) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534) 12:00:56.162 ERROR! [SocketListener0-1] org.apache.tapestry.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:65) >33> Render queue error in BeginRender [core/ExceptionReport:renderobject_0] : org.apache.tapestry.ioc.internal.util.TapestryException org.apache.tapestry.ioc.internal.util.TapestryException [at classpath:org/apache/tapestry/corelib/pages/ExceptionReport.html, line 45, column 41] at org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:935) at org.apache.tapestry.internal.structure.ComponentPageElementImpl.access$100(ComponentPageElementImpl.java:69) at org.apache.tapestry.internal.structure.ComponentPageElementImpl$10.render(ComponentPageElementImpl.java:349) at org.apache.tapestry.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:57) at org.apache.tapestry.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:40) at $PageMarkupRenderer_11368fa6517.renderPageMarkup($PageMarkupRenderer_11368fa6517.java) at org.apache.tapestry.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:45) at $PageResponseRenderer_11368fa64cc.renderPageResponse($PageResponseRenderer_11368fa64cc.java) at org.apache.tapestry.internal.services.DefaultRequestExceptionHandler.handleRequestException(DefaultRequestExceptionHandler.java:60) at $RequestExceptionHandler_11368fa64e0.handleRequestException($RequestExceptionHandler_11368fa64e0.java) at org.apache.tapestry.services.TapestryModule$3.service(TapestryModule.java:676) at $RequestHandler_11368fa64e6.service($RequestHandler_11368fa64e6.java) at org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:63) at $RequestHandler_11368fa64e6.service($RequestHandler_11368fa64e6.java) at org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:91) at org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:82) at org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77) at org.apache.tapestry.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:104) at $RequestHandler_11368fa64e6.service($RequestHandler_11368fa64e6.java) at $RequestHandler_11368fa64dd.service($RequestHandler_11368fa64dd.java) at org.apache.tapestry.services.TapestryModule$11.service(TapestryModule.java:1045) at $HttpServletRequestHandler_11368fa64dc.service($HttpServletRequestHandler_11368fa64dc.java) at org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:135) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568) at org.mortbay.http.HttpContext.handle(HttpContext.java:1530) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633) at org.mortbay.http.HttpContext.handle(HttpContext.java:1482) at org.mortbay.http.HttpServer.service(HttpServer.java:909) at org.mortbay.http.HttpConnection.service(HttpConnection.java:820) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534) Caused by: java.lang.NullPointerException at $Request_11368fa64ee.getContextPath($Request_11368fa64ee.java) at $Request_11368fa64d7.getContextPath($Request_11368fa64d7.java) at org.apache.tapestry.internal.services.RequestRenderer.render(RequestRenderer.java:34) at org.apache.tapestry.internal.services.RequestRenderer.render(RequestRenderer.java:24) at $ObjectRenderer_11368fa6521.render($ObjectRenderer_11368fa6521.java) at $ObjectRenderer_11368fa64c2.render($ObjectRenderer_11368fa64c2.java) at org.apache.tapestry.corelib.components.RenderObject.beginRender(RenderObject.java:37) at org.apache.tapestry.corelib.components.RenderObject.beginRender(RenderObject.java) at org.apache.tapestry.internal.structure.ComponentPageElementImpl$10$1.run(ComponentPageElementImpl.java:345) at org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:923) ... 35 more 12:00:56.164 ERROR! [SocketListener0-1] org.apache.tapestry.internal.services.PagePoolImpl.release(PagePoolImpl.java:83) >20> Page Page [core/ExceptionReport en] is dirty, and will be discarded (rather than returned to the page pool). [ERROR] attendance Tapestry 5 Application /: org.apache.tapestry.ioc.internal.util.TapestryException [at classpath:org/apache/tapestry/corelib/pages/ExceptionReport.html, line 45, column 41] at org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:935) at org.apache.tapestry.internal.structure.ComponentPageElementImpl.access$100(ComponentPageElementImpl.java:69) at org.apache.tapestry.internal.structure.ComponentPageElementImpl$10.render(ComponentPageElementImpl.java:349) at org.apache.tapestry.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:57) at org.apache.tapestry.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:40) at $PageMarkupRenderer_11368fa6517.renderPageMarkup($PageMarkupRenderer_11368fa6517.java) at org.apache.tapestry.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:45) at $PageResponseRenderer_11368fa64cc.renderPageResponse($PageResponseRenderer_11368fa64cc.java) at org.apache.tapestry.internal.services.DefaultRequestExceptionHandler.handleRequestException(DefaultRequestExceptionHandler.java:60) at $RequestExceptionHandler_11368fa64e0.handleRequestException($RequestExceptionHandler_11368fa64e0.java) at org.apache.tapestry.services.TapestryModule$3.service(TapestryModule.java:676) at $RequestHandler_11368fa64e6.service($RequestHandler_11368fa64e6.java) at org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:63) at $RequestHandler_11368fa64e6.service($RequestHandler_11368fa64e6.java) at org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:91) at org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:82) at org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77) at org.apache.tapestry.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:104) at $RequestHandler_11368fa64e6.service($RequestHandler_11368fa64e6.java) at $RequestHandler_11368fa64dd.service($RequestHandler_11368fa64dd.java) at org.apache.tapestry.services.TapestryModule$11.service(TapestryModule.java:1045) at $HttpServletRequestHandler_11368fa64dc.service($HttpServletRequestHandler_11368fa64dc.java) at org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:135) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568) at org.mortbay.http.HttpContext.handle(HttpContext.java:1530) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633) at org.mortbay.http.HttpContext.handle(HttpContext.java:1482) at org.mortbay.http.HttpServer.service(HttpServer.java:909) at org.mortbay.http.HttpConnection.service(HttpConnection.java:820) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534) Caused by: java.lang.NullPointerException at $Request_11368fa64ee.getContextPath($Request_11368fa64ee.java) at $Request_11368fa64d7.getContextPath($Request_11368fa64d7.java) at org.apache.tapestry.internal.services.RequestRenderer.render(RequestRenderer.java:34) at org.apache.tapestry.internal.services.RequestRenderer.render(RequestRenderer.java:24) at $ObjectRenderer_11368fa6521.render($ObjectRenderer_11368fa6521.java) at $ObjectRenderer_11368fa64c2.render($ObjectRenderer_11368fa64c2.java) at org.apache.tapestry.corelib.components.RenderObject.beginRender(RenderObject.java:37) at org.apache.tapestry.corelib.components.RenderObject.beginRender(RenderObject.java) at org.apache.tapestry.internal.structure.ComponentPageElementImpl$10$1.run(ComponentPageElementImpl.java:345) at org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:923) ... 35 more
        Hide
        Ben Sommerville added a comment -

        I was getting this error consistently in my application (when a particular load/request was applied) so I investigated it a bit more. The NPE was caused by the RequestGlobals.request being null.

        With a bit of debugging I found that the request was being stored correctly into RequestGlobals (TapestryModule:1037) but when the PersistentLocale went to access the request to obtain its cookie a new RequestGlobals instance was being created & used.

        Which is very strange because the store request was in the same call stack.

        I suspect that the problem may be caused by a JVM bug. It is possible for ThreadLocal.initialValue to be called twice for a thread local in JVM versions < 6. See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6550283

        To verify this I changed over to java 6u1 and was unable to reproduce the NPE.
        (although I did hit another bug & had to change the ConcurrentBarrier RW lock to "fair" mode).

        Show
        Ben Sommerville added a comment - I was getting this error consistently in my application (when a particular load/request was applied) so I investigated it a bit more. The NPE was caused by the RequestGlobals.request being null. With a bit of debugging I found that the request was being stored correctly into RequestGlobals (TapestryModule:1037) but when the PersistentLocale went to access the request to obtain its cookie a new RequestGlobals instance was being created & used. Which is very strange because the store request was in the same call stack. I suspect that the problem may be caused by a JVM bug. It is possible for ThreadLocal.initialValue to be called twice for a thread local in JVM versions < 6. See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6550283 To verify this I changed over to java 6u1 and was unable to reproduce the NPE. (although I did hit another bug & had to change the ConcurrentBarrier RW lock to "fair" mode).
        Hide
        Howard M. Lewis Ship added a comment -

        That's very odd; it appears on this line:

        String contextPath = request.getContextPath();

        request, in this case, is a Request instance as a shadow proxy to the RequestGlobals' request property. The NPE is because RequestGlobals.request is null.

        I'm not exactly sure how that could happen.

        Show
        Howard M. Lewis Ship added a comment - That's very odd; it appears on this line: String contextPath = request.getContextPath(); request, in this case, is a Request instance as a shadow proxy to the RequestGlobals' request property. The NPE is because RequestGlobals.request is null. I'm not exactly sure how that could happen.
        Stephan Schwab created issue -

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Stephan Schwab
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development