|
|
|
I've come across a similar NPE in similar circumstances. It too is intermittent and seems to be session related. IMHO the priority should be higher than minor as this NPE causes the application to be unstable.
My guess is that it's a symptom of the same bug, if it turns out not to be i can log it as a separate issue. java.lang.NullPointerException at com.opensymphony.oscache.base.algorithm.AbstractConcurrentReadCache.get(AbstractConcurrentReadCache.java:686) at com.opensymphony.oscache.base.Cache.getCacheEntry(Cache.java:596) at com.opensymphony.oscache.base.Cache.getFromCache(Cache.java:227) at com.opensymphony.oscache.base.Cache.getFromCache(Cache.java:202) at com.opensymphony.oscache.web.ServletCacheAdministrator.getFromCache(ServletCacheAdministrator.java:356) at com.mobileaware.cache.e.b(SourceFile:104) at com.mobileaware.cache.documentcache.a.d(SourceFile:168) at com.mobileaware.cache.documentcache.a.b(SourceFile:64) at com.mobileaware.mcp.h.E(SourceFile:486) at com.mobileaware.mcp.MobilityFilter.a(SourceFile:492) at com.mobileaware.mcp.MobilityFilter.a(SourceFile:1098) at com.mobileaware.mcp.MobilityFilter.a(SourceFile:932) at com.mobileaware.mcp.MobilityFilter.a(SourceFile:625) at com.mobileaware.mcp.MobilityFilter.doFilter(SourceFile:1253) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Thread.java:534) I have a similar but in my case fairly fatal problem. I am using session based caching, and when I restart Tomcat (v 5.0.19) any browser session still open gets errors (which are of course also in the logs):- 2004-04-06 17:43:07 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at com.opensymphony.oscache.base.algorithm.AbstractConcurrentReadCache.get(AbstractConcurrentReadCache.java:686) at com.opensymphony.oscache.base.Cache.getCacheEntry(Cache.java:594) at com.opensymphony.oscache.base.Cache.getFromCache(Cache.java:227) at com.opensymphony.oscache.web.tag.CacheTag.doStartTag(CacheTag.java:482) The only work around I can think of is to try to devise an error page to catch this situation and invalidate the session, or at least clear the session cache. When i debug my jsps using exploded webapps this NPE happens every time i copy a new version of the JSP into the directory. This is very frustrating because i'm loosing a fairly great amount of time restarting my j2EE server to zero the oscache state...
It is not acceptable to me to deploy oscache in the project assuming that this only happens when modifying JSP's on the fly so if this bug could be corrected it would save me the time of reimplementing a simple hashtable cache Thx ps : it seems that the table var is null but i don't see why it can happen (int index = hash & (tab.length - 1)) maybe it has been reloaded too ??? Here goes the NPE stack trace : java.lang.NullPointerException at com.opensymphony.oscache.base.algorithm.AbstractConcurrentReadCache.g et(AbstractConcurrentReadCache.java:686) at com.opensymphony.oscache.base.Cache.getCacheEntry(Cache.java:594) at com.opensymphony.oscache.base.Cache.getFromCache(Cache.java:227) at com.opensymphony.oscache.web.tag.CacheTag.doStartTag(CacheTag.java:47 9) at jsp_servlet._test.__application._jspService(__application.java:217) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run (ServletStubImpl.java:1058) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:401) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:306) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio n.run(WebAppServletContext.java:5445) at weblogic.security.service.SecurityServiceManager.runAs(SecurityServic eManager.java:780) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe rvletContext.java:3105) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm pl.java:2588) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189) Hi,
I'm getting this error too. I'm using tomcat-5.0.25, jgroups-2.2.6 for clustering and session based caching. The problem is that the cache table is cleared whenever the context of the webapp is reloaded in tomcat. Does anyone have a solution? Thanks. COntext reloading is broken in tomcat. Can anybody provide a junit test case that demonstrates this bug? I am sure there is something going on but I am not convinced it is oscache.
I am getting the same error using weblogic server here with seesion based caching. This should have been a higher priority issue, wonder why it is marked minor.
Does anyone have a solution. thanks Samir, please add your error log and the OSCache version you are using.
OSCache Version 1.1
NullPointerException at com.opensymphony.oscache.base.algorithm.AbstractConcurrentReadCache.get(AbstractConcurrentReadCache.java:686) at com.opensymphony.oscache.base.Cache.getCacheEntry(Cache.java:594) at com.opensymphony.oscache.base.Cache.flushEntry(Cache.java:418) at com.opensymphony.oscache.base.Cache.flushEntry(Cache.java:405) at com.test.presentation.cache.CacheAdministrator.flushQueryFromCache Many thanks Lars, the problem has not reoccurred here since I updated the version to 2.1
It seems to be ok now! | ||||||||||||||||||||||||||||||||||||||||||||||
My guess is that it's a symptom of the same bug, if it turns out not to be i can log it as a separate issue.
java.lang.NullPointerException
at com.opensymphony.oscache.base.algorithm.AbstractConcurrentReadCache.get(AbstractConcurrentReadCache.java:686)
at com.opensymphony.oscache.base.Cache.getCacheEntry(Cache.java:596)
at com.opensymphony.oscache.base.Cache.getFromCache(Cache.java:227)
at com.opensymphony.oscache.base.Cache.getFromCache(Cache.java:202)
at com.opensymphony.oscache.web.ServletCacheAdministrator.getFromCache(ServletCacheAdministrator.java:356)
at com.mobileaware.cache.e.b(SourceFile:104)
at com.mobileaware.cache.documentcache.a.d(SourceFile:168)
at com.mobileaware.cache.documentcache.a.b(SourceFile:64)
at com.mobileaware.mcp.h.E(SourceFile:486)
at com.mobileaware.mcp.MobilityFilter.a(SourceFile:492)
at com.mobileaware.mcp.MobilityFilter.a(SourceFile:1098)
at com.mobileaware.mcp.MobilityFilter.a(SourceFile:932)
at com.mobileaware.mcp.MobilityFilter.a(SourceFile:625)
at com.mobileaware.mcp.MobilityFilter.doFilter(SourceFile:1253)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)