Configuration.setConsistentHashClass not working
------------------------------------------------
Key: ISPN-422
URL:
https://jira.jboss.org/jira/browse/ISPN-422
Project: Infinispan
Issue Type: Bug
Components: Configuration, Distributed Cache
Affects Versions: 4.1.0.ALPHA3, 4.0.0.Final
Reporter: Galder Zamarreno
Assignee: Galder Zamarreno
Fix For: 4.1.0.BETA1
Consistent class cannot be defined via configuration. Doing so throws:
org.infinispan.CacheException: Could not apply value for field class from instance
org.infinispan.config.Configuration$HashType@f449758d on instance
org.infinispan.config.OverrideConfigurationVisitor@182a033
at
org.infinispan.config.OverrideConfigurationVisitor.overrideFields(OverrideConfigurationVisitor.java:97)
at
org.infinispan.config.OverrideConfigurationVisitor.override(OverrideConfigurationVisitor.java:80)
at org.infinispan.config.Configuration.applyOverrides(Configuration.java:156)
at
org.infinispan.manager.DefaultCacheManager.defineConfiguration(DefaultCacheManager.java:372)
at
org.infinispan.manager.DefaultCacheManager.defineConfiguration(DefaultCacheManager.java:342)
at
org.infinispan.test.MultipleCacheManagersTest.createClusteredCaches(MultipleCacheManagersTest.java:139)
at
org.infinispan.distribution.BaseDistFunctionalTest.createCacheManagers(BaseDistFunctionalTest.java:59)
at
org.infinispan.test.MultipleCacheManagersTest.callCreateCacheManagers(MultipleCacheManagersTest.java:56)
at
org.infinispan.test.MultipleCacheManagersTest.createBeforeClass(MultipleCacheManagersTest.java:51)
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:616)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:644)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:443)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:160)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:90)
at
org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:183)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:115)
at org.testng.TestRunner.runWorkers(TestRunner.java:908)
at org.testng.TestRunner.privateRun(TestRunner.java:617)
at org.testng.TestRunner.run(TestRunner.java:498)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:329)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:324)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:296)
at org.testng.SuiteRunner.run(SuiteRunner.java:201)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:915)
at org.testng.TestNG.runSuitesLocally(TestNG.java:879)
at org.testng.TestNG.run(TestNG.java:787)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:75)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:79)
Caused by: org.infinispan.CacheException: Could not find field named: class on instance
:org.infinispan.config.Configuration$HashType@f449758d
at org.infinispan.util.ReflectionUtil.getValue(ReflectionUtil.java:204)
at
org.infinispan.config.OverrideConfigurationVisitor.overrideFields(OverrideConfigurationVisitor.java:95)
... 30 more
This is because the field name provided to testImmutability call in setConsistentHashClass
is "class". Hence, it tries to override a field called "class" which
does not exist. Making the field "consistentHashClass" fixes the issue.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira