SQLException: COMMIT is not allowed in a subordinate session
294561Jul 19 2003 — edited Jul 20 2003
My configuration:
1) IBM Websphere 5.0.2
2) database: Oracle9i release 2
3) Oracle JDBC DataSource, with XA enabled
4) driver class: oracle.jdbc.xa.client.OracleXADataSource
5) a servlet that uses JTA UserTransaction's
When I execute "DROP TABLE movies", the Oracle JDBC
driver throws a SQLException.
The exception message is
ORA-02089: COMMIT is not allowed in a subordinate session
Oracle's documentation says:
{{
ORA-02089: COMMIT is not allowed in a subordinate session
Cause: COMMIT was issued in a session that is not the two-phase commit global coordinator.
}}
The strange thing is that I my code does not issue a COMMIT
Also, I disabled autocommit by calling
setAutoCommit(false)
on the java.sql.Connection object.
Here is the stack trace:
[7/19/03 12:10:02:936 PDT] 587e316 SystemErr R strMsg = java.sql.SQLException: ORA-02089: COMMIT is not allowed in a subordinate session
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:579)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1894)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1094)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2132)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2015)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2877)
at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:925)
at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.execute(WSJdbcStatement.java:299)
at foobar.movie.MovieUtil.setupMovieTable(MovieUtil.java:66)