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 » Has anybody implemented 2-phse commit with Oracle?

Post new topic  Reply to topic
 Has anybody implemented 2-phse commit with Oracle? « View previous topic :: View next topic » 
Author Message
kamy
PostPosted: Mon Jul 08, 2002 10:45 am    Post subject: Has anybody implemented 2-phse commit with Oracle? Reply with quote

Novice

Joined: 26 Oct 2001
Posts: 21

Hi all,
I was wondering if anybody has implemented 2-phase commit
with MQSereies 5.2 ,
Oracle 8.1.7

I am running into a problem when I try to commit/rollback a txn..

My environment -
OS windows 2000
database Oracle 8.1.7
java 1.3.x using JDBC 2.0

there are 2 sets of error messages one thrown by the event log which goes like this ...


The XA resource manager TEST_XA_ORACLE has returned an unexpected return code -3, when called for xa_start.

MQSeries received an unexpected return code when calling XA resource manager TEST_XA_ORACLE at its xa_start entry point. This indicates an internal error, either within MQSeries or the resource manager.

Try to determine the source of the error. A trace of the failure could be used to look at the XA flows between MQSeries and the resource manager. MQSeries 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'4D514D00120000000400000035B3293D12400000544553545F58415F514D00000001'. 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

Event Type: Error
Event Source: MQSeries
Event Category: None
Event ID: 6177
Date: 7/8/2002
Time: 11:47:54 AM
User: N/A
Computer: NJHREAI1
Description:
An internal MQSeries error has occurred.

An error has been detected, and the MQSeries error recording routine has been called.

Details of the error have been stored at C:\Program Files\IBM\MQSeries\errors\AMQ02324.0.FDC. A synopsis is given in the data section below. Use the standard facilities supplied with your system to record the problem identifier, and to save the generated output files. Contact your IBM support center. Do not discard these files until the problem has been resolved.


and the error thrown by the Java adapter aplication is as shown below..


java Q2DBXAORACLE.propertiesjava.io.BufferedInputStream@49b6ddfc
getAdapter started...
Browsed message: <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?><DMLLIST><DML>insert into sys.emp values('221','roshni')</DML><DML>insert into sys.emp values('222','shivani')</DML><DML>insert into sys.emp values('223','nikita')</DML></DMLLIST>
java.sql.SQLException: ORA-06550: line 1, column 13:
PLS-00201: identifier 'JAVA_XA.XA_START_NEW' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1446)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1371)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1900)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:363)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:407)
at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:171)
at com.ibm.mq.XAtoJTA.xa_start(XAtoJTA.java:864)
at com.ibm.mq.XAtoJTA.XAStart(XAtoJTA.java:577)
at com.ibm.mq.server.MQSESSION._MQBEGIN(Native Method)
at com.ibm.mq.server.MQSESSION._MQBEGINWrapper(MQSESSION.java:827)
at com.ibm.mq.server.MQThread.run(MQThread.java:1430)
at java.lang.Thread.run(Thread.java:498)
Unable to load message catalog - mqji
MQ exception: CC = 2 RC = 2195
An MQ error occurred: 2 2009
mqdb2log finished...


Any help /tricks would be deeply appreciated

- Kamy
Back to top
View user's profile Send private message Send e-mail
pcrparimi
PostPosted: Wed Jul 24, 2002 5:41 am    Post subject: Reply with quote

Apprentice

Joined: 09 Oct 2001
Posts: 43
Location: NY

Hi kamy,

I implemented 2-Phase commit with Oracle 8.1.7, jdbcora.dll from ma88, on Win 2k with MQ as transaction coordinater. Please find the fallowing setup.

Oracle:

Check whether JSERVER option is installed on Oracle DB. If not install from Database Configuration Assistant.

According to the JDBC Developer's Guide and Reference, Distributed
Transactions (XA) require that the JServer be initialized.

MQ Queue Manager:
Give the fallowing entries in Resource tab.

switchFile : [location]\jdbcora.dll

XAOpenString : Oracle_XA+Acc=p/userid/password+SesTm=200+DB=Temp

XACloseString :

ThreadOfControl : PROCESS

Sample Java pgm


qMgr = new MQQueueManager("TEST");

oracle.jdbc.xa.client.OracleXADataSource ds = new Oracle.jdbc.xa.client.OracleXADataSource();
ds.setUser("scott");
ds.setPassword("tiger");
ds.setURL("jdbc:oracle:thin:@192.36.13.101:1521:Temp");

Connection con = qMgr.getJDBCConnection((javax.sql.XADataSource)ds);

qMgr.begin();

