Exceptions on calling stop on cache and cache manager
sudheerk84 Jan 26, 2011 9:14 AMI am getting the following errors when i try to stop the cache and teh cachermanager. Could anyone help me in with what am i doing wrong here ?
Caused by: java.lang.NullPointerException
at org.infinispan.manager.DefaultCacheManager.removeListener(DefaultCacheManager.java:567)
I am not adding any cache listeners to teh cache.
I use spring to instantiate my beans as foolows
<bean id="cacheManager" class="com.mycompany.cache.infinispan.CacheManager" init-method="init" destroy-method="destroy">
<constructor-arg name="fileName" value="classpath:test-config.xml"/>
<property name="transactionManager" ref="atomikosTransactionManager"/>
</bean>
destroy method calls - cacheManager.stop();(org.infinispan.manager.DefaultCacheManager)
<bean id="accountCache" class="com.mycompany.cache.infinispan.InfinispanImpl" destroy-method="shutdown" >
<constructor-arg name="cacheManager" ref="cacheManager"/>
<constructor-arg name="name" value="accountCache"/>
</bean>
destroy methods calls - cache.stop(); (org.infinispan.Cache)
Cache configuratiosn are as follows
<namedCache name="accountCache">
<clustering mode="distribution">
<sync />
<hash numOwners="2" rehashWait="120000" rehashRpcTimeout="600000" />
</clustering>
</namedCache>
org.springframework.beans.factory.support.DisposableBeanAdapter.invokeCustomDestroyMethod:280 - Invocation of destroy method 'destroy' failed on bean with name 'cacheManager'
org.infinispan.CacheException: Unable to invoke method private void org.infinispan.transaction.xa.TransactionTable.stop() on object
at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:174)
at org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:889)
at org.infinispan.factories.AbstractComponentRegistry.internalStop(AbstractComponentRegistry.java:716)
at org.infinispan.factories.AbstractComponentRegistry.stop(AbstractComponentRegistry.java:610)
at org.infinispan.factories.ComponentRegistry.stop(ComponentRegistry.java:168)
at org.infinispan.CacheDelegate.stop(CacheDelegate.java:325)
at org.infinispan.manager.DefaultCacheManager.stop(DefaultCacheManager.java:537)
at com.mycompany.cache.infinispan.CacheManager.destroy(CacheManager.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.beans.factory.support.DisposableBeanAdapter.invokeCustomDestroyMethod(DisposableBeanAdapter.java:273)
at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:199)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:487)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:463)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:431)
at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1048)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1022)
at org.springframework.context.support.AbstractApplicationContext$3.run(AbstractApplicationContext.java:940)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:171)
... 19 more
Caused by: java.lang.NullPointerException
at org.infinispan.manager.DefaultCacheManager.removeListener(DefaultCacheManager.java:567)
at org.infinispan.transaction.xa.TransactionTable.stop(TransactionTable.java:86)
... 24 more