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.htmWhere 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.