1 Reply Latest reply on Apr 5, 2013 1:12 AM by Nicklas Karlsson

    ear deployment fails with Classcast Exception

    inv3r53 d Novice

      Hi ,

       

      I am using jboss as 7.1.1 final with active mq-5.6  to connect to a remote queue.

      my ear structure is as below:

       

      EAR

      |__lib

            |__activemq-core-5.6-SNAPSHOT.jar

            |__activemq-ra-5.6-SNAPSHOT.jar

            |__other appl jars

       

      |__cat1.rar

               |__activemq-core-5.6-SNAPSHOT.jar,activemq-ra-5.6-SNAPSHOT.jar

               |__META-INF/ra-xml.iron-jacamar.xml

      |

      |__cat2.rar

               |__activemq-core-5.6-SNAPSHOT.jar,activemq-ra-5.6-SNAPSHOT.jar

                |__META-INF/ra-xml.iron-jacamar.xml

      |

      |___other jar deployments containing classes using the above rars(MDB, session beans etc)

      |

      |__META-INF/jboss-deployment-structure.xml , application.xml

       

      when i deploy my ear i get following exception

       

       

      WARN  [org.jboss.jca.core.connectionmanager.pool.strategy.PoolByCri] (EJB default - 5) IJ000604: Throwable while attempting to get a new connection: null: javax.resource.ResourceException: Could not create connection.

          at org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:171) [activemq-ra-5.6-SNAPSHOT.jar:5.6-SNAPSHOT]

          at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:761) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final]

          at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:343) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final]

          at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:397) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final]

          at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:365) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final]

          at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:329) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final]

          at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:302) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final]

          at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:464) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final]

          at org.apache.activemq.ra.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:94) [activemq-ra-5.6-SNAPSHOT.jar:5.6-SNAPSHOT]

          at org.apache.activemq.ra.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:67) [activemq-ra-5.6-SNAPSHOT.jar:5.6-SNAPSHOT]

          ..................

          ..................

       

      Caused by: javax.jms.JMSException: Could not create Transport. Reason: java.io.IOException: Transport scheme NOT recognized: [tcp]

          at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35) [activemq-core-5.6-SNAPSHOT.jar:5.6-SNAPSHOT]

          at org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:254) [activemq-core-5.6-SNAPSHOT.jar:5.6-SNAPSHOT]

          at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:267) [activemq-core-5.6-SNAPSHOT.jar:5.6-SNAPSHOT]

          at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:192) [activemq-core-5.6-SNAPSHOT.jar:5.6-SNAPSHOT]

          at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:79) [activemq-ra-5.6-SNAPSHOT.jar:5.6-SNAPSHOT]

          at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:61) [activemq-ra-5.6-SNAPSHOT.jar:5.6-SNAPSHOT]

          at org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:169) [activemq-ra-5.6-SNAPSHOT.jar:5.6-SNAPSHOT]

          ... 62 more

      Caused by: java.io.IOException: Transport scheme NOT recognized: [tcp]

          at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27) [activemq-core-5.6-SNAPSHOT.jar:5.6-SNAPSHOT]

          at org.apache.activemq.transport.TransportFactory.findTransportFactory(TransportFactory.java:204) [activemq-core-5.6-SNAPSHOT.jar:5.6-SNAPSHOT]

          at org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:79) [activemq-core-5.6-SNAPSHOT.jar:5.6-SNAPSHOT]

          at org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:252) [activemq-core-5.6-SNAPSHOT.jar:5.6-SNAPSHOT]

          ... 67 more

      Caused by: java.lang.ClassCastException: org.apache.activemq.transport.tcp.TcpTransportFactory cannot be cast to org.apache.activemq.transport.TransportFactory

          at org.apache.activemq.transport.TransportFactory.findTransportFactory(TransportFactory.java:201) [activemq-core-5.6-SNAPSHOT.jar:5.6-SNAPSHOT]

          ... 69 more

       

            

       

      i tried removing the active-mq related jars from the resource adapter rars so tht they could use the common jars within ear/lib , but in that case the rars dont seem to be deployed

       

      What could be possibly wrong?