Author |
Message
|
subu |
Posted: Mon Nov 10, 2003 7:55 am Post subject: com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2 |
|
|
Newbie
Joined: 10 Nov 2003 Posts: 5
|
while doing pub/sub and point to point sample in WSAD ,I am getting this error.Anybody have any clue to get the sample running?
Thanks
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2012
at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:172)
at com.ibm.mq.MQJDManagedConnectionFactoryJ11._createManagedConnection(MQJDManagedConnectionFactoryJ11.java:128)
at com.ibm.mq.MQJDManagedConnectionFactoryJ11.createManagedConnection(MQJDManagedConnectionFactoryJ11.java:146)
at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.java:80)
at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConnectionManager.java:150)
at com.ibm.mq.MQQueueManager.obtainBaseMQQueueManager(MQQueueManager.java:682)
at com.ibm.mq.MQQueueManager.construct(MQQueueManager.java:620)
at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:437)
at com.ibm.mq.MQSPIQueueManager.<init>(MQSPIQueueManager.java:52)
at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:1383)
at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:960)
at com.ibm.mq.jms.MQTopicConnection.<init>(MQTopicConnection.java:152)
at com.ibm.mq.jms.MQTopicConnection.<init>(MQTopicConnection.java:114)
at com.ibm.mq.jms.MQTopicConnectionFactory.createMQTopicConnection(MQTopicConnectionFactory.java:337)
at com.ibm.mq.jms.MQTopicConnectionFactory.createTopicConnection(MQTopicConnectionFactory.java:214)
at Subscriber.<init>(Subscriber.java:29)
at Subscriber.main(Subscriber.java:80)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.websphere.client.applicationclient.launchClient.createContainerAndLaunchApp(launchClient.java:616)
at com.ibm.websphere.client.applicationclient.launchClient.main(launchClient.java:420)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)
javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for ''
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:546)
at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:1450)
at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:960)
at com.ibm.mq.jms.MQTopicConnection.<init>(MQTopicConnection.java:152)
at com.ibm.mq.jms.MQTopicConnection.<init>(MQTopicConnection.java:114)
at com.ibm.mq.jms.MQTopicConnectionFactory.createMQTopicConnection(MQTopicConnectionFactory.java:337)
at com.ibm.mq.jms.MQTopicConnectionFactory.createTopicConnection(MQTopicConnectionFactory.java:214)
at Subscriber.<init>(Subscriber.java:29)
at Subscriber.main(Subscriber.java:80)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.websphere.client.applicationclient.launchClient.createContainerAndLaunchApp(launchClient.java:616)
at com.ibm.websphere.client.applicationclient.launchClient.main(launchClient.java:420)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94) |
|
Back to top |
|
 |
vennela |
Posted: Mon Nov 10, 2003 8:16 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Do you have a Queue Manager running? Is that the default Queue Manager on that machine? Is this QueueManager local or remote? Do you have your QCF setup. |
|
Back to top |
|
 |
subu |
Posted: Mon Nov 10, 2003 8:25 am Post subject: |
|
|
Newbie
Joined: 10 Nov 2003 Posts: 5
|
|
Back to top |
|
 |
vmcgloin |
Posted: Mon Nov 10, 2003 9:14 am Post subject: |
|
|
Knight
Joined: 04 Apr 2002 Posts: 560 Location: Scotland
|
Have you checked out the 2012 reason code (in the MQ Message manual and the MQ Using Java manual)? That gives a few hints. |
|
Back to top |
|
 |
subu |
Posted: Mon Nov 10, 2003 10:38 am Post subject: |
|
|
Newbie
Joined: 10 Nov 2003 Posts: 5
|
It says,
MQRC_ENVIRONMENT_ERROR (2012)
Explanation: The call is not valid for the current environment.
On z/OS, one of the following applies:
An MQCONN or MQCONNX call was issued, but the application has been linked with an adapter that is not supported in the environment in which the application is running. For example, this can arise when the application is linked with the MQ RRS adapter, but the application is running in a DB2 Stored Procedure address space. RRS is not supported in this environment. Stored Procedures wishing to use the MQ RRS adapter must run in a DB2 WLM-managed Stored Procedure address space.
An MQCMIT or MQBACK call was issued, but the application has been linked with the RRS batch adapter CSQBRSTB. This adapter does not support the MQCMIT and MQBACK calls.
An MQCMIT or MQBACK call was issued in the CICS or IMS environment.
The RRS subsystem is not up and running on the z/OS system that ran the application.
On Compaq OpenVMS Alpha, OS/2, OS/400, Compaq NonStop Kernel, UNIX systems, and Windows, one of the following applies:
The application is linked to the wrong libraries (threaded or nonthreaded).
An MQBEGIN , MQCMIT , or MQBACK call was issued, but an external unit-of-work manager is in use. For example, this reason code occurs on Windows when an MTS object is running as a DTC transaction. This reason code also occurs if the queue manager does not support units of work.
The MQBEGIN call was issued in an MQ client environment.
An MQXCLWLN call was issued, but the call did not originate from a cluster workload exit.
Completion Code: MQCC_FAILED
Programmer Response: Do one of the following (as appropriate):
On z/OS:
Link the application with the correct adapter.
Modify the application to use the SRRCMIT and SRRBACK calls in place of the MQCMIT and MQBACK calls. Alternatively, link the application with the RRS batch adapter CSQBRRSI. This adapter supports MQCMIT and MQBACK in addition to SRRCMIT and SRRBACK.
For a CICS or IMS application, issue the appropriate CICS or IMS call to commit or backout the unit of work.
Start the RRS subsystem on the z/OS system that is running the application.
In the other environments:
Link the application with the correct libraries (threaded or nonthreaded).
Remove from the application the call that is not supported.
************************************************************
Assuming that I have wrong adapter,how do I correct it?Or which library I should include in place of com.ibm.mq.jar and com.ibm.mqjms.jar? |
|
Back to top |
|
 |
