activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <gary.tu...@gmail.com>
Subject Re: ActiveMQ 5.4.2 RA fails to connect to a broker.
Date Tue, 19 Jul 2011 14:17:08 GMT
it looks like there is more than one classloader involved, and classes
cannot be shared between them.
Note the exception:

Caused by: java.lang.ClassCastException:
> org.apache.activemq.transport.failover.FailoverTransportFactory cannot be
> cast to org.apache.activemq.transport.TransportFactory

The base class, org.apache.activemq.transport.TransportFactory needs
to be loaded by the same class classloader that  initiates the
connection.
Either all of the activemq classes must be shared by all RARs or
embedded in the RAR so that it each RAR gets its own copy.

There should be some glassfish options to allow a single RAR to be
shared or the RAR dependencies need to be deployed into the root
context such that they are visible to all RARs.


On 19 July 2011 11:55, guerra <jg.guerra@gmail.com> wrote:
> I came across with a problem what it looks like a ActiveMQ problem, but if
> anyone here knows more about it, please feel free to post any thought.
>
> I have two ActiveMQ 5.4.2 RAs deployed on glassfish 3.1. Each RA connects
> with two different brokers hosted on 192.168.1.10 and both brokers have a
> type of master/slave configuration to failover on 192.168.1.11. The problem
> is that I can't get working one of the RAs because the connection fails with
> the exception posted below. The funniest part is that the other RA connects
> perfectly and thus I can't figure out why one of the brokers works and the
> other one doesn't.
>
> Thanks
>
> INFO: 2011-07-19 11:38:54,667 [test-pool; w: 5] ERROR ActiveMQEndpointWorker
> - Failed to connect to broker
> [failover:(tcp://192.168.1.10:40000,tcp://192.168.1.11:40000)?randomize=false]:
> Could not create Transport. Reason: java.io.IOException: Transport scheme
> NOT recognized: [failover]
> javax.jms.JMSException: Could not create Transport. Reason:
> java.io.IOException: Transport scheme NOT recognized: [failover]
>        at
> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
>        at
> org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:245)
>        at
> org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:258)
>        at
> org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:185)
>        at
> org.apache.activemq.ra.ActiveMQResourceAdapter.makeConnection(ActiveMQResourceAdapter.java:133)
>        at
> org.apache.activemq.ra.ActiveMQEndpointWorker$1.run(ActiveMQEndpointWorker.java:106)
>        at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:114)
>        at
> com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497)
>        at
> com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540)
> Caused by: java.io.IOException: Transport scheme NOT recognized: [failover]
>        at
> org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)
>        at
> org.apache.activemq.transport.TransportFactory.findTransportFactory(TransportFactory.java:204)
>        at
> org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:79)
>        at
> org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:243)
>        ... 7 more
> Caused by: java.lang.ClassCastException:
> org.apache.activemq.transport.failover.FailoverTransportFactory cannot be
> cast to org.apache.activemq.transport.TransportFactory
>        at
> org.apache.activemq.transport.TransportFactory.findTransportFactory(TransportFactory.java:201)
>        ... 9 more
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-4-2-RA-fails-to-connect-to-a-broker-tp3677852p3677852.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
http://fusesource.com
http://blog.garytully.com

Mime
View raw message