ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » error while starting QManager for XA with Oracle

Post new topic  Reply to topic Goto page 1, 2  Next
 error while starting QManager for XA with Oracle « View previous topic :: View next topic » 
Author Message
balareddy
PostPosted: Tue Mar 07, 2006 1:34 am    Post subject: error while starting QManager for XA with Oracle Reply with quote

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
View user's profile Send private message AIM Address
mvic
PostPosted: Tue Mar 07, 2006 2:24 am    Post subject: Re: error while starting QManager for XA with Oracle Reply with quote

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
View user's profile Send private message
balareddy
PostPosted: Tue Mar 07, 2006 4:05 am    Post subject: Re: error while starting QManager for XA with Oracle Reply with quote

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
View user's profile Send private message AIM Address
mvic
PostPosted: Tue Mar 07, 2006 4:24 am    Post subject: Re: error while starting QManager for XA with Oracle Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

The XAOpenString looks incorrect.

Check out
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.amqzag.doc/oracfg.htm

Also please add necessary authorities to that view/table in the database. It's there in the instructions for a reason
Back to top
View user's profile Send private message
balareddy
PostPosted: Wed Mar 08, 2006 1:41 am    Post subject: Re: error while starting QManager for XA with Oracle Reply with quote

Acolyte

Joined: 06 Feb 2006
Posts: 54

mvic wrote:
The XAOpenString looks incorrect.

Check out
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.amqzag.doc/oracfg.htm

Also please add necessary authorities to that view/table in the database. It's there in the instructions for a reason



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
View user's profile Send private message AIM Address
balareddy
PostPosted: Wed Mar 08, 2006 1:56 am    Post subject: Re: error while starting QManager for XA with Oracle Reply with quote

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
View user's profile Send private message AIM Address
BenR
PostPosted: Wed Mar 08, 2006 2:44 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
mvic
PostPosted: Wed Mar 08, 2006 2:51 am    Post subject: Re: error while starting QManager for XA with Oracle Reply with quote

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
View user's profile Send private message
balareddy
PostPosted: Wed Mar 08, 2006 3:59 am    Post subject: Re: error while starting QManager for XA with Oracle Reply with quote

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
View user's profile Send private message AIM Address
BenR
PostPosted: Wed Mar 08, 2006 4:15 am    Post subject: Reply with quote

Acolyte

Joined: 31 Jan 2006
Posts: 60
Location: Hursley, UK

2121 indicates a problem with THREAD_AFFINITY or the XAOpenString
Back to top
View user's profile Send private message Visit poster's website
balareddy
PostPosted: Wed Mar 08, 2006 4:21 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
mvic
PostPosted: Wed Mar 08, 2006 4:24 am    Post subject: Re: error while starting QManager for XA with Oracle Reply with quote

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
View user's profile Send private message
balareddy
PostPosted: Wed Mar 08, 2006 4:33 am    Post subject: Re: error while starting QManager for XA with Oracle Reply with quote

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
View user's profile Send private message AIM Address
BenR
PostPosted: Wed Mar 08, 2006 4:35 am    Post subject: Reply with quote

Acolyte

Joined: 31 Jan 2006
Posts: 60
Location: Hursley, UK

is the switch file right?
Back to top
View user's profile Send private message Visit poster's website
balareddy
PostPosted: Wed Mar 08, 2006 4:51 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » IBM MQ Java / JMS » error while starting QManager for XA with Oracle
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.