Browse Source

Workaround for Derby's limited support for JDBC 4.1 getObject(index, requiredType)

Issue: SPR-12157
pull/643/head
Juergen Hoeller 10 years ago
parent
commit
dedb04bd5c
  1. 4
      spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcUtils.java

4
spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcUtils.java

@ -25,6 +25,7 @@ import java.sql.Connection; @@ -25,6 +25,7 @@ import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLDataException;
import java.sql.SQLException;
import java.sql.SQLFeatureNotSupportedException;
import java.sql.Statement;
@ -196,6 +197,9 @@ public abstract class JdbcUtils { @@ -196,6 +197,9 @@ public abstract class JdbcUtils {
try {
return rs.getObject(index, requiredType);
}
catch (SQLDataException ex) {
logger.debug("JDBC driver has limited support for JDBC 4.1 'getObject(int, Class)' method", ex);
}
catch (SQLFeatureNotSupportedException ex) {
logger.debug("JDBC driver does not support JDBC 4.1 'getObject(int, Class)' method", ex);
}

Loading…
Cancel
Save