vennela |
Posted: Mon Nov 10, 2003 11:58 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
If you know how to use WSAD's admin console, it would be better if you define the JNDI objects for JMS using the admin console.
In WSAD, if you go to server perspective, if you double click on the server (if you haven't already created a server and server configuration create one), and somewhere you will see something like "Enable admin console". Check that box and you can use admin console. |
|
Back to top |
|
 |
bower5932 |
Posted: Mon Nov 10, 2003 12:04 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
I would guess that this is has something to do with your XA capabilities. The stack trace has you using the non-XA classes. You probably have something set that requires the XA classes. There should be an XA box at the bottom of your QCF. Do you have it checked? If not, try checking it. |
|
Back to top |
|
 |
subu |
Posted: Mon Nov 10, 2003 12:45 pm Post subject: |
|
|
Newbie
Joined: 10 Nov 2003 Posts: 5
|
I tried both from the admin console.Enable XA capabilities and then unchecked it.But the problem persists.
Thanks |
|
Back to top |
|
 |
bower5932 |
Posted: Tue Nov 11, 2003 6:24 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
Well, I can't say that I've seen anything like this. Can I get some more specifics on what you have installed? Are you running full-blown MQ or are you running embedded MQ? Do you have any kind of CSD installed? What is the output of the mqver command? Do you see any *.FDC files in the MQ errors subdirectory? |
|
Back to top |
|
 |
subu |
Posted: Tue Nov 11, 2003 10:05 am Post subject: |
|
|
Newbie
Joined: 10 Nov 2003 Posts: 5
|
I am running an embedded MQ.
My classpath has got C:\Program Files\IBM\WebSphere Studio\runtimes\base_v5\properties,bootstrap.jar,j2ee.jar,Improxy.jar when I create and configure the server .then I add com.ibm.mqjms.jar and com.ibm.mq.jar in the classpath.I have an old com.ibm.mqjms.jar and com.ibm.mq.jar in my machine at C:\Program Files\WebSphere\Studio40\lib\CompileTimeClasses\AppServerV4.If I use this one then my error is like this.
com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. Root exception is javax.jms.JMSException: MQJMS1006: invalid value for transportType: 3
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:450)
at com.ibm.mq.jms.MQConnectionFactory.setTransportType(MQConnectionFactory.java:154)
at com.ibm.mq.jms.MQTopicConnectionFactoryFactory.populateTCF(MQTopicConnectionFactoryFactory.java:87)
at com.ibm.mq.jms.MQTopicConnectionFactoryFactory.getObjectInstance(MQTopicConnectionFactoryFactory.java:61)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
at com.ibm.ejs.jms.JMSConnectionFactoryFactory.getObjectInstance(JMSConnectionFactoryFactory.java:81)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
at com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults(CNContextImpl.java:1674)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1537)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1457)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1167)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)
at javax.naming.InitialContext.lookup(InitialContext.java:359)
at Subscriber.<init>(Subscriber.java:27)
at Subscriber.main(Subscriber.java:83)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.websphere.client.applicationclient.launchClient.createContainerAndLaunchApp(launchClient.java:616)
at com.ibm.websphere.client.applicationclient.launchClient.main(launchClient.java:420)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)
I think my errors are due to classpath. |
|
Back to top |
|
 |
Prahasith |
Posted: Tue Nov 11, 2003 11:09 am Post subject: |
|
|
 Disciple
Joined: 16 May 2003 Posts: 184 Location: Kansas City
|
Can you post the linked WebSphere MQ exception reason and completion code |
|
Back to top |
|
 |
vennela |
Posted: Tue Nov 11, 2003 11:48 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Prahasith:
It's in the very beginning of the thread
2012 |
|
Back to top |
|
 |
Prahasith |
Posted: Tue Nov 11, 2003 11:58 am Post subject: |
|
|
 Disciple
Joined: 16 May 2003 Posts: 184 Location: Kansas City
|
|
Back to top |
|
 |
Prahasith |
Posted: Tue Nov 11, 2003 12:11 pm Post subject: |
|
|
 Disciple
Joined: 16 May 2003 Posts: 184 Location: Kansas City
|
My suspicion is that you haven't quite got your configuration setup correctly - an MQException with a reason code of 2012 is an MQRC_ENVIRONMENT_ERROR.
Firstly can you please check that you have the JMS JARs supplied with embedded messaging (typically found in c:/Program Files/IBM/WebSphere MQ/Java/lib) on the application client's classpath and no other JMS jars.
Secondly there may be a problem with the configuration of your WAS 5.0 test environment's configuration. If you open your WAS 5.0 test server's configuration and switch to the Variables tab there are two variables that must be configured correctly - MQ_INSTALL_ROOT and MQJMS_LIB_ROOT. These should be set to c:/Program Files/IBM/Websphere MQ and c:/Progam Files/IBM/WebSphere MQ/Java/lib respectively -
I think you may have to restart WSAD to have them take effect. Having configured these variables and restarted WSAD delete and recreate your Connection Factories in the server's configuration (on the JMS tab) and hopefully your applications will now run. |
|
Back to top |
|
 |
|