Hello, I have GF 3.1.2.2 on linux server. It has 2 connections on remotes ActiveMQ servers (ActiveMQ 5.7.0).
I deployed the ActiveMQ RARs like this http://codelevain.wordpress.com/2012/12/21/glassfish_activemq/ :
* I deployed 1 rar with this name activemq-rar-fb and an resource adapter config named activemq-rar-fb (with the property ServerURL=tcp://ipOfFb:61616)
* I deployed 1 rar with this name activemq-rar-fus and an resource adapter config named activemq-rar-fus (with the property ServerURL=tcp://ipOfFus:61616)
* I defined all parameters properly (connection pools, factories, queues, ...)
I deployed my EAR with NO jar like activemq-core.jar. My EAR application work well, it can receive and send messages on both servers. The EJB project inner this EAR has a glassfish-ejb-jar.xml like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-ejb-jar PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 EJB 3.1//EN" "http://glassfish.org/dtds/glassfish-ejb-jar_3_1-1.dtd">
<glassfish-ejb-jar>
<enterprise-beans>
<ejb>
<ejb-name>MyMDB</ejb-name>
<mdb-resource-adapter>
<resource-adapter-mid>activemq-rar-fb</resource-adapter-mid>
</mdb-resource-adapter>
</ejb>
</enterprise-beans>
</glassfish-ejb-jar>
But when I restart the Glassfish server, I have this errors every 5 seconds:
ERROR ActiveMQEndpointWorker - Failed to connect to broker [tcp://xxx:61616]: Could not create Transport. Reason: java.io.IOException: Transport scheme NOT recognized: [tcp]
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)
at org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:252)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:265)
at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:191)
at org.apache.activemq.ra.ActiveMQResourceAdapter.makeConnection(ActiveMQResourceAdapter.java:133)
at org.apache.activemq.ra.ActiveMQEndpointWorker$1.run(ActiveMQEndpointWorker.java:107)
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: [tcp]
at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)
at org.apache.activemq.transport.TransportFactory.findTransportFactory(TransportFactory.java:196)
at org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:66)
at org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:250)
... 7 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:193)
... 9 more
If I come on web console and I ping related pools, the pings fail. I must disable each RAR connectors in web console and reenable each and then the pings succeeded.
I read that is a classloader problem but I don't know how to fix :
https://community.jboss.org/thread/206590
http://ourcraft.wordpress.com/2008/07/17/something-works/
http://activemq.2283324.n4.nabble.com/ActiveMQ-5-4-2-RA-fails-to-connect...
Thanks