4 Replies Latest reply on Jan 11, 2015 7:53 PM by Suhasan Chirravuri

    Getting cache exception for a multinode

    Suhasan Chirravuri Newbie

      Hi

       

      For an issue i am migrating to infinispan version from 5.1 to 5.2.  When i try to create a cluster i am getting the following exception. I am using the default jgroup file.

      Please let me know if any other change need to implemented for clustering?

      13:24:53,752 DEBUG [org.infinispan.marshall.jboss.AbstractJBossMarshaller] (ServerService Thread Pool -- 50) Using JBoss Marshalling

      13:24:53,763 DEBUG [org.infinispan.manager.DefaultCacheManager] (ServerService Thread Pool -- 50) Started cache manager Infinispan_cluster on null

      13:24:53,826 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (ServerService Thread Pool -- 50) ISPN000078: Starting JGroups Channel

      13:24:53,826 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (ServerService Thread Pool -- 50) ISPN000088: Unable to use any JGroups configuration mechanisms provided in properties {}. Using default JGroups configuration!

      13:24:54,382 DEBUG [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (ServerService Thread Pool -- 50) New view accepted: [clapton-8718|5] [clapton-8718, uup6-16056]

      13:24:54,384 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (ServerService Thread Pool -- 50) ISPN000094: Received new cluster view: [clapton-8718|5] [clapton-8718, uup6-16056]

      13:24:54,725 ERROR [InfinispanCacheConnectionHandler] (ServerService Thread Pool -- 50) Exception occured while loading the cache region: org.infinispan.manager.EmbeddedCacheManagerStartupException: org.infinispan.CacheException: Unable to invoke method public void org.infinispan.remoting.transport.jgroups.JGroupsTransport.start() on object of type JGroupsTransport

        at org.infinispan.factories.GlobalComponentRegistry.start(GlobalComponentRegistry.java:247) [infinispan-core-5.2.6.Final-redhat-1.jar:5.2.6.Final-redhat-1]

        at org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:678) [infinispan-core-5.2.6.Final-redhat-1.jar:5.2.6.Final-redhat-1]

        at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:649) [infinispan-core-5.2.6.Final-redhat-1.jar:5.2.6.Final-redhat-1]

        at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:545) [infinispan-core-5.2.6.Final-redhat-1.jar:5.2.6.Final-redhat-1]

        ...

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_24]

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.6.0_24]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.6.0_24]

        at java.lang.reflect.Method.invoke(Method.java:616) [rt.jar:1.6.0_24]

        at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptorFactory$ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptorFactory.java:130) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

        at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

        at org.jboss.as.ee.component.ManagedReferenceInterceptorFactory$ManagedReferenceInterceptor.processInvocation(ManagedReferenceInterceptorFactory.java:95) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

        at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

        at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

        at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:248) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at org.jboss.as.ejb3.tx.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:344) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at org.jboss.as.ejb3.tx.LifecycleCMTTxInterceptor.processInvocation(LifecycleCMTTxInterceptor.java:66) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

        at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

        at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

        at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]

        at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:161) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:85) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at org.jboss.as.ejb3.component.singleton.SingletonComponent.getComponentInstance(SingletonComponent.java:126) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at org.jboss.as.ejb3.component.singleton.SingletonComponent.start(SingletonComponent.java:141) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:54) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.6.0_24]

        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.6.0_24]

        at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.6.0_24]

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.6.0_24]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.6.0_24]

        at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_24]

        at org.jboss.threads.JBossThread.run(JBossThread.java:122)

      Caused by: org.infinispan.CacheException: Unable to invoke method public void org.infinispan.remoting.transport.jgroups.JGroupsTransport.start() on object of type JGroupsTransport

        at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:205) [infinispan-core-5.2.6.Final-redhat-1.jar:5.2.6.Final-redhat-1]

        at org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:886) [infinispan-core-5.2.6.Final-redhat-1.jar:5.2.6.Final-redhat-1]

        at org.infinispan.factories.AbstractComponentRegistry.invokeStartMethods(AbstractComponentRegistry.java:657) [infinispan-core-5.2.6.Final-redhat-1.jar:5.2.6.Final-redhat-1]

        at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:646) [infinispan-core-5.2.6.Final-redhat-1.jar:5.2.6.Final-redhat-1]

        at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:549) [infinispan-core-5.2.6.Final-redhat-1.jar:5.2.6.Final-redhat-1]

        at org.infinispan.factories.GlobalComponentRegistry.start(GlobalComponentRegistry.java:225) [infinispan-core-5.2.6.Final-redhat-1.jar:5.2.6.Final-redhat-1]

        ... 45 more

      Caused by: org.infinispan.CacheException: Unable to start JGroups Channel

        at org.infinispan.remoting.transport.jgroups.JGroupsTransport.startJGroupsChannelIfNeeded(JGroupsTransport.java:209) [infinispan-core-5.2.6.Final-redhat-1.jar:5.2.6.Final-redhat-1]

        at org.infinispan.remoting.transport.jgroups.JGroupsTransport.start(JGroupsTransport.java:198) [infinispan-core-5.2.6.Final-redhat-1.jar:5.2.6.Final-redhat-1]

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_24]

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.6.0_24]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.6.0_24]

        at java.lang.reflect.Method.invoke(Method.java:616) [rt.jar:1.6.0_24]

        at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:203) [infinispan-core-5.2.6.Final-redhat-1.jar:5.2.6.Final-redhat-1]

        ... 50 more

      Caused by: java.lang.Exception: connecting to channel "null" failed

        at org.jgroups.JChannel._connect(JChannel.java:542)

        at org.jgroups.JChannel.connect(JChannel.java:283)

        at org.jgroups.JChannel.connect(JChannel.java:268)

        at org.infinispan.remoting.transport.jgroups.JGroupsTransport.startJGroupsChannelIfNeeded(JGroupsTransport.java:207) [infinispan-core-5.2.6.Final-redhat-1.jar:5.2.6.Final-redhat-1]

        ... 56 more

      Caused by: java.lang.RuntimeException: org.infinispan.CacheException: Caught exception [java.lang.NullPointerException] while invoking method [public void InfinispanCacheClusterListener.ViewChanged(org.infinispan.notifications.cachemanagerlistener.event.ViewChangedEvent)] on listener instance: InfinispanCacheClusterListener@275109cf

        at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:603)

        at org.jgroups.JChannel.up(JChannel.java:707)

        at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1020)

        at org.jgroups.protocols.RSVP.up(RSVP.java:188)

        at org.jgroups.protocols.FRAG2.up(FRAG2.java:181)

        at org.jgroups.protocols.FlowControl.up(FlowControl.java:418)

        at org.jgroups.protocols.FlowControl.up(FlowControl.java:418)

        at org.jgroups.protocols.pbcast.GMS.installView(GMS.java:638)

        at org.jgroups.protocols.pbcast.ClientGmsImpl.installView(ClientGmsImpl.java:236)

        at org.jgroups.protocols.pbcast.ClientGmsImpl.joinInternal(ClientGmsImpl.java:181)

        at org.jgroups.protocols.pbcast.ClientGmsImpl.join(ClientGmsImpl.java:37)

        at org.jgroups.protocols.pbcast.GMS.down(GMS.java:938)

        at org.jgroups.protocols.FlowControl.down(FlowControl.java:351)

        at org.jgroups.protocols.FlowControl.down(FlowControl.java:351)

        at org.jgroups.protocols.FRAG2.down(FRAG2.java:147)

        at org.jgroups.protocols.RSVP.down(RSVP.java:143)

        at org.jgroups.stack.ProtocolStack.down(ProtocolStack.java:1025)

        at org.jgroups.JChannel.down(JChannel.java:722)

        at org.jgroups.JChannel._connect(JChannel.java:536)

        ... 59 more

      Caused by: org.infinispan.CacheException: Caught exception [java.lang.NullPointerException] while invoking method [public void InfinispanCacheClusterListener.ViewChanged(org.infinispan.notifications.cachemanagerlistener.event.ViewChangedEvent)] on listener instance: InfinispanCacheClusterListener@275109cf

        at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation$1.run(AbstractListenerImpl.java:217) [infinispan-core-5.2.6.Final-redhat-1.jar:5.2.6.Final-redhat-1]

        at org.infinispan.util.concurrent.WithinThreadExecutor.execute(WithinThreadExecutor.java:44) [infinispan-core-5.2.6.Final-redhat-1.jar:5.2.6.Final-redhat-1]

        at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation.invoke(AbstractListenerImpl.java:237) [infinispan-core-5.2.6.Final-redhat-1.jar:5.2.6.Final-redhat-1]

        at org.infinispan.notifications.cachemanagerlistener.CacheManagerNotifierImpl.notifyViewChange(CacheManagerNotifierImpl.java:97) [infinispan-core-5.2.6.Final-redhat-1.jar:5.2.6.Final-redhat-1]

        at org.infinispan.remoting.transport.jgroups.JGroupsTransport$NotifyViewChange.emitNotification(JGroupsTransport.java:599) [infinispan-core-5.2.6.Final-redhat-1.jar:5.2.6.Final-redhat-1]

        at org.infinispan.remoting.transport.jgroups.JGroupsTransport.viewAccepted(JGroupsTransport.java:655) [infinispan-core-5.2.6.Final-redhat-1.jar:5.2.6.Final-redhat-1]

        at org.jgroups.blocks.MessageDispatcher.handleUpEvent(MessageDispatcher.java:523)

        at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:600)

        ... 77 more

      Caused by: java.lang.NullPointerException

        at InfinispanCacheClusterListener.ViewChanged(InfinispanCacheClusterListener.java:39) [Infinispan-CacheHandler.jar:]

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_24]

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.6.0_24]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.6.0_24]

        at java.lang.reflect.Method.invoke(Method.java:616) [rt.jar:1.6.0_24]

        at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation$1.run(AbstractListenerImpl.java:212) [infinispan-core-5.2.6.Final-redhat-1.jar:5.2.6.Final-redhat-1]

        ... 84 more

        • 1. Re: Getting cache exception for a multinode
          Wolf-Dieter Fink Master

          Could you give more details, your configuration and whether you use client-server or embedded mode?

          Also what you try to start?

          In general a mix of different versions can be problematic.

          • 2. Re: Getting cache exception for a multinode
            Suhasan Chirravuri Newbie

            Hi Wolf

             

            I use the inifinispan in a client server model, where  the server is multinode servers.

            On a single node my configuration works but when i try to add a second node to cluster i am getting the above exception.

            The same code has worked fine for me in my previous version

            On checking the logs i could see a issue when the nodes were joining and were at Jgroup level.

            Note : i am using the default configuration for Jgroup

             

            13:24:53,752 DEBUG [org.infinispan.marshall.jboss.AbstractJBossMarshaller] (ServerService Thread Pool -- 50) Using JBoss Marshalling

            13:24:53,763 DEBUG [org.infinispan.manager.DefaultCacheManager] (ServerService Thread Pool -- 50) Started cache manager Infinispan_cluster on null

            13:24:53,826 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (ServerService Thread Pool -- 50) ISPN000078: Starting JGroups Channel

            13:24:53,826 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (ServerService Thread Pool -- 50) ISPN000088: Unable to use any JGroups configuration mechanisms provided in properties {}. Using default JGroups configuration!

            13:24:54,382 DEBUG [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (ServerService Thread Pool -- 50) New view accepted: [clapton-8718|5] [clapton-8718, uup6-16056]

            13:24:54,384 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (ServerService Thread Pool -- 50) ISPN000094: Received new cluster view: [clapton-8718|5] [clapton-8718, uup6-16056]

             

             

            code is

            GlobalConfiguration gc = new GlobalConfiguration();

            gc.setTransportClass(org.infinispan.remoting.transport.jgroups.JGroupsTransport));

            gc.setClusterName("test");

            1 of 1 people found this helpful
            • 3. Re: Getting cache exception for a multinode
              William Burns Expert

              Suhasan,

               

              If you look at the stack trace it is throwing a NullPointerException at InfinispanCacheClusterListener.java line 39.  It appears this is a user registered cache manager listener listening to view changes.  Is it possible you can provide information on the object that was null that was dereferenced.  The members lists shouldn't be null if those were it.

              • 4. Re: Getting cache exception for a multinode
                Suhasan Chirravuri Newbie

                Hi William burns

                 

                Thanks, i was getting a null for when i try to get a list of old members in my listener class.

                It is fixed now