1 Reply Latest reply on Aug 25, 2006 4:03 AM by Ben Wang

    Eviction policy is not working

    biswajit_java Newbie

      Hi all,


      I have developed a Caching Framework,which is a wrapper above JBoss Cache.I m using JBossCache-1.2.3 jar.My caching framework is working fine in all aspect.But just now i implemented eviction Policy.After this it is failing.

      So,just give a look at my eviction policy configuration,which is like

      <!-- Name of the eviction policy class. -->
      org.jboss.cache.eviction.LRUPolicy

      <!-- Specific eviction policy configurations. This is LRU -->


      5
      <!-- Cache wide default -->

      5000
      1000
      <!-- Maximum time an object is kept in cache regardless of idle time -->
      240




      Error messages in the console:-

      12:15:51,423 ERROR [InitServlet] Error during the initialization process of utility modules.....
      12:15:51,439 INFO [STDOUT] java.lang.RuntimeException: The method createCacheService() is Failing
      12:15:51,439 INFO [STDOUT] at com.dnaO2.infra.cache.service.JBossCacheService.createCacheService(JBossCacheService.java:74)
      12:15:51,439 INFO [STDOUT] at com.dnaO2.infra.cache.service.CacheServiceManager.initialize(CacheServiceManager.java:69)
      12:15:51,439 INFO [STDOUT] at com.dnaO2.infra.util.AppInitializer.initializeComponents(AppInitializer.java:59)
      12:15:51,439 INFO [STDOUT] at com.dnaO2.infra.util.AppInitializer.initialize(AppInitializer.java:27)
      12:15:51,439 INFO [STDOUT] at com.dnaO2.infra.util.init.InitServlet.init(InitServlet.java:31)
      12:15:51,439 INFO [STDOUT] at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091)
      12:15:51,439 INFO [STDOUT] at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925)
      12:15:51,439 INFO [STDOUT] at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3857)
      12:15:51,439 INFO [STDOUT] at org.apache.catalina.core.StandardContext.start(StandardContext.java:4118)
      12:15:51,439 INFO [STDOUT] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
      12:15:51,485 INFO [STDOUT] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
      12:15:51,485 INFO [STDOUT] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
      12:15:51,485 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      12:15:51,485 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      12:15:51,485 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:15:51,485 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
      12:15:51,485 INFO [STDOUT] at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
      12:15:51,485 INFO [STDOUT] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
      12:15:51,485 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      12:15:51,485 INFO [STDOUT] at org.apache.catalina.core.StandardContext.init(StandardContext.java:5005)
      12:15:51,485 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      12:15:51,485 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      12:15:51,485 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:15:51,501 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
      12:15:51,501 INFO [STDOUT] at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
      12:15:51,501 INFO [STDOUT] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
      12:15:51,501 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      12:15:51,501 INFO [STDOUT] at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:280)
      12:15:51,532 INFO [STDOUT] at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:88)
      12:15:51,532 INFO [STDOUT] at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:357)
      12:15:51,532 INFO [STDOUT] at org.jboss.web.WebModule.startModule(WebModule.java:68)
      12:15:51,532 INFO [STDOUT] at org.jboss.web.WebModule.startService(WebModule.java:46)
      12:15:51,532 INFO [STDOUT] at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
      12:15:51,532 INFO [STDOUT] at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
      12:15:51,532 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
      12:15:51,532 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:15:51,532 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
      12:15:51,532 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      12:15:51,532 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      12:15:51,532 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      12:15:51,548 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      12:15:51,548 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      12:15:51,548 INFO [STDOUT] at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
      12:15:51,548 INFO [STDOUT] at $Proxy0.start(Unknown Source)
      12:15:51,548 INFO [STDOUT] at org.jboss.system.ServiceController.start(ServiceController.java:428)
      12:15:51,579 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
      12:15:51,579 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:15:51,579 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
      12:15:51,579 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      12:15:51,579 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      12:15:51,579 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      12:15:51,579 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      12:15:51,579 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      12:15:51,579 INFO [STDOUT] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      12:15:51,579 INFO [STDOUT] at $Proxy43.start(Unknown Source)
      12:15:51,579 INFO [STDOUT] at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:400)
      12:15:51,579 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      12:15:51,595 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      12:15:51,595 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:15:51,595 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
      12:15:51,626 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      12:15:51,626 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      12:15:51,626 INFO [STDOUT] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
      12:15:51,626 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      12:15:51,626 INFO [STDOUT] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
      12:15:51,626 INFO [STDOUT] at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:80)
      12:15:51,626 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      12:15:51,626 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      12:15:51,626 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      12:15:51,626 INFO [STDOUT] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      12:15:51,626 INFO [STDOUT] at $Proxy44.start(Unknown Source)
      12:15:51,626 INFO [STDOUT] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
      12:15:51,626 INFO [STDOUT] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:979)
      12:15:51,641 INFO [STDOUT] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
      12:15:51,641 INFO [STDOUT] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
      12:15:51,641 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
      12:15:51,641 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:15:51,641 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
      12:15:51,673 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      12:15:51,673 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      12:15:51,673 INFO [STDOUT] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
      12:15:51,673 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      12:15:51,673 INFO [STDOUT] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
      12:15:51,673 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      12:15:51,673 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      12:15:51,673 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      12:15:51,673 INFO [STDOUT] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      12:15:51,673 INFO [STDOUT] at $Proxy9.deploy(Unknown Source)
      12:15:51,673 INFO [STDOUT] at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:319)
      12:15:51,673 INFO [STDOUT] at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
      12:15:51,673 INFO [STDOUT] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:192)
      12:15:51,688 INFO [STDOUT] at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:265)
      12:15:51,688 INFO [STDOUT] at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
      12:15:51,688 INFO [STDOUT] at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
      12:15:51,688 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
      12:15:51,688 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:15:51,719 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
      12:15:51,719 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      12:15:51,719 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      12:15:51,719 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      12:15:51,719 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      12:15:51,719 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      12:15:51,719 INFO [STDOUT] at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
      12:15:51,719 INFO [STDOUT] at $Proxy0.start(Unknown Source)
      12:15:51,719 INFO [STDOUT] at org.jboss.system.ServiceController.start(ServiceController.java:428)
      12:15:51,719 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
      12:15:51,719 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:15:51,719 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
      12:15:51,719 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      12:15:51,735 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      12:15:51,735 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      12:15:51,735 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      12:15:51,735 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      12:15:51,735 INFO [STDOUT] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      12:15:51,766 INFO [STDOUT] at $Proxy4.start(Unknown Source)
      12:15:51,766 INFO [STDOUT] at org.jboss.deployment.SARDeployer.start(SARDeployer.java:285)
      12:15:51,766 INFO [STDOUT] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
      12:15:51,766 INFO [STDOUT] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
      12:15:51,766 INFO [STDOUT] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
      12:15:51,766 INFO [STDOUT] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
      12:15:51,766 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      12:15:51,766 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      12:15:51,766 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:15:51,766 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
      12:15:51,797 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      12:15:51,797 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      12:15:51,797 INFO [STDOUT] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
      12:15:51,797 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      12:15:51,797 INFO [STDOUT] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
      12:15:51,797 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      12:15:51,797 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      12:15:51,797 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      12:15:51,797 INFO [STDOUT] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      12:15:51,797 INFO [STDOUT] at $Proxy5.deploy(Unknown Source)
      12:15:51,797 INFO [STDOUT] at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:453)
      12:15:51,797 INFO [STDOUT] at org.jboss.system.server.ServerImpl.start(ServerImpl.java:330)
      12:15:51,813 INFO [STDOUT] at org.jboss.Main.boot(Main.java:187)
      12:15:51,813 INFO [STDOUT] at org.jboss.Main$1.run(Main.java:438)
      12:15:51,813 INFO [STDOUT] at java.lang.Thread.run(Thread.java:534)
      12:15:51,813 INFO [STDOUT] Caused by: org.jboss.util.NestedRuntimeException: - nested throwable: (java.lang.NullPointerException)
      12:15:51,813 INFO [STDOUT] at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:3121)
      12:15:51,813 INFO [STDOUT] at org.jboss.cache.TreeCache.get(TreeCache.java:1571)
      12:15:51,813 INFO [STDOUT] at org.jboss.cache.TreeCache.get(TreeCache.java:1555)
      12:15:51,813 INFO [STDOUT] at org.jboss.cache.TreeCache.preload(TreeCache.java:1360)
      12:15:51,813 INFO [STDOUT] at org.jboss.cache.TreeCache.cacheLoaderPreload(TreeCache.java:1335)
      12:15:51,813 INFO [STDOUT] at org.jboss.cache.TreeCache.startService(TreeCache.java:1129)
      12:15:51,813 INFO [STDOUT] at com.dnaO2.infra.cache.service.JBossCacheService.createCacheService(JBossCacheService.java:65)
      12:15:51,813 INFO [STDOUT] ... 138 more
      12:15:51,860 INFO [STDOUT] Caused by: java.lang.NullPointerException
      12:15:51,860 INFO [STDOUT] at org.jboss.cache.eviction.LRUPolicy.nodeVisited(LRUPolicy.java:104)
      12:15:51,860 INFO [STDOUT] at org.jboss.cache.TreeCache.notifyNodeVisisted(TreeCache.java:3192)
      12:15:51,860 INFO [STDOUT] at org.jboss.cache.TreeCache._get(TreeCache.java:1564)
      12:15:51,860 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      12:15:51,860 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      12:15:51,860 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:15:51,860 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
      12:15:51,860 INFO [STDOUT] at org.jgroups.blocks.MethodCall.invoke(MethodCall.java:236)
      12:15:51,860 INFO [STDOUT] at org.jboss.cache.interceptors.CallInterceptor.invoke(CallInterceptor.java:33)
      12:15:51,875 INFO [STDOUT] at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:41)
      12:15:51,875 INFO [STDOUT] at org.jboss.cache.interceptors.LockInterceptor.invoke(LockInterceptor.java:167)
      12:15:51,875 INFO [STDOUT] at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:41)
      12:15:51,875 INFO [STDOUT] at org.jboss.cache.interceptors.CacheLoaderInterceptor.invoke(CacheLoaderInterceptor.java:120)
      12:15:51,875 INFO [STDOUT] at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:41)
      12:15:51,875 INFO [STDOUT] at org.jboss.cache.interceptors.UnlockInterceptor.invoke(UnlockInterceptor.java:35)
      12:15:51,875 INFO [STDOUT] at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:41)
      12:15:51,875 INFO [STDOUT] at org.jboss.cache.interceptors.ReplicationInterceptor.invoke(ReplicationInterceptor.java:54)
      12:15:51,907 INFO [STDOUT] at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:41)
      12:15:51,907 INFO [STDOUT] at org.jboss.cache.interceptors.CacheStoreInterceptor.invoke(CacheStoreInterceptor.java:104)
      12:15:51,907 INFO [STDOUT] at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:3116)
      12:15:51,907 INFO [STDOUT] ... 144 more


      Please suggest me any appropraiate solution for this because this kind of work stopper for me.

      Thanks in advance,
      Biswajit