Menu

#335 SQLHelper Oracle Issue

v2.4.*
closed-fixed
Bug (232)
2.5.0
5
2014-04-20
2012-11-15
No

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

Related

Bugs: #336

Discussion

  • Artem

    Artem - 2012-12-22

    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.

     
  • Jeff Jensen

    Jeff Jensen - 2014-04-20
    • status: open --> closed-fixed
    • assigned_to: matthias g --> Jeff Jensen
     
  • Jeff Jensen

    Jeff Jensen - 2014-04-20

    Changed to catch Exception, as it appears different exceptions encountered here.

    Available in next release after 2.4.9.

     
  • Jeff Jensen

    Jeff Jensen - 2014-04-20
    • Fixed Release: --> 2.5.0
     

Log in to post a comment.