openQueue();
putMessage();

pStmnt = con.prepareStatement("INSERT INTO TCMIT VALUES('Hello1')");

pStmnt.executeUpdate();


qMgr.commit();

Hope this could help you.
I got exactly the same error what you have reported. Later i have installed Jserver on Oracle DB and problem got resolved.

cheers,
Poornachandra Parimi.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kamy
PostPosted: Wed Jul 24, 2002 8:25 am    Post subject: Reply with quote

Novice

Joined: 26 Oct 2001
Posts: 21

Thanks..
The database was on solaris, and the DBA had to run initjvm.sql
Back to top
View user's profile Send private message Send e-mail
murali_bestha
PostPosted: Sun Feb 15, 2004 9:51 pm    Post subject: Reply with quote

Novice

Joined: 12 Feb 2004
Posts: 17

Hi,

Please help me. We have the same requirement of two phase commit. I am unable to start the Queue Manager after registering the database resource.

My enironment is:

Java version "1.4.2_01"
MQ_JAVA_INSTALL_PATH=C:\IBM\Websphere MQ
OS: Windows 2000 Pro
Websphere MQ: version5.3
Oracle 9i

Once I register the resource and restart the Q Manager, the following error occurs.

-------------------------------------------------------------------------------
2004/02/13 10:34:10
AMQ6174: The library C:\IBM\WebSphere MQ\bin\jdbcora.DLL was not found. The queue manager will continue without this module.

EXPLANATION:
The dynamically loadable file C:\IBM\WebSphere MQ\bin\jdbcora.DLL was not found.
ACTION:
Check that the file exists and is either fully qualified or is in the
appropriate directory.
-------------------------------------------------------------------------------
11/29/01 17:42:39
AMQ7622: MQSeries could not load the XA switch load file for resource manager 'OracleXADB'.

EXPLANATION:
An error has occurred loading XA switch file C:\IBM\WebSphere MQ\bin\jdbcora.DLL. If the error occurred during startup
then the queue manager will terminate. At all other times the queue manager will continue without this resource manager meaning that it will no longer be able to participate in global transactions. The queue manager will also retry the load of the switch file at regular intervals so that the resource manager will be able to participate again should the load problem be resolved.
ACTION:
Look for a previous message outlining the reason for the load failure. Message AMQ6175 is issued if the load failed because of a system error. If this is the case then follow the guidance given in message AMQ6175 to resolve the problem.
In the absence of prior messages or FFST information related to this problem check that the name of the switch load file is correct and that it is present in a directory from which it can be dynamically loaded by the queue manager. The easiest method of doing this is to define the switch load file as a fully-qualified name. Note that if the queue manager is still running it will need to be restarted in order that any changes made to its configuration data can be picked up.
-------------------------------------------------------------------------------

I have put the jdbcora.dll and jvm.dll in the C:\IBM\Websphere MQ\bin and added this into both PATH and CLASSPATH. I put the j2ee.jar in the classpath. But still it fails. Please help me in this regard, as this is little urgent.

Thanks and Regards
Murali

pcrparimi wrote:
Hi kamy,

I implemented 2-Phase commit with Oracle 8.1.7, jdbcora.dll from ma88, on Win 2k with MQ as transaction coordinater. Please find the fallowing setup.

Oracle:

Check whether JSERVER option is installed on Oracle DB. If not install from Database Configuration Assistant.

According to the JDBC Developer's Guide and Reference, Distributed
Transactions (XA) require that the JServer be initialized.

MQ Queue Manager:
Give the fallowing entries in Resource tab.

switchFile : [location]\jdbcora.dll

XAOpenString : Oracle_XA+Acc=p/userid/password+SesTm=200+DB=Temp

XACloseString :

ThreadOfControl : PROCESS

Sample Java pgm


qMgr = new MQQueueManager("TEST");

oracle.jdbc.xa.client.OracleXADataSource ds = new Oracle.jdbc.xa.client.OracleXADataSource();
ds.setUser("scott");
ds.setPassword("tiger");
ds.setURL("jdbc:oracle:thin:@192.36.13.101:1521:Temp");

Connection con = qMgr.getJDBCConnection((javax.sql.XADataSource)ds);

qMgr.begin();

openQueue();
putMessage();

pStmnt = con.prepareStatement("INSERT INTO TCMIT VALUES('Hello1')");

pStmnt.executeUpdate();


qMgr.commit();

Hope this could help you.
I got exactly the same error what you have reported. Later i have installed Jserver on Oracle DB and problem got resolved.

cheers,
Poornachandra Parimi.
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Has anybody implemented 2-phse commit 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.