4 Replies Latest reply on Oct 24, 2013 9:25 AM by Dmitry Chuiko

    Exception on start up of application- java.lang.ClassCastException: org.jgroups.protocols.UDP cannot be cast to org.jgroups.stack.Protocol

    Julian Prabhakar Newbie

      Hi,

       

      I am trying to work with the JBoss AS 7 - Infinispan. My standalone.xml contains the following entry -

         <cache-container name="test" default-cache="cachedb" jndi-name="java:jboss/infinispan/test">

                      <alias>

                          test

                      </alias>

                      <local-cache name="cachedb" batching="true"/>

          </cache-container>

       

      I have no JGroups subsystem entry in my standalone.xml. Also, I am using jgroups-2.12.1.3 and infinispan-5.0.1 jars in my build path.

      I have the following dependencies in my MANIFEST.MF file -

      Dependencies: org.apache.log4j export, org.slf4j export, javax.jcr export, org.infinispan export.

      I am not using any code like  -

      @Resource(lookup="java:jboss/infinispan/jboss-as7-quickstart")

        private org.infinispan.manager.CacheContainer container ;   in my application.

       

      On starting the server I get no exception, but when I try to start my application i get the error -

       

      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) [infinispan-core-5.0.1.FINAL.jar:5.0.1.FINAL]

          at org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:890) [infinispan-core-5.0.1.FINAL.jar:5.0.1.FINAL]

          at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:683) [infinispan-core-5.0.1.FINAL.jar:5.0.1.FINAL]

          at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:581) [infinispan-core-5.0.1.FINAL.jar:5.0.1.FINAL]

          at org.infinispan.factories.GlobalComponentRegistry.start(GlobalComponentRegistry.java:176) [infinispan-core-5.0.1.FINAL.jar:5.0.1.FINAL]

          ... 38 more

      Caused by: java.lang.reflect.InvocationTargetException

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_13]

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_13]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_13]

          at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_13]

          at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:170) [infinispan-core-5.0.1.FINAL.jar:5.0.1.FINAL]

          ... 42 more

      Caused by: org.infinispan.CacheException: org.jgroups.ChannelException: unable to setup the protocol stack

          at org.infinispan.remoting.transport.jgroups.JGroupsTransport.buildChannel(JGroupsTransport.java:292) [infinispan-core-5.0.1.FINAL.jar:5.0.1.FINAL]

          at org.infinispan.remoting.transport.jgroups.JGroupsTransport.initChannel(JGroupsTransport.java:227) [infinispan-core-5.0.1.FINAL.jar:5.0.1.FINAL]

          at org.infinispan.remoting.transport.jgroups.JGroupsTransport.initChannelAndRPCDispatcher(JGroupsTransport.java:255) [infinispan-core-5.0.1.FINAL.jar:5.0.1.FINAL]

          at org.infinispan.remoting.transport.jgroups.JGroupsTransport.start(JGroupsTransport.java:149) [infinispan-core-5.0.1.FINAL.jar:5.0.1.FINAL]

          ... 47 more

      Caused by: org.jgroups.ChannelException: unable to setup the protocol stack

          at org.jgroups.JChannel.init(JChannel.java:1728) [jgroups-2.12.1.3.Final.jar:]

          at org.jgroups.JChannel.<init>(JChannel.java:249) [jgroups-2.12.1.3.Final.jar:]

          at org.jgroups.JChannel.<init>(JChannel.java:215) [jgroups-2.12.1.3.Final.jar:]

          at org.infinispan.remoting.transport.jgroups.JGroupsTransport.buildChannel(JGroupsTransport.java:289) [infinispan-core-5.0.1.FINAL.jar:5.0.1.FINAL]

          ... 50 more

      Caused by: java.lang.ClassCastException: org.jgroups.protocols.UDP cannot be cast to org.jgroups.stack.Protocol

          at org.jgroups.stack.Configurator.createLayer(Configurator.java:433) [jgroups-2.12.1.3.Final.jar:]

          at org.jgroups.stack.Configurator.createProtocols(Configurator.java:393) [jgroups-2.12.1.3.Final.jar:]

          at org.jgroups.stack.Configurator.setupProtocolStack(Configurator.java:88) [jgroups-2.12.1.3.Final.jar:]

          at org.jgroups.stack.Configurator.setupProtocolStack(Configurator.java:55) [jgroups-2.12.1.3.Final.jar:]

          at org.jgroups.stack.ProtocolStack.setup(ProtocolStack.java:534) [jgroups-2.12.1.3.Final.jar:]

          at org.jgroups.JChannel.init(JChannel.java:1725) [jgroups-2.12.1.3.Final.jar:]