Author |
Message
|
Arkay |
Posted: Wed May 14, 2008 9:47 am Post subject: MQJE001: Completion Code 2, Reason 2012 |
|
|
 Novice
Joined: 31 Aug 2006 Posts: 14
|
Hi,
I am working with the MQ Series 5.3 Server installation on a iSeries box. I am trying to connect to the MQ using a Java based Adapter, which uses the MQ Java API.This adapter uses the log4j framework to configure its logging to a Queue.
Below is my CLASSPATH setting:
/QIBM/ProdData/mqm/java/lib/connector.jar:/QIBM/ProdData/mqm/java/lib/com.ibm.mq.jar:/gskapps/gskgaa/:/gskapps/gskgaa/lib/gskgaa.jar:/gskapps/gskgaa/lib/xercesImpl.jar:/gskapps/gskgaa/lib/xml-apis.jar:/gskapps/gskgaa/lib/log4j-1.2.14.jar:/gskapps/gskgaa/lib/Gsk2c.xsd
When i submit the below Job, which is just starting my Java Adapter..
SBMJOB CMD(QSH CMD('java -cp $CLASSPATH:/gskgaa/GSK_iTrex/TEST/Receiver_GL_Update/properties/ -Djava.version=1.4 com.gsk.gskgaa.receiver.FileReceiver /gskgaa/GSK_iTrex/TEST/Receiver_GL_Update/properties/GSK_iTrex_GL_Update.properties'))
I am getting an error as below when connecting to queue GKOP_400_002QGAAERROR, on queue manager XKOP_400_002 (Both the Queue and Queue Manager names are correct, and the Queue Manager is up and running):
Attaching Java program to /QIBM/ProdData/mqm/java/lib/com.ibm.mq.jar.
Attaching Java program to /QIBM/ProdData/mqm/java/lib/connector.jar.
log4j:ERROR Error connecting to Queue : GKOP_400_002QGAAERROR, on queue manager XKOP_400_002
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2012
at java.lang.Throwable.<init>(Throwable.java:180)
at java.lang.Exception.<init>(Exception.java:29)
at com.ibm.mq.MQException.<init>(MQException.java:717)
at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:249)
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11._createManagedConnection(MQBindingsManagedConnectionFactoryJ11.java:153)
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11.createManagedConnection(MQBindingsManagedConnectionFactoryJ11.java:189)
at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.java:80)
at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConnectionManager.java:171)
at com.ibm.mq.MQQueueManager.obtainBaseMQQueueManager(MQQueueManager.java:754)
at com.ibm.mq.MQQueueManager.construct(MQQueueManager.java:688)
at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:417)
at com.gsk.gskgaa.utils.MQResourceManager.getQueueManager(MQResourceManager.java:6
at com.gsk.gskgaa.utils.WMQAppender.activateOptions(WMQAppender.java:83)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:132) More...
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:96)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:654)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:612)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:509)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:415)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:441)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:470)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:122)
at org.apache.log4j.Logger.getLogger(Logger.java:104)
at com.gsk.gskgaa.MessageProcessor.configureLogging(MessageProcessor.java:82)
at com.gsk.gskgaa.MessageProcessor.<init>(MessageProcessor.java:54)
at com.gsk.gskgaa.receiver.FileReceiver.<init>(FileReceiver.java:60)
at com.gsk.gskgaa.receiver.FileReceiver.main(FileReceiver.java:156)
20083113 01:31 FileReceiver.main:166 - GSKGAA Adapter GSKGAA 3.0 : Exception encountered - Adapter Exiting.
20083113 01:31 FileReceiver.main:168 - ----------- StackTrace Start ------------------------------
20083113 01:31 FileReceiver.main:169 - Exception : com.gsk.gskgaa.exceptions.GSKGAAException: Log4j not configured correctly
20083113 01:31 FileReceiver.main:170 - com.gsk.gskgaa.exceptions.GSKGAAException: Log4j not configured correctly
20083113 01:31 FileReceiver.main:171 - ----------- StackTrace End --------------------------------
GSKGAA Adapter GSKGAA 3.0 : Exception encountered - Adapter Exiting. More...
Joseph P Seminerio --- StackTrace Start -------------------------------------------------------------
Exception : com.gsk.gskgaa.exceptions.GSKGAAException: Log4j not configured correctly
com.gsk.gskgaa.exceptions.GSKGAAException: Log4j not configured correctly
at java.lang.Throwable.<init>(Throwable.java:195)
at java.lang.Exception.<init>(Exception.java:41)
at com.gsk.gskgaa.exceptions.GSKGAAException.<init>(GSKGAAException.java:49)
at com.gsk.gskgaa.MessageProcessor.configureLogging(MessageProcessor.java:89)
at com.gsk.gskgaa.MessageProcessor.<init>(MessageProcessor.java:54)
at com.gsk.gskgaa.receiver.FileReceiver.<init>(FileReceiver.java:60)
at com.gsk.gskgaa.receiver.FileReceiver.main(FileReceiver.java:156)
--- StackTrace End ---------------------------------------------------------------
Thank you for using GSKGAA 3.0
Can some one help me out in finding what the reason could be.
the mqrc 2012 says : 2012 0x000007dc MQRC_ENVIRONMENT_ERROR
But this doesn't give me much information.
Any kind of help is much appreciated.
Thanks _________________ Rgds,
Arkay.
IBM Certified System Administrator - WMQ
IBM Certified Solution Designer - WMQ |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed May 14, 2008 2:38 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
How about a mismatch in the version of your jar files?
Or an environment variable not defined right that is supposed to point to MQ_INSTALL or MQ_INSTALL/JAVA/LIB ?? _________________ MQ & Broker admin |
|
Back to top |
|
 |
