Author |
Message
|
balareddy |
Posted: Tue Mar 07, 2006 1:34 am Post subject: error while starting QManager for XA with Oracle |
|
|
Acolyte
Joined: 06 Feb 2006 Posts: 54
|
Hi,
i am trying to implement XA for MQ classes for Java. I am trying in AIX5.2. when i tried to start QueueManager, i am getting this error in MQ logs.
AMQ7605: The XA resource manager OracleDB has returned an unexpected return
code -5, when called for xa_open.
EXPLANATION:
WebSphere MQ received an unexpected return code when calling XA resource
manager OracleDB at its xa_open entry point. This indicates an internal error,
either within MQ or the resource manager.
ACTION:
Try to determine the source of the error. A trace of the failure could be used
to look at the XA flows between MQ and the resource manager. MQ has allocated
an RMId of 1 to this resource manager. This will be useful when isolating the
flows associated with the resource manager concerned. If the error occurs on an
xa_commit or xa_rollback request, the queue manager will not attempt to
redeliver the commit or rollback instruction for this transaction, until after
the queue manager has been restarted. The transaction indoubt is identified by
the following XID of X''. If you think that the error lies within the queue
manager, contact your IBM support center. Do not discard any information
describing the problem until after the problem has been resolved.
----- amqtmrma.c : 360 ----------------------------------------------------
Pls help me out in this.... _________________ bala |
|
Back to top |
|
 |
mvic |
Posted: Tue Mar 07, 2006 2:24 am Post subject: Re: error while starting QManager for XA with Oracle |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
balareddy wrote: |
AMQ7605: The XA resource manager OracleDB has returned an unexpected return
code -5, when called for xa_open. |
Almost certainly you've supplied incorrect user/password details in the XAOpenString, or there is some other error on that string. |
|
Back to top |
|
 |
balareddy |
Posted: Tue Mar 07, 2006 4:05 am Post subject: Re: error while starting QManager for XA with Oracle |
|
|
Acolyte
Joined: 06 Feb 2006 Posts: 54
|
mvic wrote: |
balareddy wrote: |
AMQ7605: The XA resource manager OracleDB has returned an unexpected return
code -5, when called for xa_open. |
Almost certainly you've supplied incorrect user/password details in the XAOpenString, or there is some other error on that string. |
I added the following etry in qm.ini and created jdbcora file
XAResourceManager:
Name=OracleDB
SwitchFile=jdbcora
XAOpenString=+Acc=P/BCSFTP/BCSFTP+SesTm=35+DB=BCSFTP+LogDir=/var/db/bcsftp/XA-QM.log
ThreadOfControl=THREAD
and i executed initxa.sql and initjvm.sql in Database server.
only thing i did not execute is <GRANT SELECT ON DBA_PENDING_TRANSACTIONS TO USERNAME>
is this cause to that problem??? _________________ bala |
|
Back to top |
|
 |
mvic |
Posted: Tue Mar 07, 2006 4:24 am Post subject: Re: error while starting QManager for XA with Oracle |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
|
Back to top |
|
 |
