3 Replies Latest reply on Jan 10, 2005 11:54 AM by Thomas Cherel

    Getting Null Pointer Exception in Eviction Policy Config

    Venkata Siva Pulipati Newbie

      I am getting the following Exception with JBossCache eviction policy of a tree cache with the following entry in xml file.
      attribute name="EvictionPolicyConfig" <config
      30</attribute <region name="/_default_"
      1</attribute
      1000</attribute
      </region
      <region name="/a/b/"
      100</attribut
      attribute name="timeToLiveSeconds">300</attribute </region
      </config
      </attribute
      The Exception is
      java.lang.NullPointerException
      at org.jboss.cache.eviction.LRUPolicy.cacheStopped(LRUPolicy.java:206)
      at org.jboss.cache.TreeCache.notifyCacheStopped(TreeCache.java:3484)
      at org.jboss.cache.TreeCache.stopService(TreeCache.java:1466)
      at com.jpmorgan.gcrm.servlets.CacheServlet.doGet(CacheServlet.java:53)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
      at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
      at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
      at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
      at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
      at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
      at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)


      If I change the attribute name="timeToLiveSeconds">300</attribute
      to attribute name="timeToIdleSeconds">300</attribute, I am not getting any Exception. What was the Difference? Can any one clarrify?
      And also how to turn ON/OFF the cache programmatically?
      Venkat