javax.naming.NameNotFoundException:名称 [dynamicQueues/myqueue] 未在此上下文中绑定。无法找到 [dynamicQueues]
javax.naming.NameNotFoundException: Name [dynamicQueues/myqueue] is not bound in this Context. Unable to find [dynamicQueues]
我在 WSO2 ESB 4.9.0 中创建了 JMS 发送器,如下所示,并在 axis2.xml 文件中配置了 JMS 发送器。 运行 代理服务时出现以下异常。使用 Websphere MQ JMS 队列。
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="StockQuoteProxy"
transports="http"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<inSequence>
<property name="OUT_ONLY" value="true"/>
<send>
<endpoint>
<address uri="jms:/myquue?transport.jms.ConnectionFactory=ConnectionFactory"/>
</endpoint>
</send>
</inSequence>
<outSequence>
<send/>
</outSequence>
</target>
<description/>
</proxy>
javax.naming.NameNotFoundException: Name [dynamicQueues/myqueue] is not bound in this Context. Unable to find [dynamicQueues]
在我使用 WSO2 MB 的场景中,正确的端点是这样的:
<address uri="jms:/MyQueue?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory&java.naming.provider.url=repository/conf/jndi.properties&transport.jms.DestinationType=queue"/>
您的代理配置使用:
<property name="OUT_ONLY" value="true"/>
因此,没有向客户端发送任何响应。
您需要在代理配置中使用没有响应消息的操作指定 WSDL 或 return 状态 = 200 且:
<property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/>
我在 WSO2 ESB 4.9.0 中创建了 JMS 发送器,如下所示,并在 axis2.xml 文件中配置了 JMS 发送器。 运行 代理服务时出现以下异常。使用 Websphere MQ JMS 队列。
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="StockQuoteProxy"
transports="http"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<inSequence>
<property name="OUT_ONLY" value="true"/>
<send>
<endpoint>
<address uri="jms:/myquue?transport.jms.ConnectionFactory=ConnectionFactory"/>
</endpoint>
</send>
</inSequence>
<outSequence>
<send/>
</outSequence>
</target>
<description/>
</proxy>
javax.naming.NameNotFoundException: Name [dynamicQueues/myqueue] is not bound in this Context. Unable to find [dynamicQueues]
在我使用 WSO2 MB 的场景中,正确的端点是这样的:
<address uri="jms:/MyQueue?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory&java.naming.provider.url=repository/conf/jndi.properties&transport.jms.DestinationType=queue"/>
您的代理配置使用:
<property name="OUT_ONLY" value="true"/>
因此,没有向客户端发送任何响应。 您需要在代理配置中使用没有响应消息的操作指定 WSDL 或 return 状态 = 200 且:
<property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/>