• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting ORA-02067: transaction or savepoint rollback required

 
leksh nair
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 466
1
IntelliJ IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you provide exception trace also?
 
Mahesh D Kamath
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 3751
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 3751
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic