This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes java.sql.SQLException: ORA-01453: SET TRANSACTION must be first statement of transact Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "java.sql.SQLException: ORA-01453: SET TRANSACTION must be first statement of transact" Watch "java.sql.SQLException: ORA-01453: SET TRANSACTION must be first statement of transact" New topic
Author

java.sql.SQLException: ORA-01453: SET TRANSACTION must be first statement of transact

Sri Ram
Ranch Hand

Joined: Oct 03, 2005
Posts: 118
Hi Ranchers,

I am getting the Oracle Exception
java.sql.SQLException: ORA-01453: SET TRANSACTION must be first statement of transact
after we upgraded the Oracle version from Oracle 9.2.0.6 to Oracle 9.2.0.7.

Initially we had a Oracle Version 9.2.0.6 and the Application was working fine with it. Now the DBA has upgraded the version Oracle to 9.2.0.7 by applying a patch ("p4163445_92070_SOLARIS64").
After this upgrade, about 15 minutes after starting the service, i am getting this exception regularly.

I was thinking this could be a oracle parameter issue or a issue in Oracle 9.2.0.7. I will not be able to change the code since, the number of points i have to change is huge.

Please let me know how to solve this issue
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3700
    
    5

It sounds like a programatic error to me (possibly buried deep within your application). Do you have cases where you change the transaction level (for example: http://www.adp-gmbh.ch/ora/sql/set_transaction.html) in the middle of a transaction.

If you can figure out where this issue is you can either call commit before the transaction level is changed or remove the change in transaction level all together. My guess would to look for a case of shared code where someone is asking for a database connection without realizing that it has been used (without a commit). Usually, these are in nested calls.


My Blog: Down Home Country Coding with Scott Selikoff
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.sql.SQLException: ORA-01453: SET TRANSACTION must be first statement of transact
 
Similar Threads
SQLException encountered while executing the query - however, at random situations
Rolleback Exception in WASv3.5.2 Urgent.....
Missing IN or OUT parameter at Index:24 Exception after change in database version
Two phase commit problem
Exception when using CMP