Tim*_*Tim 10 java eclipse activemq-classic jar pathing
尝试使用BrokerFactory创建ActiveMQ代理时出现此错误:
java.io.IOException: Could not load failover factory:java.io.IOException: Could not find factory class for resource: META-INF/services/org/apache/activemq/broker/failover
at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)
at org.apache.activemq.broker.BrokerFactory.createBrokerFactoryHandler(BrokerFactory.java:43)
at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:70)
at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
at ...
Caused by: java.io.IOException: Could not find factory class for resource: META-INF/services/org/apache/activemq/broker/failover
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.broker.BrokerFactory.createBrokerFactoryHandler(BrokerFactory.java:41)
... 5 more
Run Code Online (Sandbox Code Playgroud)
它似乎是路径错误或类似的东西,我只是无法找出根本原因.
这是导致它的代码:
URI brokerUri = new URI(bean.getBrokerConfigUrl());
broker = BrokerFactory.createBroker(brokerUri);
Run Code Online (Sandbox Code Playgroud)
这是我打电话的网址:
failover:(tcp://internalUrl.net:port#,tcp://internalUrl.net:port#)?randomize=false&timeout=30000&jms.redeliveryPolicy.maximumRedeliveries=-1&jms.prefetchPolicy.all=0
Run Code Online (Sandbox Code Playgroud)
这可能是一个路径错误吗?我不包括一个必需的罐子吗?网址格式不正确吗?我迷失在这里.
编辑:添加赏金
小智 3
这不是类路径或 jar 问题。根据活动 MQ 文档,BrokerFactory 仅支持 xbean、代理或属性的 URI,不支持故障转移 URI。
以下两个文档应该为您提供有关设置和配置代理工厂的更多信息。
http://activemq.apache.org/broker-configuration-uri.html
http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html
归档时间: |
|
查看次数: |
3959 次 |
最近记录: |