Author |
Message
|
selva |
Posted: Thu Nov 27, 2003 1:57 pm Post subject: MQJE001: Completion Code 2, Reason 2121 |
|
|
Newbie
Joined: 27 Nov 2003 Posts: 1
|
Hi all,
I have writen an program which reads the message from the MQ Queue and writes on to the database. I want to mantain a transaction between the Queue manager and the database. I have configured the Queue manager with the XA stanza in the qm.ini file and provided with the db2switch file. The QueuManager starts and there is no problem. I have granted the connect permission to the mqm user. When i execute my program it fails with the foolwing error MQJE001: Completion Code 2, Reason 2121 . It says no participant It fails exactly on the qmgr.begin() statement. I have issued an qmgr.getJDBCConnection(mydatasource) and i am getting the connection. But i dont know why this error comes can any one help out. My program is written using MQ Java classes
environment:
OS-AIX 5.3
database- DB2 8.1 fixpack 4
MQSeries 5.3
Kind Regards,
Selva |
|
Back to top |
|
 |
techno |
Posted: Tue Sep 27, 2005 10:03 am Post subject: |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
Could you let me know how did you solve the problem?
Getting jdbc connection. begin() fails. Platform is HP-UX.
Thanks |
|
Back to top |
|
 |
wschutz |
Posted: Tue Sep 27, 2005 10:14 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
techno wrote: |
Could you let me know how did you solve the problem?
Getting jdbc connection. begin() fails. Platform is HP-UX.
Thanks |
I don't think I'd hold my breath waiting for an answer from someone that made 1 post almost 2 years ago.... can you give us more info on your problem, platforms, what have you tried, stanza settings, amqerr01.log segments, etc. _________________ -wayne |
|
Back to top |
|
 |
hopsala |
Posted: Tue Sep 27, 2005 10:21 am Post subject: |
|
|
 Guardian
Joined: 24 Sep 2004 Posts: 960
|
Yah, usually people register, post, and are gone the second their problem is solved, never to return; as wayne said, don't hold your breath.
Anyway, hate to be a drag, but did you use the Search button? I've found tons of material about MQJE001 and i'm willing to bet the solution to your problem is in one of them. |
|
Back to top |
|
 |
