java.sql.SQLFeatureNotSupportedException: Unsupported feature

Spring JIRA | Tom Jahncke | 11 months ago
  1. 0

    This relates to: https://jira.spring.io/browse/SPR-11100 Using the oracle driver (ojdbc7 version 12.1.0.2.0) I ran across the following issue (I opened a support case with Oracle on the root cause of the issue. SR 3-11927085951) Normally the Oracle driver works fine with following code: {code} sqlTypeToUse = ps.getParameterMetaData().getParameterType(paramIndex); (from setNull in StatementCreatorUtils line 262) {code} However, it is possible for a statement to cause Oracle to throw an exception than then all statements going forward no longer use the JDBC 3.0 features to resolve the sql data type for null values. I understand why driversWithNoSupportForGetParameterType exists and how it helps performance. However, since it is black or white once an exception is thrown the setNull never tries to use the JDBC 3.0 features again (until the app is restarted). I can think of a few hackish ways to address this, but I am hoping you can come with a solid solution that is solid (My hackish ideas are along the lines or allowing a driver name to be injected that doesn't get added to the global set of drivers not supported.) FYI, just by having an insert statement with a qualified table name causes the following exception with the oracle JDBC driver. (Without qualification no exception.): {code} java.sql.SQLFeatureNotSupportedException: Unsupported feature at oracle.jdbc.driver.OracleParameterMetaData.checkValidIndex(OracleParameterMetaData.java:176) at oracle.jdbc.driver.OracleParameterMetaData.getParameterType(OracleParameterMetaData.java:327) at org.springframework.jdbc.core.StatementCreatorUtils.setNull(StatementCreatorUtils.java:262) {code}

    Spring JIRA | 11 months ago | Tom Jahncke
    java.sql.SQLFeatureNotSupportedException: Unsupported feature
  2. 0

    This relates to: https://jira.spring.io/browse/SPR-11100 Using the oracle driver (ojdbc7 version 12.1.0.2.0) I ran across the following issue (I opened a support case with Oracle on the root cause of the issue. SR 3-11927085951) Normally the Oracle driver works fine with following code: {code} sqlTypeToUse = ps.getParameterMetaData().getParameterType(paramIndex); (from setNull in StatementCreatorUtils line 262) {code} However, it is possible for a statement to cause Oracle to throw an exception than then all statements going forward no longer use the JDBC 3.0 features to resolve the sql data type for null values. I understand why driversWithNoSupportForGetParameterType exists and how it helps performance. However, since it is black or white once an exception is thrown the setNull never tries to use the JDBC 3.0 features again (until the app is restarted). I can think of a few hackish ways to address this, but I am hoping you can come with a solid solution that is solid (My hackish ideas are along the lines or allowing a driver name to be injected that doesn't get added to the global set of drivers not supported.) FYI, just by having an insert statement with a qualified table name causes the following exception with the oracle JDBC driver. (Without qualification no exception.): {code} java.sql.SQLFeatureNotSupportedException: Unsupported feature at oracle.jdbc.driver.OracleParameterMetaData.checkValidIndex(OracleParameterMetaData.java:176) at oracle.jdbc.driver.OracleParameterMetaData.getParameterType(OracleParameterMetaData.java:327) at org.springframework.jdbc.core.StatementCreatorUtils.setNull(StatementCreatorUtils.java:262) {code}

    Spring JIRA | 11 months ago | Tom Jahncke
    java.sql.SQLFeatureNotSupportedException: Unsupported feature
  3. 0

    How to define a custom DataStoreHelper in WebSphere 8.5 Liberty Profile

    Stack Overflow | 2 years ago | bobbel
    java.sql.SQLFeatureNotSupportedException: feature not supported
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    "feature not supported" error when executing a PreparedStatement in UCanAccess

    Stack Overflow | 3 months ago | Jeremy Crouch
    net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::3.0.6 feature not supported
  6. 0

    PreparedStatement TYPE_SCROLL_INSENSITIVE is broken

    hsqldb | 7 years ago | awallgren
    java.sql.SQLFeatureNotSupportedException: feature not supported

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.sql.SQLFeatureNotSupportedException

      Unsupported feature

      at oracle.jdbc.driver.OracleParameterMetaData.checkValidIndex()
    2. Oracle jdbc
      OracleParameterMetaData.getParameterType
      1. oracle.jdbc.driver.OracleParameterMetaData.checkValidIndex(OracleParameterMetaData.java:176)
      2. oracle.jdbc.driver.OracleParameterMetaData.getParameterType(OracleParameterMetaData.java:327)
      2 frames
    3. Spring Framework
      StatementCreatorUtils.setNull
      1. org.springframework.jdbc.core.StatementCreatorUtils.setNull(StatementCreatorUtils.java:262)
      1 frame