1

I'm currently in the process of migrating an application from AIX to LINUX. One of the processes is to install and setup MQ.

I've gotten past setting up the Connection Factory and Activation Spec in my server.xml. My application is connecting to the MQ(which is on the same box). However, it's unable to find my local queue I've defined.

From my reading, it looks like I have to setup matching JMS objects in MQ. However, I cannot find anywhere on the AIX server where there is any configuration for that MQ's JMS.

I can't find a .bindings file anywhere which I believe would tell me that it's a local file. However, LDAP makes sense, because we connect to this MQ from other servers.

Sorry if this seems like a silly question or is easy, but I'm at a loss and cannot move forward with my project until I figure this issue out.

However, here is my server.xml for my connection information just in case anyone sees anything wrong.

<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>

Error I'm getting, this is in the Liberty server console.log. I'm not getting any errors in the 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
JoshMc
  • 10,239
  • 2
  • 19
  • 38
fergp25
  • 41
  • 4
  • 1
    As long as all the values `channel`, `hostName`, `port`, `queueManager`, `baseQueueName` are correct you should be able to connect. What is the error you receive? Is there any corresponding errors in the queue managers `AMQERR01.LOG`? Is the "Q1" perhaps a clustered queue that does not exist local on "MY_QMGR", if this is the case then you should leave `baseQueueManagerName` blank. Even if "Q1" is local to "MY_QMGR" it is good to leave `baseQueueManagerName` blank, can still resolve to a locally defined queue on the queue manager you are connected to. – JoshMc Mar 22 '18 at 03:20
  • Thanks for the reply JoshMc. I've double checked and all of my values are correct. I removed the baseQueueManagerName and still received the same error. From what I'm reading I need a JMS provider somewhere? That's where I'm really fuzzy, because I'm using the old setup on the AIX box as a reference, but I can't find a single property file anywhere that defines a JMS provider on that server. – fergp25 Mar 22 '18 at 13:40
  • I think this `` should reference the JNDI name for Q1 and not have any other informatoin and look like this `` – JoshMc Mar 22 '18 at 15:22
  • Well, the current implementation of this works just fine with those settings in there. I just realized another issue I may be having. I'm using MQ v9.0.3 with liberty 8.5.5.9, so I'm now wondering if there's a compatibility issue between the two. – fergp25 Mar 23 '18 at 15:33

0 Answers0