[
https://issues.jboss.org/browse/ISPN-4446?page=com.atlassian.jira.plugin....
]
Galder Zamarreño commented on ISPN-4446:
----------------------------------------
I've replicated the NPE in a unit test:
{code}
org.infinispan.commons.CacheException: Error removing cache
at org.infinispan.manager.DefaultCacheManager.removeCache(DefaultCacheManager.java:484)
at
org.infinispan.persistence.file.SingleFileStoreFunctionalTest.testRemoveCache(SingleFileStoreFunctionalTest.java:113)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:348)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:343)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:305)
at org.testng.SuiteRunner.run(SuiteRunner.java:254)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
at org.testng.TestNG.run(TestNG.java:1057)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:125)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: org.infinispan.persistence.spi.PersistenceException:
java.lang.NullPointerException
at org.infinispan.persistence.file.SingleFileStore.clear(SingleFileStore.java:416)
at
org.infinispan.persistence.manager.PersistenceManagerImpl.clearAllStores(PersistenceManagerImpl.java:388)
at org.infinispan.commands.RemoveCacheCommand.perform(RemoveCacheCommand.java:49)
at org.infinispan.manager.DefaultCacheManager.removeCache(DefaultCacheManager.java:479)
... 31 more
Caused by: java.lang.NullPointerException
at org.infinispan.persistence.file.SingleFileStore.clear(SingleFileStore.java:396)
... 34 more
{code}
removeCache fails for caches with a SingleFileStore
---------------------------------------------------
Key: ISPN-4446
URL:
https://issues.jboss.org/browse/ISPN-4446
Project: Infinispan
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 6.0.2.Final
Reporter: Jim Crossley
Assignee: Galder Zamarreño
Fix For: 7.0.0.CR1, 7.0.0.Final
If DefaultCacheManager.isRunning("foo") returns true, and "foo" has
an associated SingleFileStore, calling DefaultCacheManager.removeCache("foo")
tosses an NPE and isRunning("foo") continues to return true, even though the
cache is in a TERMINATED state. I can avoid the NPE by stopping the cache before calling
removeCache, but isRunning will still incorrectly return true.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)