File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Oracle/OAS and the fly likes getting ORA-02067: transaction or savepoint rollback required Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "getting ORA-02067: transaction or savepoint rollback required" Watch "getting ORA-02067: transaction or savepoint rollback required" New topic
Author

getting ORA-02067: transaction or savepoint rollback required

leksh nair
Greenhorn

Joined: Jan 03, 2010
Posts: 3
Hi
We are using datasource for db connections.most of the transactions do not fail but sometimes gives this error-->
ORA-02067 : transaction or savepoint rollback required

with no datasource configured, system doesnt error out anytime.
Pl help if anyone out there has faced such a problem..its urgent..
Vinod Tiwari
Ranch Hand

Joined: Feb 06, 2008
Posts: 459
    
    1
Can you provide exception trace also?


Vinod Tiwari | Twitter
Mahesh D Kamath
Greenhorn

Joined: Aug 08, 2011
Posts: 2
I am facing the same issue - SQLException while trying to call stored procedure
---------------------------------------------------
Product : Oracle Portal 10g

Issue Summary : A piece of code in our portal fails intermittently to fetch data by executing a stored procedure.

ERROR: SQLException
sqlE.getMessage() - ORA-02067: transaction or savepoint rollback required
sqlE.getSQLState() = 42000
sqlE.getErrorCode() - 2067
sqlE.getCause() - NULL


CODE DETAILS : This java method accepts a username as parameter to fetch user specific data (a menu) by executing the stored procedure.
JDBC connection is created against a datasource setup on portal.
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3606
    
  60

Welcome to the ranch, Manesh!

I've never seen this, but the description seems to indicate you might have a problem regarding a trigger or remote database. Do you use any triggers or database links in your application?
Mahesh D Kamath
Greenhorn

Joined: Aug 08, 2011
Posts: 2
Thanks Martin. I've tried Googling around this ORA error and all references suggests the issue to be related to remote database trigger and stuff.
However, in this case, the stored procedure is never reached. I'm able to establish the fact because, I have an exception block added to the procedure which logs all errors that happens in the block.
So, had it been an issue with the remote database or trigger, it should have been well caught in my stored procedure exception block.
Not sure if my statement makes sense.
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3606
    
  60

In any case, the description implies this need not be a bug in your code. This seems to be a kind of error that sometimes 'just happens' and you'll probably need to handle it gracefully, similarly to having to handle ORA-08177 when using Serializable isolation level. You could, for example, automatically restart the transaction when this error occurs - ie. in the catch block, inspect the exception, and if it was the ORA-02067 (sqlE.getErrorCode() == 2067), retry (probably limiting the retry count to a sensible number like 3 or 5).
 
Don't get me started about those stupid light bulbs.
 
subject: getting ORA-02067: transaction or savepoint rollback required
 
Similar Threads
Multiple updates
ORA-01086: savepoint never established
Mapping java collections as In parameters to Varrays
getting ORA-02067: transaction or savepoint rollback required
Query about rollback() method