Arkay |
Posted: Thu May 15, 2008 11:11 am Post subject: My Environment Variables |
|
|
 Novice
Joined: 31 Aug 2006 Posts: 14
|
Below are all my Environment Variable settings:
CLASSPATH :
/QIBM/ProdData/mqm/java/lib/connector.jar:/QIBM/ProdData/mqm/java/lib/com.ibm.mq.jar:/gskapps/gskgaa/:/gskapps/gskgaa/lib/gskgaa.jar:/gskapps/gskgaa/lib/xercesImpl.jar:/gskapps/gskgaa/lib/xml-apis.jar:/gskapps/gskgaa/lib/log4j-1.2.14.jar:/gskapps/gskgaa/lib/Gsk2c.xsd:/QIBM/ProdData/mqm/java/lib/mqbind.jar:/QIBM/ProdData/mqm/java/lib/fscontext.jar:/QIBM/ProdData/mqm/java/lib/jms.jar:/QIBM/ProdData/mqm/java/lib/providerutil.jar:/QIBM/ProdData/mqm/java/lib/mqjms.jar
MQ_JAVA_DATA_PATH=/QIBM/ProdData/mqm/
MQ_JAVA_INSTALL_PATH=/QIBM/ProdData/mqm/java/
MQ_JAVA_LIB_PATH=/QIBM/ProdData/mqm/java/lib/
MQ_JAVA_CAP_PATH=/QIBM/ProdData/mqm/
Even after verifying all the env. variable settings i am getting same error..
Please help me.
Thanks in Advance.. _________________ Rgds,
Arkay.
IBM Certified System Administrator - WMQ
IBM Certified Solution Designer - WMQ |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu May 15, 2008 2:34 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Did not see the jta.jar on the classpath...
Did I miss it?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Arkay |
Posted: Thu May 15, 2008 3:15 pm Post subject: |
|
|
 Novice
Joined: 31 Aug 2006 Posts: 14
|
As my CLASSPATH value was becoming long, i replaced providerutil.jar with the jta.jar.I have verified that it exists.And since the providerutil.jar is used in JNDI, i am not using the JNDI any where, i removed that one.
Even then i am getting same error.. _________________ Rgds,
Arkay.
IBM Certified System Administrator - WMQ
IBM Certified Solution Designer - WMQ |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu May 15, 2008 5:58 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
you will need to have all the jars from
MQ_JAVA_LIB_PATH
on your CLASSPATH
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Arkay |
Posted: Fri May 16, 2008 7:58 am Post subject: |
|
|
 Novice
