Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-3872

Invalid transaction and invocation batching configuration resulting in ClassCastException

    Details

      Description

      This test:

         public void testInvalidBatchingAndTransactionConfiguration() {
            ConfigurationBuilder builder = new ConfigurationBuilder();
            builder.invocationBatching().enable();
            builder.transaction().transactionMode(TransactionMode.TRANSACTIONAL);
            builder.transaction().useSynchronization(false);
            builder.transaction().recovery().enable();
            withCacheManager(new CacheManagerCallable(
                  TestCacheManagerFactory.createCacheManager(builder)) {
               @Override
               public void call() {
                  cm.getCache();
               }
            });
         }
      

      Results in:

      
      org.infinispan.commons.CacheException: Unable to invoke method public void org.infinispan.transaction.xa.recovery.RecoveryManagerImpl.init(org.infinispan.remoting.rpc.RpcManager,org.infinispan.commands.CommandsFactory,org.infinispan.transaction.TransactionTable,org.infinispan.transaction.TransactionCoordinator,org.infinispan.transaction.xa.TransactionFactory) on object of type RecoveryManagerImpl with parameters [null, org.infinispan.commands.CommandsFactoryImpl@782d8a2f, org.infinispan.transaction.TransactionTable@75cb514c, org.infinispan.transaction.TransactionCoordinator@774690fe, org.infinispan.transaction.xa.TransactionFactory@39d950df]
      	at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:185)
      	at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:229)
      	at org.infinispan.factories.AbstractComponentRegistry.access$000(AbstractComponentRegistry.java:65)
      	at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:797)
      	at org.infinispan.factories.AbstractComponentRegistry.registerComponentInternal(AbstractComponentRegistry.java:201)
      	at org.infinispan.factories.ComponentRegistry.registerComponentInternal(ComponentRegistry.java:187)
      	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:156)
      	at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:277)
      	at org.infinispan.factories.ComponentRegistry.getOrCreateComponent(ComponentRegistry.java:150)
      	at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:227)
      	at org.infinispan.factories.AbstractComponentRegistry.access$000(AbstractComponentRegistry.java:65)
      	at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:797)
      	at org.infinispan.factories.AbstractComponentRegistry.registerComponentInternal(AbstractComponentRegistry.java:201)
      	at org.infinispan.factories.ComponentRegistry.registerComponentInternal(ComponentRegistry.java:187)
      	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:156)
      	at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:277)
      	at org.infinispan.factories.ComponentRegistry.getOrCreateComponent(ComponentRegistry.java:150)
      	at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:227)
      	at org.infinispan.factories.AbstractComponentRegistry.access$000(AbstractComponentRegistry.java:65)
      	at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:797)
      	at org.infinispan.factories.AbstractComponentRegistry.registerComponentInternal(AbstractComponentRegistry.java:201)
      	at org.infinispan.factories.ComponentRegistry.registerComponentInternal(ComponentRegistry.java:187)
      	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:156)
      	at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:277)
      	at org.infinispan.factories.ComponentRegistry.getOrCreateComponent(ComponentRegistry.java:150)
      	at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:227)
      	at org.infinispan.factories.AbstractComponentRegistry.access$000(AbstractComponentRegistry.java:65)
      	at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:797)
      	at org.infinispan.factories.AbstractComponentRegistry.registerComponentInternal(AbstractComponentRegistry.java:201)
      	at org.infinispan.factories.ComponentRegistry.registerComponentInternal(ComponentRegistry.java:187)
      	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:156)
      	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:148)
      	at org.infinispan.factories.InterceptorChainFactory.register(InterceptorChainFactory.java:60)
      	at org.infinispan.factories.InterceptorChainFactory.createInterceptor(InterceptorChainFactory.java:49)
      	at org.infinispan.factories.InterceptorChainFactory.buildInterceptorChain(InterceptorChainFactory.java:128)
      	at org.infinispan.factories.InterceptorChainFactory.construct(InterceptorChainFactory.java:307)
      	at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:272)
      	at org.infinispan.factories.ComponentRegistry.getOrCreateComponent(ComponentRegistry.java:150)
      	at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:227)
      	at org.infinispan.factories.AbstractComponentRegistry.access$000(AbstractComponentRegistry.java:65)
      	at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:797)
      	at org.infinispan.factories.AbstractComponentRegistry.registerComponentInternal(AbstractComponentRegistry.java:201)
      	at org.infinispan.factories.ComponentRegistry.registerComponentInternal(ComponentRegistry.java:187)
      	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:156)
      	at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:277)
      	at org.infinispan.factories.ComponentRegistry.getOrCreateComponent(ComponentRegistry.java:150)
      	at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:227)
      	at org.infinispan.factories.AbstractComponentRegistry.access$000(AbstractComponentRegistry.java:65)
      	at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:797)
      	at org.infinispan.factories.AbstractComponentRegistry.registerComponentInternal(AbstractComponentRegistry.java:201)
      	at org.infinispan.factories.ComponentRegistry.registerComponentInternal(ComponentRegistry.java:187)
      	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:156)
      	at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:277)
      	at org.infinispan.factories.ComponentRegistry.getOrCreateComponent(ComponentRegistry.java:150)
      	at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:227)
      	at org.infinispan.factories.AbstractComponentRegistry.access$000(AbstractComponentRegistry.java:65)
      	at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:797)
      	at org.infinispan.factories.AbstractComponentRegistry.registerComponentInternal(AbstractComponentRegistry.java:201)
      	at org.infinispan.factories.ComponentRegistry.registerComponentInternal(ComponentRegistry.java:187)
      	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:156)
      	at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:277)
      	at org.infinispan.factories.ComponentRegistry.getOrCreateComponent(ComponentRegistry.java:150)
      	at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:227)
      	at org.infinispan.factories.AbstractComponentRegistry.access$000(AbstractComponentRegistry.java:65)
      	at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:797)
      	at org.infinispan.factories.AbstractComponentRegistry.registerComponentInternal(AbstractComponentRegistry.java:201)
      	at org.infinispan.factories.ComponentRegistry.registerComponentInternal(ComponentRegistry.java:187)
      	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:156)
      	at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:277)
      	at org.infinispan.factories.ComponentRegistry.getOrCreateComponent(ComponentRegistry.java:150)
      	at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:227)
      	at org.infinispan.factories.AbstractComponentRegistry.access$000(AbstractComponentRegistry.java:65)
      	at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:797)
      	at org.infinispan.factories.AbstractComponentRegistry.registerComponentInternal(AbstractComponentRegistry.java:201)
      	at org.infinispan.factories.ComponentRegistry.registerComponentInternal(ComponentRegistry.java:187)
      	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:156)
      	at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:277)
      	at org.infinispan.factories.ComponentRegistry.getOrCreateComponent(ComponentRegistry.java:150)
      	at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:227)
      	at org.infinispan.factories.AbstractComponentRegistry.access$000(AbstractComponentRegistry.java:65)
      	at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:797)
      	at org.infinispan.factories.AbstractComponentRegistry.registerComponentInternal(AbstractComponentRegistry.java:201)
      	at org.infinispan.factories.ComponentRegistry.registerComponentInternal(ComponentRegistry.java:187)
      	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:156)
      	at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:277)
      	at org.infinispan.factories.ComponentRegistry.getOrCreateComponent(ComponentRegistry.java:150)
      	at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:227)
      	at org.infinispan.factories.AbstractComponentRegistry.access$000(AbstractComponentRegistry.java:65)
      	at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:797)
      	at org.infinispan.factories.AbstractComponentRegistry.registerComponentInternal(AbstractComponentRegistry.java:201)
      	at org.infinispan.factories.ComponentRegistry.registerComponentInternal(ComponentRegistry.java:187)
      	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:156)
      	at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:277)
      	at org.infinispan.factories.ComponentRegistry.getOrCreateComponent(ComponentRegistry.java:150)
      	at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:227)
      	at org.infinispan.factories.AbstractComponentRegistry.access$000(AbstractComponentRegistry.java:65)
      	at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:797)
      	at org.infinispan.factories.AbstractComponentRegistry.registerComponentInternal(AbstractComponentRegistry.java:201)
      	at org.infinispan.factories.ComponentRegistry.registerComponentInternal(ComponentRegistry.java:187)
      	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:156)
      	at org.infinispan.factories.InternalCacheFactory.bootstrap(InternalCacheFactory.java:79)
      	at org.infinispan.factories.InternalCacheFactory.createAndWire(InternalCacheFactory.java:58)
      	at org.infinispan.factories.InternalCacheFactory.createCache(InternalCacheFactory.java:42)
      	at org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:549)
      	at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:516)
      	at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:398)
      	at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:371)
      	at org.infinispan.configuration.ConfigurationValidationTest$1.call(ConfigurationValidationTest.java:112)
      	at org.infinispan.test.TestingUtil.withCacheManager(TestingUtil.java:1243)
      	at org.infinispan.configuration.ConfigurationValidationTest.testInvalidBatchingAndTransactionConfiguration(ConfigurationValidationTest.java:108)
      	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:80)
      	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:334)
      	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
      	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
      	at org.testng.SuiteRunner.run(SuiteRunner.java:240)
      	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
      	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
      	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
      	at org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
      	at org.testng.TestNG.run(TestNG.java:1031)
      	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:120)
      Caused by: java.lang.ClassCastException: org.infinispan.transaction.TransactionTable cannot be cast to org.infinispan.transaction.xa.recovery.RecoveryAwareTransactionTable
      	at org.infinispan.transaction.xa.recovery.RecoveryManagerImpl.init(RecoveryManagerImpl.java:79)
      	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.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:183)
      	... 139 more
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                galder.zamarreno Galder ZamarreƱo
                Reporter:
                galder.zamarreno Galder ZamarreƱo
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: