1 Reply Latest reply on May 3, 2007 12:31 PM by Manik Surtani

    NullPointer after context shutdown

    Graham Smith Newbie


      I've been using JBoss Cache for a while now but there is one problem that I haven't been able to fix. I'm using the TreeCache as a standalone component in a webapp deployed to Tomcat.

      The cache works fine, I can put objects into it and get them back at will and time outs work fine. I'm not doing anything clever with the cache - no replication or transactions - just a plain object cache.

      The problem comes when I release a new version of the software. The cache is started and stopped by a ServletContextListener. As far as I can tell the starting and stopping of the cache is working fine. About 5 to 30 minutes after I deploy the latest version of the application I start getting this stack trace appear in the tomcat log file:

       at org.jboss.cache.marshall.MethodDeclarations.lookupMethodId(MethodDeclarations.java:351)
       at org.jboss.cache.marshall.MethodCallFactory.create(MethodCallFactory.java:28)
       at org.jboss.cache.TreeCache.evict(TreeCache.java:3715)
       at org.jboss.cache.eviction.BaseEvictionPolicy.evict(BaseEvictionPolicy.java:34)
       at org.jboss.cache.eviction.BaseEvictionAlgorithm.evictCacheNode(BaseEvictionAlgorithm.java:210)
       at org.jboss.cache.eviction.BaseEvictionAlgorithm.emptyRecycleQueue(BaseEvictionAlgorithm.java:461)
       at org.jboss.cache.eviction.BaseEvictionAlgorithm.process(BaseEvictionAlgorithm.java:97)
       at org.jboss.cache.eviction.EvictionTimerTask.run(EvictionTimerTask.java:80)
       at java.util.TimerThread.mainLoop(Timer.java:512)
       at java.util.TimerThread.run(Timer.java:462)

      The above stack trace then appears every few seconds until I restart Tomcat. The application runs fine even though this stack trace is being produced but the log files grow huge in a few days. Obviously, I don't want to restart Tomcat every time I redeploy an application. Could anyone shed some light on what I might be doing wrong? I'm currently using version 1.4.0.SP1 "Jalapeno" but I'm happy to upgrade if it fixes this problem.