I sent a mail on Friday regarding problems that I'm encountering
whenever I attempt to start a transaction using JDBC2 and the
Oracle thin driver. I'm no nearer solving my problem, just managing
to replace one exception with another. I have got rid of the
PLS-00201: identifer 'JAVA_XA.XA_START' must be declared exception.
However, that has just been replaced with
java.sql.SQLException: ORA-29532: Java call terminated by uncaught
Java exception: java.lang.NullPointerException
ORA-06512: at "SYSTEM.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)
....
instead. The code sample that throws the exception is
// Retrieve Oracle data source from JNDI
OracleXADataSource oxds = (OracleXADataSource)utility.getDataSource();
pc = oxds.getXAConnection();
conn = oxds.getConnection();
oxar1 = pc.getXAResource();
xid1 = createXid(1);
// Everything works fine up to this point
// This line of code then causes everything to give up
oxar1.start (xid1, XAResource.TMNOFLAGS);
This is example code taken from Oracle's programming guides!
I don't think it's my code here that's the problem, I'm thinking
that it's the installation, but I have no idea what. I've no knowledge
of Oracle, and our DBA doesn't know what the problem is either.
ANY help whatsoever would be appreciated as this is driving me nuts!
Thanks,
Aoife
This may be stating the obvious, but a quick look at your code
snippet suggests that the reference 'oxar1' is null - which means
that the method call "pc.getXAResource()" is returning null.
Perhaps you could check for this (with a simple 'if' statement
like: if (oxar1 == null)). Does the documentation mention
anything about the possibility that the method "getXAResource()"
may return null?
HTH,
Avi.
Thanks for the suggestion, but no go. My XA resource that I have
obtained is valid.
Ideas from anybody else?
Aoife
Sent via Deja.com http://www.deja.com/
Before you buy.