aspose file tools*
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 Spring in Action this week in the Spring 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
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3710
    
    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