我使用 ActiveMQ 管理控制台在 ActiveMQ 中创建了一个名为 NewJMSQueue 的队列。我正在尝试使用 WSO2 ESB 消息生成器在此队列中生成一条消息。以下是我的制作人的来源。
<proxy xmlns="http://ws.apache.org/ns/synapse" name="JmsProducerTest" transports="http" statistics="disable" trace="disable" startOnLoad="true">
<target>
<inSequence>
<log level="full"/>
<property name="OUT_ONLY" value="true"/>
<send>
<endpoint>
<address uri="jms:/NewJMSQueue?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616&transport.jms.DestinationType=queue"/>
</endpoint>
</send>
<property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/>
<log level="full"/>
</inSequence>
<outSequence>
<send/>
</outSequence>
</target>
<publishWSDL uri="file:repository/samples/resources/proxy/sample_proxy_1.wsdl"/>
<description></description>
</proxy>
但我在 WSO2 ESB 控制台中遇到错误
[2013-09-20 11:37:51,777] ERROR - BaseUtils JNDI lookup of name dynamicQueues/NewJMSQueue returned a org.apache.activemq.command.ActiveMQQueue while a
interface javax.jms.Destination was expected
[2013-09-20 11:37:51,777] ERROR - Axis2Sender Unexpected error during sending message out
org.apache.axis2.transport.base.BaseTransportException: JNDI lookup of name dynamicQueues/NewJMSQueue returned a org.apache.activemq.command.ActiveMQQ
ueue while a interface javax.jms.Destination was expected
at org.apache.axis2.transport.base.BaseUtils.handleException(BaseUtils.java:167)
at org.apache.axis2.transport.jms.JMSUtils.lookup(JMSUtils.java:522)
at org.apache.axis2.transport.jms.JMSUtils.lookupDestination(JMSUtils.java:718)
at org.apache.axis2.transport.jms.JMSOutTransportInfo.getDestination(JMSOutTransportInfo.java:184)
at org.apache.axis2.transport.jms.JMSOutTransportInfo.loadConnectionFactoryFromProperties(JMSOutTransportInfo.java:132)
at org.apache.axis2.transport.jms.JMSOutTransportInfo.createJMSSender(JMSOutTransportInfo.java:330)
at org.apache.axis2.transport.jms.JMSSender.sendMessage(JMSSender.java:124)
at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:456)