When using and Oracle database, the SQLHelper class throws an exception on line 404 because isAutoIncrement = resultSet.getString(23); fails.
I have tried this with ojdbc v4, 5 and 6.
While the code catches an exception and continues, it only catches a SQLException and a JDBCException is actually being thrown.
try {
isAutoIncrement = resultSet.getString(23);
}
catch(SQLException e){
if(logger.isDebugEnabled())
logger.debug("Could not retrieve the 'isAutoIncrement' property because not yet running on Java 1.5 - defaulting to NO. " +
"Table=" + tableName + ", Column=" +columnName, e);
// Ignore this one here
}
This should either be fixed for Oracle or change the Catch to be more generic.
Thanks
I have same issue with hibernate 4.1.9.Final and SqlServer.
Hibernates org.hibernate.exception.internal.SQLStateConversionDelegate throws SQLGrammarException, witch is not catched by code, listed in bug details.
Changed to catch Exception, as it appears different exceptions encountered here.
Available in next release after 2.4.9.