|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
XA:MQSeries 5.3 with Oracle9i2 on RedHat7.2(Error2121) |
« View previous topic :: View next topic » |
Author |
Message
|
droopy |
Posted: Tue Feb 27, 2007 7:23 pm Post subject: XA:MQSeries 5.3 with Oracle9i2 on RedHat7.2(Error2121) |
|
|
Newbie
Joined: 27 Feb 2007 Posts: 4
|
I am using MQSeries 5.3(no CSD) with Oracle9i2(9.2.0.4) on RedHat7.2. Oracle is on the other server(IP:192.168.2.231,SID:ORA92).The Queue Manager starts OK,but I get error 2121 when MQQueueManager.begin() is called.
What I have to be done, so that my application works properly?
Please help me!
qm.ini:
--------------------------------------
XAResourceManager:
Name=myoracle
SwitchFile=/opt/mqm/java/lib/jdbc/oraswit
XAOpenString=Oracle_XA+Acc=P/METMQ/METMQ+SesTm=35+DB=ORA92_192.168.2.231+LogDir=/tmp+Threads=true+SqlNet=ORA92_192.168.2.231
ThreadOfControl=THREAD
--------------------------------------
SwitchFile:
make -f /opt/mqm/samp/xatm/xaswit.mak oraswit
METMQ can access DBA_PENDING_TRANSACTIONS
AMQERR01.LOG:
-------------------------------------------------------------------------------
02/28/2007 10:18:46 AM
AMQ8003: WebSphere MQ queue manager 'testksy' started.
EXPLANATION:
WebSphere MQ queue manager 'testksy' started.
ACTION:
None.
-------------------------------------------------------------------------------
02/28/2007 10:18:46 AM
AMQ9410: Repository manager started
EXPLANATION:
The repository manager started successfully.
ACTION:
None.
-------------------------------------------------------------------------------
Java Code:
MQEnvironment.hostname = hostName;
MQEnvironment.CCSID = ccsid;
MQEnvironment.port = port;
MQEnvironment.channel = channelName;
//MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY,MQC.TRANSPORT_MQSERIES);
MQEnvironment.properties.put(MQC.THREAD_AFFINITY, new Boolean(true));
MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_BINDINGS);
System.out.println("MQEnvironment ready!");
qMgr = new MQQueueManager(queueManagerName,connectionManage);
//qMgr = new MQQueueManager(queueManagerName,properties);
System.out.println("MQQueueManager ready!");
OracleXADataSource oxds = new OracleXADataSource();
oxds.setURL("jdbc:oracle:thin:@192.168.2.231:1521:ora92");
oxds.setUser("metmq");
oxds.setPassword("metmq");
System.out.println("OracleXADataSource ready!");
con = qMgr.getJDBCConnection((XADataSource)oxds);
System.out.println("Connection ready!");
final int trace = 1;
FileOutputStream traceFile = new FileOutputStream(PropertyUtils.getProperty("mq.trace.file"));
MQEnvironment.enableTracing(trace,traceFile);
qMgr.begin();
System.out.println("MQQueueManager begin!");
log:
MQEnvironment ready!
Properties ready!
MQQueueManager ready!
OracleXADataSource ready!
Connection ready!
MQJE001: Completion Code 2, Reason 2121
ERROR: MQJE001: Completion Code 2, Reason 2121(MQCC_FAILED,MQRC_NO_EXTERNAL_PARTICIPANTS)
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2121
at com.ibm.mq.MQQueueManager.begin(MQQueueManager.java:1144)
trace file:
10:09:52 [1172628592326] Thread: Thread-1 Class:
System Properties
=================
Key Value
--- -----
java.assistive: ON
java.runtime.name: Java(TM) 2 Runtime Environment, Standard Edition
sun.boot.library.path: /opt/IBMJava2-14/bin/../jre/bin
java.vm.version: 1.4.0
java.vm.vendor: IBM Corporation
java.vendor.url: http://www.ibm.com/
path.separator: :
java.vm.name: Classic VM
file.encoding.pkg: sun.io
user.country: US
sun.os.patch.level: unknown
java.vm.specification.name: Java Virtual Machine Specification
java.runtime.version: 1.4.0
java.fullversion: J2RE 1.4.0 IBM build cxia32140-20020917a (JIT enabled: jitc)
java.awt.graphicsenv: sun.awt.X11GraphicsEnvironment
java.endorsed.dirs: /opt/IBMJava2-14/bin/../jre/lib/endorsed
os.arch: x86
java.io.tmpdir: /tmp
line.separator:
java.vm.specification.vendor: Sun Microsystems Inc.
java.awt.fonts:
os.name: Linux
sun.java2d.fontpath:
java.library.path: /opt/mqm/java/lib
java.specification.name: Java Platform API Specification
java.class.version: 48.0
java.util.prefs.PreferencesFactory: java.util.prefs.FileSystemPreferencesFactory
invokedviajava:
os.version: 2.4.7-10
user.home: /var/mqm
java.awt.printerjob: sun.print.PSPrinterJob
file.encoding: UTF-8
java.specification.version: 1.4
user.name: mqm
java.class.path: sender.jar
java.vm.specification.version: 1.0
sun.arch.data.model: 32
java.home: /opt/IBMJava2-14/bin/../jre
java.specification.vendor: Sun Microsystems Inc.
user.language: en
java.vm.info: J2RE 1.4.0 IBM build cxia32140-20020917a (JIT enabled: jitc)
java.version: 1.4.0
java.ext.dirs: /opt/IBMJava2-14/bin/../jre/lib/ext
sun.boot.class.path: /opt/IBMJava2-14/bin/../jre/lib/core.jar:/opt/IBMJava2-14/bin/../jre/lib/graphics.jar:/opt/IBMJava2-14/bin/../jre/lib/security.jar:/opt/IBMJava2-14/bin/../jre/lib/server.jar:/opt/IBMJava2-14/bin/../jre/lib/xml.jar:/opt/IBMJava2-14/bin/../jre/lib/charsets.jar
java.vendor: IBM Corporation
file.separator: /
java.vendor.url.bug:
java.compiler: jitc
sun.io.unicode.encoding: UnicodeLittle
10:09:52 [1172628592327] Thread: Thread-1, Object: com.ibm.mq.MQQueueManager@24235e26 ==> begin() entry
10:09:52 [1172628592328] Thread: Thread-1, Object: com.ibm.mq.server.MQSESSION@4f21de25 ==> MQBEGIN() entry
10:09:52 [1172628592329] Thread: MQBindingsQMThread0 ==> XAtoJTA::resetRC() entry
10:09:52 [1172628592329] Thread: MQBindingsQMThread0 ==> XAtoJTA::getInstance() entry
10:09:52 [1172628592330] Thread: MQBindingsQMThread0 <== XAtoJTA::getInstance() exit
10:09:52 [1172628592330] Thread: MQBindingsQMThread0, Object: com.ibm.mq.XAtoJTA@37b9de25 resetting beginRC
10:09:52 [1172628592330] Thread: MQBindingsQMThread0 <== XAtoJTA::resetRC() exit
10:09:52 [1172628592331] Thread: MQBindingsQMThread0 ==> /build/j530_D/src/common/javabase/native2/mqi.c:877::_MQBEGIN() entry
10:09:53 [1172628593793] Thread: MQBindingsQMThread0 <== /build/j530_D/src/common/javabase/native2/mqi.c:892::_MQBEGIN() exit
10:09:53 [1172628593793] Thread: MQBindingsQMThread0 ==> XAtoJTA::getRC() entry
10:09:53 [1172628593793] Thread: MQBindingsQMThread0 ==> XAtoJTA::getInstance() entry
10:09:53 [1172628593794] Thread: MQBindingsQMThread0 <== XAtoJTA::getInstance() exit
10:09:53 [1172628593794] Thread: MQBindingsQMThread0, Object: com.ibm.mq.XAtoJTA@37b9de25 returning beginRC=2121
10:09:53 [1172628593795] Thread: MQBindingsQMThread0 <== XAtoJTA::getRC() exit
10:09:53 [1172628593795] Thread: MQBindingsQMThread0 Class: MQSESSION overriding reason code from 0 to 2121
10:09:53 [1172628593795] Thread: Thread-1, Object: com.ibm.mq.server.MQSESSION@4f21de25 <== MQBEGIN() exit
10:09:53 [1172628593796] Thread: Thread-1, Object: com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2121 ==> MQException constructor(cc, rc, source)() entry
10:09:53 [1172628593802] Thread: Thread-1, Object: com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2121 <== MQException constructor() exit
10:09:53 [1172628593803] Thread: Thread-1, Object: com.ibm.mq.MQQueueManager@24235e26 <== begin (via exception)() exit
10:09:53 [1172628593803] Thread: Thread-1, Object: com.ibm.mq.MQQueueManager@24235e26 <== begin() exit
10:09:53 [1172628593853] Thread: Thread-1, Object: com.ibm.mq.MQQueueManager@24235e26 ==> backout() entry
10:09:53 [1172628593853] Thread: Thread-1, Object: com.ibm.mq.server.MQSESSION@4f21de25 ==> MQBACK() entry
10:09:53 [1172628593854] Thread: MQBindingsQMThread0 ==> /build/j530_D/src/common/javabase/native2/mqi.c:55::_MQBACK() entry
10:09:53 [1172628593887] Thread: MQBindingsQMThread0 <== /build/j530_D/src/common/javabase/native2/mqi.c:64::_MQBACK() exit
10:09:53 [1172628593888] Thread: Thread-1, Object: com.ibm.mq.server.MQSESSION@4f21de25 <== MQBACK() exit
10:09:53 [1172628593888] Thread: Thread-1, Object: com.ibm.mq.MQQueueManager@24235e26 <== backout() exit
10:09:53 [1172628593889] Thread: Thread-1, Object: com.ibm.mq.XAtoJTA@37b9de25 ==> connectionClosed() entry
10:09:53 [1172628593926] Thread: Thread-1, Object: com.ibm.mq.XAtoJTA@37b9de25 event is: javax.sql.ConnectionEvent[source=oracle.jdbc.xa.client.OracleXAConnection@7ac89e26]
10:09:53 [1172628593926] Thread: Thread-1, Object: com.ibm.mq.XAtoJTA@37b9de25 ==> _deregisterResource() entry
10:09:53 [1172628593928] Thread: Thread-1, Object: com.ibm.mq.XAtoJTA@37b9de25 conn not assigned, checking spares
10:09:53 [1172628593928] Thread: Thread-1, Object: com.ibm.mq.XAtoJTA@37b9de25 found conn in spares list
10:09:53 [1172628593932] Thread: Thread-1, Object: com.ibm.mq.XAtoJTA@37b9de25 <== _deregisterResource() exit
10:09:53 [1172628593951] Thread: Thread-1, Object: com.ibm.mq.XAtoJTA@37b9de25 connectionErrorOccurred: javax.sql.ConnectionEvent[source=oracle.jdbc.xa.client.OracleXAConnection@7ac89e26]
10:09:53 [1172628593951] Thread: Thread-1, Object: com.ibm.mq.XAtoJTA@37b9de25 <== connectionClosed() exit
10:09:53 [1172628593952] Thread: Thread-1, Object: com.ibm.mq.MQQueueManager@24235e26 ==> disconnect() entry
10:09:53 [1172628593952] Thread: Thread-1, Object: com.ibm.mq.MQQueueManager@24235e26 ==> cleanup() entry
10:09:53 [1172628593953] Thread: Thread-1, Object: com.ibm.mq.MQQueueManager@24235e26 ==> close() entry
10:09:53 [1172628593953] Thread: Thread-1, Object: com.ibm.mq.server.MQSESSION@4f21de25 ==> MQCLOSE() entry
10:09:53 [1172628593954] Thread: MQBindingsQMThread0 ==> /build/j530_D/src/common/javabase/native2/mqi.c:82::_MQCLOSE() entry
10:09:53 [1172628593954] Thread: MQBindingsQMThread0 <== /build/j530_D/src/common/javabase/native2/mqi.c:95::_MQCLOSE() exit
10:09:53 [1172628593955] Thread: Thread-1, Object: com.ibm.mq.server.MQSESSION@4f21de25 <== MQCLOSE() exit
10:09:53 [1172628593955] Thread: Thread-1, Object: com.ibm.mq.MQQueueManager@24235e26 <== close() exit
10:09:53 [1172628593956] Thread: Thread-1, Object: com.ibm.mq.MQQueueManager@24235e26 <== cleanup() exit
10:09:53 [1172628593956] Thread: Thread-1, Object: com.ibm.mq.MQManagedConnectionJ11@49011e24 ==> fireConnectionClosedEvent() entry
10:09:53 [1172628593956] Thread: Thread-1, Object: com.ibm.mq.StoredManagedConnection@dee1e24 ==> connectionClosed() entry
10:09:53 [1172628593957] Thread: Thread-1, Object: com.ibm.mq.server.MQSESSION@4f21de25 ==> MQCMIT() entry
10:09:53 [1172628593958] Thread: MQBindingsQMThread0 ==> /build/j530_D/src/common/javabase/native2/mqi.c:110::_MQCMIT() entry
10:09:53 [1172628593959] Thread: MQBindingsQMThread0 <== /build/j530_D/src/common/javabase/native2/mqi.c:118::_MQCMIT() exit
10:09:53 [1172628593959] Thread: Thread-1, Object: com.ibm.mq.server.MQSESSION@4f21de25 <== MQCMIT() exit
10:09:53 [1172628593959] Thread: Thread-1, Object: com.ibm.mq.MQManagedConnectionJ11@49011e24 ==> cleanup()() entry
10:09:53 [1172628593960] Thread: Thread-1, Object: com.ibm.mq.server.MQSESSION@4f21de25 ==> MQBACK() entry
10:09:53 [1172628593960] Thread: MQBindingsQMThread0 ==> /build/j530_D/src/common/javabase/native2/mqi.c:55::_MQBACK() entry
10:09:53 [1172628593961] Thread: MQBindingsQMThread0 <== /build/j530_D/src/common/javabase/native2/mqi.c:64::_MQBACK() exit
10:09:53 [1172628593961] Thread: Thread-1, Object: com.ibm.mq.server.MQSESSION@4f21de25 <== MQBACK() exit
10:09:53 [1172628593962] Thread: Thread-1, Object: com.ibm.mq.MQManagedConnectionJ11@49011e24 <== cleanup() exit
10:09:53 [1172628593962] Thread: Thread-1, Object: com.ibm.mq.StoredManagedConnection@dee1e24 ==> quiesce() entry
10:09:53 [1172628593962] Thread: Thread-1, Object: com.ibm.mq.MQManagedConnectionJ11@49011e24 ==> removeMQConnectionEventListener() entry
10:09:53 [1172628593963] Thread: Thread-1, Object: com.ibm.mq.MQManagedConnectionJ11@49011e24 <== removeMQConnectionEventListener() exit
10:09:53 [1172628593963] Thread: Thread-1, Object: com.ibm.mq.MQManagedConnectionJ11@49011e24 ==> destroy() entry
10:09:53 [1172628593964] Thread: Thread-1, Object: com.ibm.mq.server.MQSESSION@4f21de25 ==> MQDISC() entry
10:09:53 [1172628593964] Thread: Thread-1, Object: com.ibm.mq.server.MQSESSION@4f21de25 Handle = 139333360
10:09:53 [1172628593965] Thread: MQBindingsQMThread0 ==> /build/j530_D/src/common/javabase/native2/mqi.c:134::_MQDISC() entry
10:09:53 [1172628593981] Thread: MQBindingsQMThread0 <== /build/j530_D/src/common/javabase/native2/mqi.c:147::_MQDISC() exit
10:09:53 [1172628593981] Thread: Thread-1, Object: com.ibm.mq.server.MQSESSION@4f21de25 MQDISC stopping worker thread
10:09:54 [1172628594019] Thread: Thread-1, Object: com.ibm.mq.server.MQSESSION@4f21de25 <== MQDISC() exit
10:09:54 [1172628594020] Thread: Thread-1, Object: com.ibm.mq.MQManagedConnectionJ11@49011e24 <== destroy() exit
10:09:54 [1172628594020] Thread: Thread-1, Object: com.ibm.mq.StoredManagedConnection@dee1e24 <== quiesce() exit
10:09:54 [1172628594020] Thread: Thread-1, Object: com.ibm.mq.StoredManagedConnection@dee1e24 <== connectionClosed() exit
10:09:54 [1172628594021] Thread: Thread-1, Object: com.ibm.mq.MQManagedConnectionJ11@49011e24 <== fireConnectionClosedEvent() exit
10:09:54 [1172628594021] Thread: Thread-1, Object: com.ibm.mq.MQQueueManager@24235e26 <== disconnect() exit |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Feb 27, 2007 7:45 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Did you follow the examples ? _________________ MQ & Broker admin |
|
Back to top |
|
 |
