在我们的应用程序中,我们尝试连接到托管在不同服务器上的ActiveMQ服务。我们之前能够连接到它,但我们最近开始面临以下错误?造成此错误的可能原因是什么?如何解决?
ERROR 2015-06-08 05:00:27.986 0x0 ' message=Could not create Transport. Reason: java.io.IOException: Transport scheme NOT recognized: [failovertcp], class.method=MessageService.connect ' MSSL_Integration_Producer_Thread
javax.jms.JMSException: Could not create Transport. Reason: java.io.IOException: Transport scheme NOT recognized: [failovertcp]
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.createActiveMQConnection(ActiveMQConnectionFactory.java:230)
at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:178)
at org.apache.activemq.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:125)
at org.apache.activemq.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:110)
at org.apache.activemq.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:81)
at com.test.common.messagequeue.impl.JMSConnectionFactory.createConnection(JMSConnectionFactory.java:153)
at com.test.common.messagequeue.impl.MessageService.connect(MessageService.java:55)
at com.test.common.queue.MessageQueuer.connecMessageService(MessageQueuer.java:191)
at com.test.common.queue.MessageQueuer.connecMessageService(MessageQueuer.java:183)
at com.test.common.queue.MessageQueuer.queueMessage(MessageQueuer.java:173)
at com.test.common.queue.MessageQueuer.queueMessage(MessageQueuer.java:166)
at com.test.TestIntegration.queueTickets(TestIntegration.java:370)
at com.test.testIntegration.TestIntegration.performJob(TestIntegrationJob.java:54)
at com.test.common.scheduler.AbstractJob.execute(AbstractJob.java:188)
at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
Caused by: java.io.IOException: Transport scheme NOT recognized: [failovertcp]
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)
... 17 more
Caused by: java.io.IOException: Could not find factory class for resource: META-INF/services/org/apache/activemq/transport/failovertcp
at org.apache.activemq.util.FactoryFinder$StandaloneObjectFactory.loadProperties(FactoryFinder.java:96)
at org.apache.activemq.util.FactoryFinder$StandaloneObjectFactory.create(FactoryFinder.java:58)
at org.apache.activemq.util.FactoryFinder.newInstance(FactoryFinder.java:146)
at org.apache.activemq.transport.TransportFactory.findTransportFactory(TransportFactory.java:201)
... 19 more
答案 0 :(得分:1)
因为' failovertcp'不是有效的传输类型。您应该参考ActiveMQ的Failover Transport页面进行一些教育。
故障转移URI采用以下形式:
failover:(tcp://primary:61616,tcp://secondary:61616)?randomize=false