techno |
Posted: Tue Sep 27, 2005 10:33 am Post subject: |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
Thank you for your response.
I did search. I could not figure what the problem is. Thanks for any help.
HP-UX/5.3
Oracle 9
Making client con from java - thin driver. Using SQLNET in XAResourceManager
-----------------------------------------------------------
XAResourceManager:
Name=mydb
SwitchFile=/opt/mqm/samp/xatm/oraswit
XAOpenString=Oracle_XA+Acc=P/user/pwd+SesTm=35+LogDir=/home/mqm+SQLNET=db
ThreadOfControl=PROCESS
-----------------------------------------------------------
Java Code:
FileOutputStream traceFile =new FileOutputStream("./xatrace.txt"
);
MQEnvironment.enableTracing(5, traceFile);
Hashtable mqProperties = new Hashtable();
mqProperties.put(MQC.THREAD_AFFINITY, new Boolean(true));
MQQueueManager qMgr = new MQQueueManager("TESTQM", mqProperties)
;
oracle.jdbc.xa.client.OracleXADataSource xads = new oracle.jdbc.
xa.client.OracleXADataSource();
xads.setUser("user");
xads.setPassword("pwd");
xads.setURL("jdbc:oracle:thin:@machi:1621:db");
//qMgr.begin();
Connection con = qMgr.getJDBCConnection( xads );
System.out.println(con);
qMgr.begin();
qMgr.commit();
qMgr.close();
qMgr.disconnect();
----------------------------------------------------------------------------
Above code prints the connection. begin() fails with 2121.
----------------------------------------------------------------------------
Trace:
----
11:20:28 [1127845228725] Thread: main, Object: com.ibm.mq.MQQueueManager@6f0472
==> begin() entry
11:20:28 [1127845228726] Thread: main, Object: com.ibm.mq.server.MQSESSION@762
373 ==> MQBEGIN() entry
11:20:28 [1127845228726] Thread: main, Object: com.ibm.mq.server.MQSESSION@7
62373 Conn Handle = 7796888
11:20:28 [1127845228752] Thread: MQBindingsQMThread0 ==> XAtoJTA::resetRC() entr
y
11:20:28 [1127845228752] Thread: MQBindingsQMThread0 ==> XAtoJTA::getInstance(
) entry
11:20:28 [1127845228753] Thread: MQBindingsQMThread0, Object: com.ibm.mq.XAt
oJTA@79dc36 ==> constructor() entry
11:20:28 [1127845228753] Thread: MQBindingsQMThread0, Object: com.ibm.mq.X
AtoJTA@79dc36 javabase/com/ibm/mq/XAtoJTA.java, java, j5304, j5304-L030506.2 03/
05/02 15:24:23 @(#) 1.10.2.1
11:20:28 [1127845228753] Thread: MQBindingsQMThread0, Object: com.ibm.mq.XAt
oJTA@79dc36 <== constructor() exit
11:20:28 [1127845228754] Thread: MQBindingsQMThread0 <== XAtoJTA::getInstance(
) exit
11:20:28 [1127845228754] Thread: MQBindingsQMThread0, Object: com.ibm.mq.XAtoJ
TA@79dc36 resetting beginRC
11:20:28 [1127845228754] Thread: MQBindingsQMThread0 <== XAtoJTA::resetRC() exit
11:20:28 [1127845228755] Thread: MQBindingsQMThread0 ==> /build/j5304_D/src/nati
ve/mqi.c:1162::_MQBEGIN() entry
11:20:29 [1127845229392] Thread: MQBindingsQMThread0 Class: /build/j5304_D/src
/native/mqi.c:1190: : MQBEGIN call returned CC=0, RC=0
11:20:29 [1127845229392] Thread: MQBindingsQMThread0 <== /build/j5304_D/src/nati
ve/mqi.c:1196::_MQBEGIN() exit
11:20:29 [1127845229393] Thread: MQBindingsQMThread0 ==> XAtoJTA::getRC() entry
11:20:29 [1127845229393] Thread: MQBindingsQMThread0 ==> XAtoJTA::getInstance(
) entry
11:20:29 [1127845229393] Thread: MQBindingsQMThread0 <== XAtoJTA::getInstance(
) exit
11:20:29 [1127845229394] Thread: MQBindingsQMThread0, Object: com.ibm.mq.XAtoJ
TA@79dc36 returning beginRC=2121
11:20:29 [1127845229394] Thread: MQBindingsQMThread0 <== XAtoJTA::getRC() exit
11:20:29 [1127845229394] Thread: MQBindingsQMThread0 Class: MQSESSION overriding
reason code from 0 to 2121
11:20:29 [1127845229395] Thread: main, Object: com.ibm.mq.server.MQSESSION@7
62373 CC,RC = 0,2121
11:20:29 [1127845229395] Thread: main, Object: com.ibm.mq.server.MQSESSION@762
373 <== MQBEGIN() exit
11:20:29 [1127845229396] Thread: main, Object: com.ibm.mq.MQException: MQJE001
: Completion Code 0, Reason 2121 ==> MQException constructor(cc, rc, source)() e
ntry
11:20:29 [1127845229401] Thread: main, Object: com.ibm.mq.MQException: MQJE0
01: Completion Code 0, Reason 2121 javabase/com/ibm/mq/MQException.java, java, j
5304, j5304-05-030903 03/08/14 17:16:01 @(#) 1.48.1.3
11:20:29 [1127845229401] Thread: main, Object: com.ibm.mq.MQException: MQJE0
01: Completion Code 0, Reason 2121 cc = 0
11:20:29 [1127845229401] Thread: main, Object: com.ibm.mq.MQException: MQJE0
01: Completion Code 0, Reason 2121 rc = 2121
11:20:29 [1127845229402] Thread: main, Object: com.ibm.mq.MQException: MQJE0
01: Completion Code 0, Reason 2121 source = com.ibm.mq.MQQueueManager@6f0472
11:20:29 [1127845229403] Thread: main, Object: com.ibm.mq.MQException: MQJE001
: Completion Code 0, Reason 2121 <== MQException constructor() exit
11:20:29 [1127845229404] Thread: main, Object: com.ibm.mq.MQQueueManager@6f0472
<== begin (via exception)() exit
11:20:29 [1127845229405] Thread: main, Object: com.ibm.mq.MQQueueManager@6f0472
<== begin() exit
---
-- |
|
Back to top |
|
 |
wschutz |
Posted: Tue Sep 27, 2005 10:38 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
When you start the queue manager, are there any relevant messages in amqerr01.log about resource managers? 2121 means MQ doesn't think there is one. _________________ -wayne |
|
Back to top |
|
 |
techno |
Posted: Tue Sep 27, 2005 10:46 am Post subject: |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
There is no error in error-log. |
|
Back to top |
|
 |
wschutz |
Posted: Tue Sep 27, 2005 11:20 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Okay, anything interesting here:
LogDir=/home/mqm _________________ -wayne |
|
Back to top |
|
 |
techno |
Posted: Tue Sep 27, 2005 11:35 am Post subject: |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
|
Back to top |
|
 |
wschutz |
Posted: Tue Sep 27, 2005 11:42 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
techno wrote: |
I have that directory. |
Yes, is there a log file in it? _________________ -wayne |
|
Back to top |
|
 |
techno |
Posted: Tue Sep 27, 2005 11:52 am Post subject: |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
|
Back to top |
|
 |
wschutz |
Posted: Tue Sep 27, 2005 11:57 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
I wonder if MQ is actually making the connection to oracle... if you shutdown mq and oracle and just bring up mq you should see an error message in amqerr01.log about not being able to contact the resource manager. Can you try that? _________________ -wayne |
|
Back to top |
|
 |
techno |
Posted: Tue Sep 27, 2005 12:00 pm Post subject: |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
Okay, I have seen xa_NULL09272005.trc in directory, where I am running the program
ORACLE XA: Version 9.0.1.0.0. RM name = 'Oracle_XA'.
102121.13299.0:
xaoprocinit: OCIInitialize failed, returned 1804
ORACLE XA: Version 9.0.1.0.0. RM name = 'Oracle_XA'.
102121.13299.0:
xaoopen: XAER_RMERR; xaoprocinit failed, rc=-1
ORACLE XA: Version 9.0.1.0.0. RM name = 'Oracle_XA'.
102900.19523.0:
xaoprocinit: OCIInitialize failed, returned 1804
ORACLE XA: Version 9.0.1.0.0. RM name = 'Oracle_XA'. |
|
Back to top |
|
 |
techno |
Posted: Tue Sep 27, 2005 12:12 pm Post subject: |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
ORACLE_HOME param was not set correctly. I did it. Now, I do not see any xa_NULL* file getting created. But java app is still throwing 2121.
I also tried to stop and start the qmgr. I got the same error.
Thanks |
|
Back to top |
|
 |
techno |
Posted: Tue Sep 27, 2005 12:55 pm Post subject: |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
Updated switch file using makefile given in xatm dir
Thus using switch file: /opt/mqm/samp/xatm/oraswit
Thanks |
|
Back to top |
|
 |
|