6 Replies Latest reply on May 4, 2010 6:37 AM by Galder Zamarreño

    CacheException on getCache

    craig bomba Novice

      Ideas why I am getting this issue?  I am using the ALPHA2 distribution (including the jgroups jar which is named jgroups-2.10.0.Alpha).  Although I think the org.infinispan.remoting.transport.jgroups.JGroupsTransport resolves to the infinispan-core.jar.

       

       

      java.lang.RuntimeException: org.infinispan.CacheException: Unable to invoke method public abstract void org.infinispan.remoting.transport.Transport.start() on object
              at com.cboe.infinispan.dataproto.MyInfinispanDataProto$1.run(MyInfinispanDataProto.java:214)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
              at java.lang.Thread.run(Thread.java:619)
      Caused by: org.infinispan.CacheException: Unable to invoke method public abstract void org.infinispan.remoting.transport.Transport.start() on object
              at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:173)
              at org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:852)
              at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:672)
              at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:574)
              at org.infinispan.factories.GlobalComponentRegistry.start(GlobalComponentRegistry.java:131)
              at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:135)
              at org.infinispan.CacheDelegate.start(CacheDelegate.java:290)
              at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:446)
              at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:409)
              at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:386)
              at com.cboe.infinispan.dataproto.MyInfinispanDataProto$1.run(MyInfinispanDataProto.java:199)
              ... 3 more
      Caused by: java.lang.reflect.InvocationTargetException
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:170)
              ... 13 more
      Caused by: java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()Z
              at org.jgroups.logging.Log4JLogImpl.isTraceEnabled(Log4JLogImpl.java:48)
              at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.handleUpEvent(MessageDispatcher.java:687)
              at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:725)
              at org.jgroups.JChannel.setAddress(JChannel.java:1804)
              at org.jgroups.JChannel.connect(JChannel.java:404)
              at org.jgroups.JChannel.connect(JChannel.java:380)
              at org.infinispan.remoting.transport.jgroups.JGroupsTransport.startJGroupsChannelIfNeeded(JGroupsTransport.java:166)
              at org.infinispan.remoting.transport.jgroups.JGroupsTransport.start(JGroupsTransport.java:155)
              ... 18 more
        • 1. Re: CacheException on getCache
          Manik Surtani Master

          What version of Log4J have you got on your classpath?  Note that isTraceEnabled() was only added in Log4j 1.2.12

           

          http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Logger.html#isTraceEnabled()

          • 2. Re: CacheException on getCache
            craig bomba Novice

            Yep, there was a 1.2.8 version in the classpath.  Bumped that to 1.2.15 now.  Beyond that issue now in my simple app....thank you.

             

            However, my more complicated app which was having the prior issue is still seeing this one.  I do have the xml setup as follows for the desired cache:  <stateRetrieval timeout="20000" fetchInMemoryState="true"/>. 

             

            Please advise.

             

             

            org.infinispan.CacheException: Unable to invoke method public void org.infinispan.statetransfer.StateTransferManagerImpl.start() throws org.infin
            ispan.statetransfer.StateTransferException on object
                    at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:173)
                    at org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:852)
                    at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:672)
                    at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:574)
                    at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:148)
                    at org.infinispan.CacheDelegate.start(CacheDelegate.java:311)
                    at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:507)
                    at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:473)
                    at com.cboe.infrastructureServices.cacheService.JCacheFactoryInfinispanImpl.getCache(JCacheFactoryInfinispanImpl.java:48)
                    at com.cboe.server.distributedCache.DistributedCacheHomeImpl.getCache(DistributedCacheHomeImpl.java:58)
                    at com.cboe.businessServices.orderRoutingDestination.OrderSyncImpl.initCaches(OrderSyncImpl.java:316)
                    at com.cboe.businessServices.orderRoutingDestination.OrderSyncHomeImpl.onGoSlave(OrderSyncHomeImpl.java:31)
                    at com.cboe.server.dependencyFramework.DIFHomeBase.goSlave(DIFHomeBase.java:329)
                    at com.cboe.infrastructureServices.foundationFramework.FoundationFramework.notifyHomesOfMasterStatus(FoundationFramework.java:1232)
                    at com.cboe.infrastructureServices.foundationFramework.FoundationFramework.startup(FoundationFramework.java:970)
                    at com.cboe.infrastructureServices.foundationFramework.FoundationFramework.init(FoundationFramework.java:525)
                    at com.cboe.infrastructureServices.foundationFramework.FoundationFramework.initialize(FoundationFramework.java:466)
                    at com.cboe.infrastructureServices.foundationFramework.FoundationFramework.main(FoundationFramework.java:743)
            Caused by: java.lang.reflect.InvocationTargetException
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:597)
                    at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:170)
                    ... 17 more
            Caused by: org.infinispan.statetransfer.StateTransferException: Unable to fetch state on startup
                    at org.infinispan.remoting.rpc.RpcManagerImpl.retrieveState(RpcManagerImpl.java:185)
                    at org.infinispan.statetransfer.StateTransferManagerImpl.start(StateTransferManagerImpl.java:123)
            • 3. Re: CacheException on getCache
              Manik Surtani Master

              Hmm - is there any more info on that stack trace?  It seems to be truncated just when things start getting interesting.  Either that, or enable TRACE level logging, see what's happening before and after the state transfer?

              • 4. Re: CacheException on getCache
                craig bomba Novice

                OK.  Enabled TRACE logging and there is something interesting:

                 

                 

                2010-04-30 13:55:43,498 [Incoming-1,Jalapeno-5380] DEBUG org.infinispan.statetransfer.StateTransferManagerImpl - Applying state
                2010-04-30 13:55:43,500 [Incoming-1,Jalapeno-5380] ERROR org.infinispan.remoting.transport.jgroups.JGroupsTransport - Caught while requesting or applying state
                java.lang.NullPointerException
                        at org.infinispan.marshall.jboss.JBossMarshaller.finishObjectInput(JBossMarshaller.java:202)
                        at org.infinispan.marshall.VersionAwareMarshaller.finishObjectInput(VersionAwareMarshaller.java:161)
                        at org.infinispan.statetransfer.StateTransferManagerImpl.applyState(StateTransferManagerImpl.java:323)
                        at org.infinispan.remoting.InboundInvocationHandlerImpl.applyState(InboundInvocationHandlerImpl.java:73)
                        at org.infinispan.remoting.transport.jgroups.JGroupsTransport.setState(JGroupsTransport.java:564)
                        at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.handleUpEvent(MessageDispatcher.java:665)
                        at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:725)
                        at org.jgroups.JChannel.up(JChannel.java:1420)
                        at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:855)
                        at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:483)
                        at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER.connectToStateProvider(STREAMING_STATE_TRANSFER.java:523)
                        at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER.handleStateRsp(STREAMING_STATE_TRANSFER.java:462)
                        at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER.up(STREAMING_STATE_TRANSFER.java:224)
                        at org.jgroups.protocols.FRAG2.up(FRAG2.java:188)
                        at org.jgroups.protocols.FC.up(FC.java:474)
                        at org.jgroups.protocols.pbcast.GMS.up(GMS.java:890)
                        at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:234)
                        at org.jgroups.protocols.UNICAST.handleDataReceived(UNICAST.java:614)
                        at org.jgroups.protocols.UNICAST.up(UNICAST.java:294)
                        at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:707)
                        at org.jgroups.protocols.BARRIER.up(BARRIER.java:120)
                        at org.jgroups.protocols.FD_ALL.up(FD_ALL.java:177)
                        at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:269)
                        at org.jgroups.stack.Protocol.up(Protocol.java:353)
                        at org.jgroups.protocols.Discovery.up(Discovery.java:277)
                        at org.jgroups.protocols.PING.up(PING.java:67)
                        at org.jgroups.protocols.TP.passMessageUp(TP.java:982)
                        at org.jgroups.protocols.TP.access$100(TP.java:55)
                        at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1522)
                        at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1504)
                        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
                        at java.lang.Thread.run(Thread.java:619)
                2010-04-30 13:55:43,501 [Incoming-1,Jalapeno-5380] DEBUG org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER - State reader is closing the socket
                • 5. Re: CacheException on getCache
                  craig bomba Novice

                  Any clues what I may have wrong in config or in my environment that is causing this?