droopy |
Posted: Tue Feb 27, 2007 8:26 pm Post subject: |
|
|
Newbie
Joined: 27 Feb 2007 Posts: 4
|
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Feb 28, 2007 3:12 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Don't use (no CSD) of any version of MQ, particularly v5.3.
Don't use a client connection in an XA transaction unless you're using the Extended Transactional Client.  _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
droopy |
Posted: Wed Feb 28, 2007 8:24 pm Post subject: |
|
|
Newbie
Joined: 27 Feb 2007 Posts: 4
|
jefflowrey wrote: |
Don't use (no CSD) of any version of MQ, particularly v5.3.
Don't use a client connection in an XA transaction unless you're using the Extended Transactional Client.  |
I have installed CSD13 and Extended Transactional Client,
but I still get error 2121.
How to change my configuration and code? |
|
Back to top |
|
 |
droopy |
Posted: Thu Mar 01, 2007 1:05 am Post subject: |
|
|
Newbie
Joined: 27 Feb 2007 Posts: 4
|
http://www.mqseries.net/phpBB2/viewtopic.php?t=20959&highlight=2121
Quote: |
The switch library you have in the qm.ini file 'oraswit_9' isn't the one you want to use if you plan on using the JDBC/XA function.
Try the jdbcora one instead. This needs to be built - check the Using Java documentation for info on how to build this library.
There's a makefile in the java/lib/jdbc directory that will create this for you. |
Quote: |
VERY GREAT HELP FROM "MBW" !!!!
I always used the switch file which I generated in the /opt/mqm/samp/xatm path.
The correct path is : /opt/mqm/java/lib/jdbc
Thanks MBW and all the others |
Quote: |
JTA/JDBC coordination via WebSphere MQ base Java
Installation on other platforms
The switch file is supplied as an object file which you will need to link yourself using the supplied Makefile. This is required because certain libraries required by the switch library may be in different locations on different systems. Since the switch library is loaded by the queue manager which runs in a setuid environment, we cannot use the dynamic library path variable to locate these libraries. We therefore need to put the full path names to these libraries in the switch library itself.
The object files are called jdbcxxx.o where "xxx" indicates which database the object file is for. When linked, a switch file called jdbcxxx is produced, and this should be added to the qm.ini file in the same manner as the standard switch libraries.
To create the switch library, you need to go into the java/lib/jdbc subdirectory of your WebSphere MQ base Java installation and run make with your target database as a parameter. Currently supported targets for XA-JTA are "oracle" and "db2". For example:
make db2
The Makefiles are set up to link against the databases and JDKs in their standard installed location. The exception to this is Oracle, which can be installed anywhere on the system and therefore the makefile makes use of Oracle's ORACLE_HOME environment variable to link the library correctly. If your JDK is in a non-standard location, you can override the default directory with the JAVA_HOME definition:
make JAVA_HOME=/usr/my_jdk13 oracle
The above command should produce a switch file named "jdbcora", which is used in the same way as a standard switch library, including using the same XAOpenString. Therefore, if you have previously configured an XAResourceManager in your qm.ini you should replace the "SwitchFile" line with a reference to the new JTA specific switch file. If you have not previously used an XA switch file then refer to WebSphere MQ System Administration Guide for the details of configuring the XAResourceManager stanza for different databases, remembering to replace the standard switch file with the Java specific one.
Once the qm.ini has been updated, the queue manager will need to be restarted. Ensure that all appropriate database environment variables have been set before calling strmqm |
I found that my error is similar to the error of this link.
I can't find the directory: /opt/mqm/java/lib/jdbc.
Does this directory exist in IBM WebSphere MQ for Linux? |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|