-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Bug in SQLStateConversionDelegate for Oracle?
PostPosted: Thu May 31, 2012 7:44 am 
Newbie

Joined: Tue May 03, 2011 10:57 am
Posts: 4
Location: Bucharest, Romania
Hi,
I'm using an Oracle DB and getting the following contraint violation exception:
java.sql.SQLException: ORA-01407: cannot update ("STARS_SECURITY"."PRIVILEGE"."NAME") to NULL
with SQLState=72000 and vendorCode = 1407
Now, this reaches SQLStateConversionDelegate, where it wrongly interpreted as a MySQL specific exception:
// MySQL Query execution was interrupted
if ( "70100".equals( sqlState ) ||
// Oracle user requested cancel of current operation
"72000".equals( sqlState ) ) {
throw new QueryTimeoutException( message, sqlException, sql );
}
which leads to it being translated to a QueryTimeoutException.
Perhaps the SQLStateConversionDelegate should first look at the vendor code to be able to then interpret the SQLState correctly, based on that vendor.
For further reference, this is also consistent with the Oracle documentation:
http://docs.oracle.com/cd/E15817_01/app ... 8/appd.htm
Where 72000 is a "SQL execute phase errors".
I'm posting here and also on JIRA to track this (I could't find any open): https://hibernate.onjira.com/browse/HHH-7357
I'm using Hibernate 4.1.3.
Thanks.
Eugen.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.