Joined: 31 Aug 2006 Posts: 14
|
CP1='/QIBM/ProdData/mqm/lib/:/QIBM/ProdData/mqm/java/lib/:/QIBM/ProdData/mqm/java/samples/base/:/QIBM/ProdData/mqm/java/lib/connector.jar:/QIBM/ProdData/mqm/java/lib/com.ibm.mq.jar:/QIBM/ProdData/mqm/java/lib/com.ibm.mqbind.jar:/QIBM/ProdData/mqm/java/lib/com.ibm.mqjms.jar:/QIBM/ProdData/mqm/java/lib/fscontext.jar:/QIBM/ProdData/mqm/java/lib/jms.jar:/QIBM/ProdData/mqm/java/lib/jndi.jar:/QIBM/ProdData/mqm/java/lib/jta.jar:/QIBM/ProdData/mqm/java/lib/ldap.jar:/QIBM/ProdData/mqm/java/lib/providerutil.jar'
CLASSPATH:'/gskapps/gskgaa/:/gskapps/gskgaa/lib/gskgaa.jar:/gskapps/gskgaa/lib/xercesImpl.jar:/gskapps/gskgaa/lib/xml-apis.jar:/gskapps/gskgaa/lib/log4j-1.2.14.jar:/gskapps/gskgaa/lib/Gsk2c.xsd'
QSH CMD('java -cp $CLASSPATH:$CP1:/gskgaa/GSK_iTrex/TEST/Receiver_GL_Update/properties/ -Djava.version=1.4 com.gsk.gskgaa.receiver.FileReceiver /gskgaa/GSK_iTrex/TEST/Receiver_GL_Update/properties/GSK_iTrex_GL_Update.properties'))
Even after setting all the above..i am getting the same error..
Please suggest..
Thanks.. _________________ Rgds,
Arkay.
IBM Certified System Administrator - WMQ
IBM Certified Solution Designer - WMQ |
|
Back to top |
|
 |
Arkay |
Posted: Fri May 16, 2008 8:00 am Post subject: |
|
|
 Novice
Joined: 31 Aug 2006 Posts: 14
|
I have added all the jar files from the MQ_JAVA_LIB_PATH. _________________ Rgds,
Arkay.
IBM Certified System Administrator - WMQ
IBM Certified Solution Designer - WMQ |
|
Back to top |
|
 |
bower5932 |
Posted: Fri May 16, 2008 10:13 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
I've been passively watching this thread. However, when I saw the initial post with '400' in some of the trace, I wondered if the 2012 environment error had something to do with capabilities of the java vs. the qmgr. I'm not a 400 person.... |
|
Back to top |
|
 |
Arkay |
Posted: Fri May 16, 2008 12:13 pm Post subject: |
|
|
 Novice
Joined: 31 Aug 2006 Posts: 14
|
the trace has the 400 just in the names of the Queue and Queue Manager and are valid ones...and these i beleive do not influence the environment about MQ..
Coming to Java since the box is an iSeries,it hs a very standard/full installatoin of the JDK 1.4 on it,which is the required version for my Adapter.. _________________ Rgds,
Arkay.
IBM Certified System Administrator - WMQ
IBM Certified Solution Designer - WMQ |
|
Back to top |
|
 |
ADV |
Posted: Fri May 16, 2008 12:23 pm Post subject: |
|
|
Apprentice
Joined: 24 Apr 2007 Posts: 44 Location: Boston, MA
|
|
Back to top |
|
 |
fjb_saper |
Posted: Fri May 16, 2008 2:18 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
As this is 400 you need to verify that the 400 environment, you are running your java/MQ process in, is setup correctly.
This may not be the case.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Arkay |
Posted: Tue May 27, 2008 2:13 pm Post subject: |
|
|
 Novice
Joined: 31 Aug 2006 Posts: 14
|
I have verfied almost everything i can, can some one suggest me a systematic approach for the same..I am still facing the error and i need to identify the root cause..
Thanks in Advance _________________ Rgds,
Arkay.
IBM Certified System Administrator - WMQ
IBM Certified Solution Designer - WMQ |
|
Back to top |
|
 |
Arkay |
Posted: Thu Jun 05, 2008 5:46 am Post subject: |
|
|
 Novice
Joined: 31 Aug 2006 Posts: 14
|
The issue is resolved and the reason is the environment variable QIBM_MULTI_THREADED was set to 'N' and it is supposed to be set to 'Y'.This is becuase the MQ Java and JMS are inherently multithreaded and they require the java runtime to be initialized to run multithreaded programs.
Reference:
http://www-304.ibm.com/jct09002c/isv/tech/faq/individual.jsp?oid=1:88404 _________________ Rgds,
Arkay.
IBM Certified System Administrator - WMQ
IBM Certified Solution Designer - WMQ |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jun 05, 2008 2:39 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
QED....
Thanks for posting the resolution. I'm sure your collegues working on AS400 will have an extra thought of gratitude for you.
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
|