IBM MQ如何判断您的JNDI绑定是否为LDAP

时间:2018-03-22 02:05:50

标签: java ldap ibm-mq websphere-liberty

我目前正在将应用程序从AIX迁移到LINUX。其中一个过程是安装和设置MQ。

我已经过去在server.xml中设置了Connection Factory和Activation Spec。我的应用程序连接到MQ(位于同一个盒子上)。但是,它无法找到我定义的本地队列。

从我的阅读中,看起来我必须在MQ中设置匹配的JMS对象。但是,我无法在AIX服务器上的任何位置找到该MQ的JMS的任何配置。

我无法在任何地方找到.bindings文件,我相信它会告诉我它是本地文件。但是,LDAP很有意义,因为我们从其他服务器连接到这个MQ。

对不起,如果这看起来像是一个愚蠢的问题或者很容易,但是我不知所措,在我解决这个问题之前无法推进我的项目。

但是,这是我的server.xml以获取我的连接信息,以防万一有人看错了。

<variable name="wmqJmsClient.rar.location" value="${shared.config.dir}/wmq/wmq.jmsra.rar"/>
<jmsQueueConnectionFactory connectionManagerRef="ConnMgr" id="QueueConnectionFactory" jndiName="jms/QueueConnectionFactory">
    <properties.wmqJms channel="JAVA.CHANNEL" hostName="10.1.1.45" port="1517" queueManager="MY_QMGR" transportType="CLIENT" userName="appuser" />
</jmsQueueConnectionFactory>
<jmsConnectionFactory connectionManagerRef="ConnMgr" jndiName="jms/QueueConnFactory">
    <properties.wmqJms channel="JAVA.CHANNEL" hostName="10.1.1.45" port="1517" queueManager="MY_QMGR" userName="appuser" />
</jmsConnectionFactory>
<connectionManager id="ConnMgr" maxPoolSize="2"/>
<jmsQueue id="Q1" jndiName="jms/Q1">
    <properties.wmqJms baseQueueManagerName="MY_QMGR" baseQueueName="Q1"/>
</jmsQueue>
<jmsActivationSpec id="application/APPMessageBean">
    <properties.wmqJms destinationRef="Q1" hostName="10.1.1.45" port="1517" queueManager="MY_QMGR" transportType="CLIENT" />
</jmsActivationSpec>

我收到错误,这是在Liberty服务器console.log中。我没有在MQ AMQERR01.LOG

中收到任何错误
[ERROR   ] J2CA8802E: The message endpoint activation failed for resource adapter wmqJms due to exception: com.ibm.mq.connector.DetailedResourceException: MQJCA0003: A JNDI naming exception was thrown. See the linked exception for details., error code: MQJCA0003 An attempt to look up a JMS destination in the JNDI namespace failed. Either the namespace cannot be accessed, or a destination with the supplied name is not bound in the namespace.  See the linked exception for details of the failure. Check that the JNDI namespace is available, that a destination with the correct name is bound in the JNDI namespace, and that the value of the property called destination is correctly defined.
    at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:169)
    at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:135)
    at com.ibm.mq.connector.DestinationBuilder.createDestination(DestinationBuilder.java:238)
    at com.ibm.mq.connector.inbound.MessageEndpointDeployment.startDelivery(MessageEndpointDeployment.java:337)
    at com.ibm.mq.connector.inbound.MessageEndpointDeployment.<init>(MessageEndpointDeployment.java:230)
    at com.ibm.mq.connector.ResourceAdapterImpl.endpointActivation(ResourceAdapterImpl.java:556)
    at com.ibm.ws.jca.service.EndpointActivationService.activateEndpoint(EndpointActivationService.java:524)
    at [internal classes]
Caused by: javax.naming.NameNotFoundException: Q1
        at com.ibm.ws.jndi.internal.ContextNode.lookup(ContextNode.java:218)
        at [internal classes]
        at javax.naming.InitialContext.lookup(InitialContext.java:423)
        at com.ibm.mq.connector.DestinationBuilder.createDestination(DestinationBuilder.java:190)
        ... 5 more

0 个答案:

没有答案