0 Replies Latest reply on Aug 26, 2013 9:10 AM by Luis Montoya

    Infinispan error running on IBM JDK

    Luis Montoya Newbie

      I created a sample application using infinispan on standar JDK (Sun/Oracle). This app works fine using this JDK.

       

      I tried to run the app on IBM JDK (the needed for WAS), but I get the below error:

       

      org.infinispan.commons.CacheException: Unable to construct a GlobalComponentRegistry!

      at org.infinispan.factories.GlobalComponentRegistry.<init>(GlobalComponentRegistry.java:129)

      at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:276)

      at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:246)

      at org.infinispan.quickstart.clusteredcache.replication.AbstractNode.createCacheManagerProgramatically(AbstractNode.java:41)

      at org.infinispan.quickstart.clusteredcache.replication.AbstractNode.<init>(AbstractNode.java:62)

      at org.infinispan.quickstart.clusteredcache.replication.Node0.main(Node0.java:32)

      Caused by: org.infinispan.commons.CacheException: Unable to invoke method public void org.infinispan.topology.LocalTopologyManagerImpl.inject(org.infinispan.remoting.transport.Transport,java.util.concurrent.ExecutorService,org.infinispan.factories.GlobalComponentRegistry,org.infinispan.util.TimeService) on object of type LocalTopologyManagerImpl with parameters [org.infinispan.executors.LazyInitializingExecutorService@96d7b55b, org.infinispan.executors.LazyInitializingExecutorService@96d7b55b, org.infinispan.factories.GlobalComponentRegistry@9fd5a559, org.infinispan.util.DefaultTimeService@725adace]

      at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:188)

      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.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:156)

      at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:277)

      at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:253)

      at org.infinispan.factories.GlobalComponentRegistry.<init>(GlobalComponentRegistry.java:125)

      ... 5 more

      Caused by: java.lang.IllegalArgumentException: discrepancia en el tipo de argumento

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:600)

      at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:183)

      ... 13 more

       

       

      It seems that a method which is being invoked through reflection is receiving incorrectly the first parameter, which should be a org.infinispan.remoting.transport.Transport instance, but it is receiving a org.infinispan.executors.LazyInitializingExecutorService@96d7b55b instance

       

      The code which launch the error is the next:

       

       

      new DefaultCacheManager(

                  GlobalConfigurationBuilder.defaultClusteredBuilder().globalJmxStatistics().allowDuplicateDomains(true)

                        .transport().addProperty("configurationFile", "jgroups.xml")

                        .build(),

                  new ConfigurationBuilder()

                        .clustering().cacheMode(CacheMode.REPL_SYNC)

                        .build()

            );