4 Replies Latest reply on Jul 19, 2005 4:27 PM by ben.wang

    EvictionPolicyConfig throwing null pointer exceptions in 1.2

    newton

      I''ve seen people asking about similar problems in this other forum posts, and it usually seems to be due to them using the wrong attribute names. As far as I can tell, I am using the right attribute names and my config is complete. I am running jboss-1.2.3. I'd like look in the source and see what exactly is causing this, but oddly I can't find the source for this open source software online anywhere.

      Here is my config:

      attribute name="EvictionPolicyClass" org.jboss.cache.eviction.LRUPolicy /attribute
      attribute name="EvictionPolicyConfig"
      config
      attribute name="wakeUpIntervalSeconds" 60 /attribute
      region name="/Bad"
      attribute name="maxNodes" 5000 /attribute
      attribute name="timeToLiveSeconds" 60 /attribute
      /region
      /config
      /attribute

      And here is my error:
      Caused by: java.lang.NullPointerException
      at org.jboss.cache.eviction.LRUPolicy.nodeAdded(LRUPolicy.java:55)
      at org.jboss.cache.eviction.LRUPolicy.nodeCreated(LRUPolicy.java:93)
      at org.jboss.cache.TreeCache.notifyNodeCreated(TreeCache.java:3167)
      at org.jboss.cache.interceptors.LockInterceptor.lock(LockInterceptor.java:221)
      at org.jboss.cache.interceptors.LockInterceptor.invoke(LockInterceptor.java:153)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:41)
      at org.jboss.cache.interceptors.CacheStoreInterceptor.invoke(CacheStoreInterceptor.java:104)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:41)
      at org.jboss.cache.interceptors.CacheLoaderInterceptor.invoke(CacheLoaderInterceptor.java:120)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:41)
      at org.jboss.cache.interceptors.UnlockInterceptor.invoke(UnlockInterceptor.java:35)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:41)
      at org.jboss.cache.interceptors.ReplicationInterceptor.invoke(ReplicationInterceptor.java:54)
      at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:3116)

      I also see this in the log: 2005-07-15 19:13:37,197 INFO [main] org.jboss.cache.TreeCache setEvictionPolicyConfig (TreeCache.java:633) - setEvictionPolicyConfig(): [config: null]