Just a thought - What would happen to your application if the user
double-clicked the login button? (or whatever causes the page to load)

We also sometimes see such errors if some page loads too slow and the user
gets annoyed and logges in again (the login screen invalidates the old
session in our application)
When the slow thread then reaches the point where it wants to read the
attribute it's gone as the session is invalidated.

Hth,
Tobias
> -----Original Message-----
> From: David Gagnon [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 19, 2005 3:46 PM
> To: Tomcat Users List
> Subject: Re: Tomcat 4.1.31, Weird problem. Once in a while an 
> attribute in the session is not found... look like a RACE?! 
> Is that possible????
> 
> 
> Hi,
> 
> 
> In catalina.out I get nothing more than the null pointer exception. I
> also included the log from localhost_log.2005-12-15 where we 
> can see the
> actual request.
> 
> Thanks for you help!
> Regards
> /David
> 
> 
> ----------------localhost_log.2005-12-15
> 2005-12-15 15:19:56 StandardContext[/webCatalog]: Mapped to servlet
> 'action' with servlet path '/logon.do' and path info 'null' 
> and update=true
> 2005-12-15 15:20:07 Authenticator[/webCatalog]: Security checking
> request POST /webCatalog/publicPages/j_security_check
> 2005-12-15 15:20:07 Authenticator[/webCatalog]: We have 
> cached auth type
> FORM for principal GenericPrincipal[cabg]
> 2005-12-15 15:20:07 Authenticator[/webCatalog]: Already 
> authenticated 'cabg'
> 2005-12-15 15:20:07 Authenticator[/webCatalog]: Checking constraint
> 'SecurityConstraint[Access-Authentication-Authorization Test Area]'
> against POST /publicPages/j_security_check --> false
> 2005-12-15 15:20:07 Authenticator[/webCatalog]: No applicable 
> constraint
> located
> 2005-12-15 15:20:07 Authenticator[/webCatalog]: Not subject to any
> constraint
> 2005-12-15 15:20:07 StandardContext[/webCatalog]: Mapping
> contextPath='/webCatalog' with
> requestURI='/webCatalog/publicPages/j_security_check' and
> relativeURI='/publicPages/j_security_check'
> 2005-12-15 15:20:07 StandardContext[/webCatalog]: Trying exact match
> 2005-12-15 15:20:07 StandardContext[/webCatalog]: Trying prefix match
> 2005-12-15 15:20:07 StandardContext[/webCatalog]: Trying 
> extension match
> 2005-12-15 15:20:07 StandardContext[/webCatalog]: Trying default match
> 2005-12-15 15:20:07 StandardContext[/webCatalog]: Mapped to servlet
> 'default' with servlet path '/publicPages/j_security_check' and path
> info 'null' and update=true
> 2005-12-15 15:20:07 StandardContext[/webCatalog]: Mapping
> contextPath='/webCatalog' with
> requestURI='/webCatalog/publicPages/index.jsp' and
> relativeURI='/publicPages/index.jsp'
> 2005-12-15 15:20:07 StandardContext[/webCatalog]: Trying exact match
> 2005-12-15 15:20:07 StandardContext[/webCatalog]: Mapped to servlet
> 'publicPages.index_jsp' with servlet path '/publicPages/index.jsp' and
> path info 'null' and update=true
> 2005-12-15 15:20:07 Authenticator[/webCatalog]: Security checking
> request GET /webCatalog/graphics/webSite/BG_LightBeige.gif
> 2005-12-15 15:20:07 Authenticator[/webCatalog]: We have 
> cached auth type
> FORM for principal GenericPrincipal[cabg]
> 2005-12-15 15:20:07 Authenticator[/webCatalog]: Checking constraint
> 'SecurityConstraint[Access-Authentication-Authorization Test Area]'
> against GET /graphics/webSite/BG_LightBeige.gif --> false
> 2005-12-15 15:20:07 Authenticator[/webCatalog]: No applicable 
> constraint
> located
> 2005-12-15 15:20:07 Authenticator[/webCatalog]: Not subject to any
> constraint
> 2005-12-15 15:20:07 StandardContext[/webCatalog]: Mapping
> contextPath='/webCatalog' with
> requestURI='/webCatalog/graphics/webSite/BG_LightBeige.gif' and
> relativeURI='/graphics/webSite/BG_LightBeige.gif'
> 2005-12-15 15:20:07 StandardContext[/webCatalog]: Trying exact match
> 2005-12-15 15:20:07 StandardContext[/webCatalog]: Trying prefix match
> 2005-12-15 15:20:07 StandardContext[/webCatalog]: Trying 
> extension match
> 2005-12-15 15:20:07 StandardContext[/webCatalog]: Trying default match
> 2005-12-15 15:20:07 StandardContext[/webCatalog]: Mapped to servlet
> 'default' with servlet path '/graphics/webSite/BG_LightBeige.gif' and
> path info 'null' and update=true
> 2005-12-15 15:20:07 StandardContext[/webCatalog]: Mapping
> contextPath='/webCatalog' with
> requestURI='/webCatalog/publicPages/index.jsp' and
> relativeURI='/publicPages/index.jsp'
> 2005-12-15 15:20:07 StandardContext[/webCatalog]: Trying exact match
> 2005-12-15 15:20:07 StandardContext[/webCatalog]: Mapped to servlet
> 'publicPages.index_jsp' with servlet path '/publicPages/index.jsp' and
> path info 'null' and update=true
> 2005-12-15 15:20:08 Authenticator[/webCatalog]: Security checking
> request POST /webCatalog/logon.do
> 2005-12-15 15:20:08 Authenticator[/webCatalog]: We have 
> cached auth type
> FORM for principal GenericPrincipal[cabg]
> 2005-12-15 15:20:08 Authenticator[/webCatalog]: Checking constraint
> 'SecurityConstraint[Access-Authentication-Authorization Test Area]'
> against POST /logon.do --> true
> 2005-12-15 15:20:08 Authenticator[/webCatalog]: Subject to constraint
> SecurityConstraint[Access-Authentication-Authorization Test Area]
> 2005-12-15 15:20:08 Authenticator[/webCatalog]: Calling 
> checkUserData()
> 2005-12-15 15:20:08 Authenticator[/webCatalog]: User data 
> constraint has
> no restrictions
> 2005-12-15 15:20:08 Authenticator[/webCatalog]: Calling authenticate()
> 2005-12-15 15:20:08 Authenticator[/webCatalog]: Already 
> authenticated 'cabg'
> 2005-12-15 15:20:08 Authenticator[/webCatalog]: Calling 
> accessControl()
> 2005-12-15 15:20:08 JDBCRealm[/webCatalog]: Username cabg has role
> applicationUser
> 2005-12-15 15:20:08 Authenticator[/webCatalog]: Successfully 
> passed all
> security constraints
> 2005-12-15 15:20:08 StandardContext[/webCatalog]: Mapping
> contextPath='/webCatalog' with requestURI='/webCatalog/logon.do' and
> relativeURI='/logon.do'
> 2005-12-15 15:20:08 StandardContext[/webCatalog]: Trying exact match
> 2005-12-15 15:20:08 StandardContext[/webCatalog]: Trying prefix match
> 2005-12-15 15:20:08 StandardContext[/webCatalog]: Trying 
> extension match
> 2005-12-15 15:20:08 StandardContext[/webCatalog]: Mapped to servlet
> 'action' with servlet path '/logon.do' and path info 'null' 
> and update=true
> 2005-12-15 15:20:08 StandardContext[/webCatalog]: Mapping
> contextPath='/webCatalog' with 
> requestURI='/webCatalog/orderSummary.do'
> and relativeURI='/orderSummary.do'
> 2005-12-15 15:20:08 StandardContext[/webCatalog]: Trying exact match
> 2005-12-15 15:20:08 StandardContext[/webCatalog]: Trying prefix match
> 2005-12-15 15:20:08 StandardContext[/webCatalog]: Trying 
> extension match
> 2005-12-15 15:20:08 StandardContext[/webCatalog]: Mapped to servlet
> 'action' with servlet path '/orderSummary.do' and path info 'null' and
> update=true
> 2005-12-15 15:20:09 StandardContext[/webCatalog]: Mapping
> contextPath='/webCatalog' with 
> requestURI='/webCatalog/bugAgent.do' and
> relativeURI='/bugAgent.do'
> 2005-12-15 15:20:09 StandardContext[/webCatalog]: Trying exact match
> 2005-12-15 15:20:09 StandardContext[/webCatalog]: Trying prefix match
> 2005-12-15 15:20:09 StandardContext[/webCatalog]: Trying 
> extension match
> 2005-12-15 15:20:09 StandardContext[/webCatalog]: Mapped to servlet
> 'action' with servlet path '/bugAgent.do' and path info 'null' and
> update=true
> 2005-12-15 15:20:09 StandardContext[/webCatalog]: Mapping
> contextPath='/webCatalog' with 
> requestURI='/webCatalog/orderSummary.do'
> and relativeURI='/orderSummary.do'
> 2005-12-15 15:20:09 StandardContext[/webCatalog]: Trying exact match
> 2005-12-15 15:20:09 StandardContext[/webCatalog]: Trying prefix match
> 2005-12-15 15:20:09 StandardContext[/webCatalog]: Trying 
> extension match
> 2005-12-15 15:20:09 StandardContext[/webCatalog]: Mapped to servlet
> 'action' with servlet path '/orderSummary.do' and path info 'null' and
> update=true
> 2005-12-15 15:20:12 StandardContext[/webCatalog]: Mapping
> contextPath='/webCatalog' with
> requestURI='/webCatalog/WEB-INF/pages/webSiteLayout/common/wcL
> ayout.jsp'
> and relativeURI='/WEB-INF/pages/webSiteLayout/common/wcLayout.jsp'
> 2005-12-15 15:20:12 StandardContext[/webCatalog]: Trying exact match
> 
> ------CATALINA.OUT-----
> WARN [http-8080-Processor155] (ExceptionManagerImpl.java:138) 
> 2005-12-15
> 15:20:08,686 : Exception not converted: null
> java.lang.NullPointerException
> at
> com.unik.webcatalog.action.order.OrderAction.executeSpecificAc
> tion(OrderAction.java:669)
> at com.davecorp.webos.action.BaseAction.execute(BaseAction.java:270)
> at
> org.apache.struts.action.RequestProcessor.processActionPerform
> (RequestProcessor.java:484)
> at
> com.davecorp.webos.struts.WindowEnabledRequestProcessor.proces
> s(WindowEnabledRequestProcessor.java:181)
> at 
> org.apache.struts.action.ActionServlet.process(ActionServlet.j
> ava:1482)
> at 
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:716)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
> at
> org.apache.catalina.core.ApplicationDispatcher.invoke(Applicat
> ionDispatcher.java:627)
> at
> org.apache.catalina.core.ApplicationDispatcher.doForward(Appli
> cationDispatcher.java:382)
> at
> org.apache.catalina.core.ApplicationDispatcher.forward(Applica
> tionDispatcher.java:306)
> at
> org.apache.struts.action.RequestProcessor.doForward(RequestPro
> cessor.java:1069)
> at
> org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesR
> equestProcessor.java:274)
> at
> org.apache.struts.action.RequestProcessor.processForwardConfig
> (RequestProcessor.java:455)
> at
> org.apache.struts.tiles.TilesRequestProcessor.processForwardCo
> nfig(TilesRequestProcessor.java:320)
> at
> com.davecorp.webos.struts.WindowEnabledRequestProcessor.proces
> s(WindowEnabledRequestProcessor.java:217)
> at 
> org.apache.struts.action.ActionServlet.process(ActionServlet.j
> ava:1482)
> at 
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:716)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(ApplicationFilterChain.java:200)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> cationFilterChain.java:146)
> at
> com.davecorp.webos.servlet.SetCharacterEncodingFilter.doFilter
> (SetCharacterEncodingFilter.java:141)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(ApplicationFilterChain.java:166)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> cationFilterChain.java:146)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
> rapperValve.java:209)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(StandardPipeline.java:596)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:433)
> at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardC
> ontextValve.java:144)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(StandardPipeline.java:596)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(Aut
> henticatorBase.java:504)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(StandardPipeline.java:594)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:433)
> at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
> at
> org.apache.catalina.core.StandardContext.invoke(StandardContex
> t.java:2358)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> Valve.java:133)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(StandardPipeline.java:596)
> at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi
> spatcherValve.java:118)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(StandardPipeline.java:594)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
> Valve.java:116)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(StandardPipeline.java:594)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:433)
> at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
> gineValve.java:127)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(StandardPipeline.java:596)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:433)
> at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
> at 
> org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.
> java:152)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Process
> or.java:799)
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle
> r.processConnection(Http11Protocol.java:705)
> at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoi
> nt.java:577)
> at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool.java:683)
> at java.lang.Thread.run(Thread.java:534)
> ERROR [http-8080-Processor155] (BugAgentExceptionHandler.java:30)
> 2005-12-15 15:20:08,835 :
> java.lang.NullPointerException
> at
> com.unik.webcatalog.action.order.OrderAction.executeSpecificAc
> tion(OrderAction.java:669)
> at com.davecorp.webos.action.BaseAction.execute(BaseAction.java:270)
> at
> org.apache.struts.action.RequestProcessor.processActionPerform
> (RequestProcessor.java:484)
> at
> com.davecorp.webos.struts.WindowEnabledRequestProcessor.proces
> s(WindowEnabledRequestProcessor.java:181)
> at 
> org.apache.struts.action.ActionServlet.process(ActionServlet.j
> ava:1482)
> at 
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:716)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
> at
> org.apache.catalina.core.ApplicationDispatcher.invoke(Applicat
> ionDispatcher.java:627)
> at
> org.apache.catalina.core.ApplicationDispatcher.doForward(Appli
> cationDispatcher.java:382)
> at
> org.apache.catalina.core.ApplicationDispatcher.forward(Applica
> tionDispatcher.java:306)
> at
> org.apache.struts.action.RequestProcessor.doForward(RequestPro
> cessor.java:1069)
> at
> org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesR
> equestProcessor.java:274)
> at
> org.apache.struts.action.RequestProcessor.processForwardConfig
> (RequestProcessor.java:455)
> at
> org.apache.struts.tiles.TilesRequestProcessor.processForwardCo
> nfig(TilesRequestProcessor.java:320)
> at
> com.davecorp.webos.struts.WindowEnabledRequestProcessor.proces
> s(WindowEnabledRequestProcessor.java:217)
> at 
> org.apache.struts.action.ActionServlet.process(ActionServlet.j
> ava:1482)
> at 
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:716)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(ApplicationFilterChain.java:200)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> cationFilterChain.java:146)
> at
> com.davecorp.webos.servlet.SetCharacterEncodingFilter.doFilter
> (SetCharacterEncodingFilter.java:141)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(ApplicationFilterChain.java:166)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> cationFilterChain.java:146)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
> rapperValve.java:209)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(StandardPipeline.java:596)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:433)
> at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardC
> ontextValve.java:144)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(StandardPipeline.java:596)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(Aut
> henticatorBase.java:504)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(StandardPipeline.java:594)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:433)
> at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
> at
> org.apache.catalina.core.StandardContext.invoke(StandardContex
> t.java:2358)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> Valve.java:133)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(StandardPipeline.java:596)
> at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi
> spatcherValve.java:118)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(StandardPipeline.java:594)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
> Valve.java:116)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(StandardPipeline.java:594)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:433)
> at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
> gineValve.java:127)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(StandardPipeline.java:596)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:433)
> at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
> at 
> org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.
> java:152)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Process
> or.java:799)
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle
> r.processConnection(Http11Protocol.java:705)
> at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoi
> nt.java:577)
> at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool.java:683)
> at java.lang.Thread.run(Thread.java:534)
> 
> 
> Martin Gainty wrote:
> 
> >Good Morning David-
> >
> >What does the log say?
> >
> >Martin-
> >----- Original Message ----- 
> >From: "David Gagnon" <[EMAIL PROTECTED]>
> >To: "Tomcat Users List" <users@tomcat.apache.org>
> >Sent: Monday, December 19, 2005 7:40 AM
> >Subject: Tomcat 4.1.31, Weird problem. Once in a while an 
> attribute in the session is not found... look like a RACE?! 
> Is that possible????
> >
> >
> >  
> >
> >>Hi all,
> >>
> >>I have a really wreird problem. I have a web site and I get a
> >>NullPointerException once in a while because the
> >>WcPresentationConstants.CURRENT_RESOURCE is null.
> >>
> >>UkResource resource = (UkResource)
> >>param.request.getSession().getAttribute(WcPresentationConsta
> nts.CURRENT_RESOURCE);
> >>
> >>
> >>But this code arrive just after the user logs in. And just 
> after we set
> >>the attribute. This error occurs every 3 or 4 weeks and I cannot
> >>reproduce it (So 99% of the time everything works just 
> fine). This code
> >>is always run just after the user log in so there is no 
> user interaction
> >>involved. If the error occurs I have a bug report sent and 
> I print the
> >>object in the report. In the last bug the Attribute was in 
> the REPORT
> >>?!?! (I remeber have seen a report where the same attribute 
> was null).
> >>For me it`s look like a race .. but all occurs in the same thread.
> >>
> >>Is tomcat can do copy of session object behind de scene.. 
> (maybe becaus
> >>of session reload ???) or is there anything in tomcat that 
> can explain
> >>this (If yes, how can I avoid it )? I just don`t get it I 
> chasing this
> >>bug for months now ...
> >>
> >>Thanks for your help
> >>
> >>------------------------------------------------------------
> ---------
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>    
> >>
> >>
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to