balareddy |
Posted: Wed Mar 08, 2006 1:41 am Post subject: Re: error while starting QManager for XA with Oracle |
|
|
Acolyte
Joined: 06 Feb 2006 Posts: 54
|
Thanks for reply.
I have done changes. now my QM started. I am getting error while i trid to execute the XAExample code.
Initializing queue manager and database connection
MQJE001: Completion Code 2, Reason 2035
**FAILURE** Queue Manager initialization failed with the following exception:
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2035
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:469)
at XAExample.initialize(XAExample.java:99)
at XAExample.main(XAExample.java:4
in properties if i put the following entry, it gives compilation error
properties.put(MQC.THREAD_AFFINITY_PROPERTY, new Boolean(true));
MQC.THREAD_AFFINITY_PROPERTY not found.. So i removed this property and tried.
Please suggest me what options i have to set.
I am trying in AIX5.2 with MQ5.3 _________________ bala |
|
Back to top |
|
 |
balareddy |
Posted: Wed Mar 08, 2006 1:56 am Post subject: Re: error while starting QManager for XA with Oracle |
|
|
Acolyte
Joined: 06 Feb 2006 Posts: 54
|
the problem is the user doent have rights.
I tried with proper User. now i am getting the following error
Failed to load native methods library for MQ XA support.
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/mqm/java/lib/libMQXAi02.so: load ENOENT on shared library(s) /usr/mqm/java/lib/libMQXAi02.so libmqjbnd05.so
Pls help me what to do.......... _________________ bala |
|
Back to top |
|
 |
BenR |
Posted: Wed Mar 08, 2006 2:44 am Post subject: |
|
|
Acolyte
Joined: 31 Jan 2006 Posts: 60 Location: Hursley, UK
|
For MQ v5.3 you need MQC.THREAD_AFFINITY. In MQ v6, MQC.THREAD_AFFINITY was deprecated and replaced with MQC.THREAD_AFFINITY_PROPERTY to be consistent with other _PROPERTY names.
It is essential for XA - if you leave it out, you will get a NO_EXTERNAL_PARTICIPANTS error at runtime. |
|
Back to top |
|
 |
mvic |
Posted: Wed Mar 08, 2006 2:51 am Post subject: Re: error while starting QManager for XA with Oracle |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
balareddy wrote: |
java.lang.UnsatisfiedLinkError: /usr/mqm/java/lib/libMQXAi02.so: load ENOENT on shared library(s) /usr/mqm/java/lib/libMQXAi02.so libmqjbnd05.so |
What is your LD_LIBRARY_PATH ? |
|
Back to top |
|
 |
balareddy |
Posted: Wed Mar 08, 2006 3:59 am Post subject: Re: error while starting QManager for XA with Oracle |
|
|
Acolyte
Joined: 06 Feb 2006 Posts: 54
|
thanks,
I set LD_LIBRARY_PATH and it resolved that issue. now another problem i am geeting while Transaction begin()
MQJE001: Completion Code 2, Reason 2121
**FAILURE** the application will backout due to the exception:
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2121
at com.ibm.mq.MQQueueManager.begin(MQQueueManager.java:1144)
Pls help me out... _________________ bala |
|
Back to top |
|
 |
BenR |
Posted: Wed Mar 08, 2006 4:15 am Post subject: |
|
|
Acolyte
Joined: 31 Jan 2006 Posts: 60 Location: Hursley, UK
|
2121 indicates a problem with THREAD_AFFINITY or the XAOpenString |
|
Back to top |
|
 |
balareddy |
Posted: Wed Mar 08, 2006 4:21 am Post subject: |
|
|
Acolyte
Joined: 06 Feb 2006 Posts: 54
|
BenR wrote: |
2121 indicates a problem with THREAD_AFFINITY or the XAOpenString |
entry in qm.ini
XAResourceManager:
Name=BCSFTP
SwitchFile=oraswit XAOpenString=ORACLE_XA+DB=BCSFTP+SqlNet=BCSFTP+ACC=P/BCSRUN/BCSRUN+SesTM=10+threads=true+LogDir=/var/db/bcsftp
ThreadOfControl=THREAD
THREAD_AFFINITY in my program:
properties.put(MQC.THREAD_AFFINITY, new Boolean(true));
_________________ bala |
|
Back to top |
|
 |
mvic |
Posted: Wed Mar 08, 2006 4:24 am Post subject: Re: error while starting QManager for XA with Oracle |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
Code: |
C:\> mqrc 2121
2121 0x00000849 MQRC_NO_EXTERNAL_PARTICIPANTS |
Your attempt to call qmgr.begin() is failing because the queue manager thinks it has no 3rd party resources to coordinate. Did you comment out the XAResourceManager stanza?
On a separate point, did you add +threads=true to the XAOpenString to match the ThreadOfControl=THREAD setting?
It may help if you post again your XAResourceManager stanza. (Please also consider obscuring the username and password that appear in that string, to avoid publishing sensitive details to the world ).
EDIT: Oops, composed this post at the same time you posted yours. My questions appear to have been answered. Here's a new one: did any .FDC files or error log entries appear from the latest attempt to call MQBEGIN? If so, please post details. |
|
Back to top |
|
 |
balareddy |
Posted: Wed Mar 08, 2006 4:33 am Post subject: Re: error while starting QManager for XA with Oracle |
|
|
Acolyte
Joined: 06 Feb 2006 Posts: 54
|
mvic wrote: |
It may help if you post again your XAResourceManager stanza. (Please also consider obscuring the username and password that appear in that string, to avoid publishing sensitive details to the world ). |
here is my XAResourceManager
XAResourceManager:
Name=testdb
SwitchFile=oraswit
XAOpenString=ORACLE_XA+DB=TEST+SqlNet=TEST+ACC=P/Testuser/Testpwd+SesTM=10+threads=true+LogDir=/var/db/bcsftp
ThreadOfControl=THREAD
_________________ bala |
|
Back to top |
|
 |
BenR |
Posted: Wed Mar 08, 2006 4:35 am Post subject: |
|
|
Acolyte
Joined: 31 Jan 2006 Posts: 60 Location: Hursley, UK
|
is the switch file right? |
|
Back to top |
|
 |
balareddy |
Posted: Wed Mar 08, 2006 4:51 am Post subject: |
|
|
Acolyte
Joined: 06 Feb 2006 Posts: 54
|
BenR wrote: |
is the switch file right? |
switch files are correct..
Actually i tried with 2 switch files.
1) make oracle
switch file : jdbcora
2) by using xaswit.mak file
make -f xaswit.mak oraswit
I tried with oraswit in qm.ini, i got this error
Beginning transaction
MQJE001: Completion Code 2, Reason 2121
**FAILURE** the application will backout due to the exception:
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2121
at com.ibm.mq.MQQueueManager.begin(MQQueueManager.java:1144)
i tried with jdbcora, i got this error
Beginning transaction
java.io.NotSerializableException: com.ibm.mq.MQXid
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1083)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:307)
at oracle.jdbc.oracore.Util.serializeObject(Util.java:348)
at oracle.jdbc.xa.client.OracleXAResource.getSerializedBytes(OracleXAResource.java:449)
at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:96)
at com.ibm.mq.XAtoJTA.xa_start(XAtoJTA.java:871)
at com.ibm.mq.XAtoJTA.XAStart(XAtoJTA.java:584)
at com.ibm.mq.server.MQSESSION._MQBEGIN(Native Method)
at com.ibm.mq.server.MQSESSION._MQBEGINWrapper(MQSESSION.java:1118)
at com.ibm.mq.server.MQThread.run(MQThread.java:1432)
at java.lang.Thread.run(Thread.java:568)
java.sql.SQLException: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException
ORA-06512: at "SYS.JAVA_XA", line 0
ORA-06512: at line 1
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:542)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1311)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:738)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1313)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1232)
at oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStatement.java:1353)
at oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java:1760)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1805)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:322)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:366)
at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:102)
at com.ibm.mq.XAtoJTA.xa_start(XAtoJTA.java:871)
at com.ibm.mq.XAtoJTA.XAStart(XAtoJTA.java:584)
at com.ibm.mq.server.MQSESSION._MQBEGIN(Native Method)
at com.ibm.mq.server.MQSESSION._MQBEGINWrapper(MQSESSION.java:1118)
at com.ibm.mq.server.MQThread.run(MQThread.java:1432)
at java.lang.Thread.run(Thread.java:568)
MQJE001: Completion Code 2, Reason 2195
**FAILURE** the application will backout due to the exception:
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2195
at com.ibm.mq.MQQueueManager.begin(MQQueueManager.java:1144)
at XAExample.runTransaction(XAExample.java:148)
at XAExample.main(XAExample.java:51)
MQJE001: Completion Code 2, Reason 2009
**WARNING** attempt to backout failed with exception:
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2009
at com.ibm.mq.MQQueueManager.backout(MQQueueManager.java:1096)
at XAExample.runTransaction(XAExample.java:186)
at XAExample.main(XAExample.java:51)
Disconnecting resources
MQJE001: Completion Code 2, Reason 2009
MQJE001: Completion Code 2, Reason 2009
**WARNING** attempt to disconnect failed with exception:
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2009
at com.ibm.mq.StoredManagedConnection.connectionClosed(StoredManagedConnection.java:258)
at com.ibm.mq.MQManagedConnectionJ11.fireConnectionClosedEvent(MQManagedConnectionJ11.java:713)
at com.ibm.mq.MQQueueManager.disconnect(MQQueueManager.java:1009)
at XAExample.runTransaction(XAExample.java:201)
at XAExample.main(XAExample.java:51)
Complete!
_________________ bala |
|
Back to top |
|
 |
|