I am unable to send message to xmpp queue in activemq
. I get the following example. As per the documentation I downloaded wstx jar and placed in activemq/lib/optional
folder.
I get the following exception:
Caught: javax.jms.JMSException: Could not create Transport. Reason: java.io.IOException: Transport scheme NOT recognized: [xmpp]
javax.jms.JMSException: Could not create Transport. Reason: java.io.IOException: Transport scheme NOT recognized: [xmpp]
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.createActiveMQConnection(ActiveMQConnectionFactory.java:238)
at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:184)
at App$HelloWorldProducer.run(App.java:41)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.IOException: Transport scheme NOT recognized: [xmpp]
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)
... 5 more
Caused by: java.io.IOException: Could not find factory class for resource: META-INF/services/org/apache/activemq/transport/xmpp
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:193)
... 7 more
Any help is appreciated.
you need to add activemq-xmpp dependency to you maven pom.xml
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-xmpp</artifactId>
<version>5.8.0</version>
</dependency>
if you are not using maven , so add activemq-xmpp.jar to your /lib with all other jars
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.