Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-3707

Oracle JDBC driver can't handle entities with a one-character name in some cases

    Details

    • Type: Bug
    • Status: Verified (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 7.0.0.ER6
    • Fix Version/s: 7.1.0.DR13
    • Component/s: Hibernate
    • Labels:
      None
    • Target Release:
    • Affects:
      Release Notes
    • Release Notes Docs Status:
      Documented as Known Issue
    • Release Notes Text:
      Hide
      A bug was identified in Oracle JDBC driver 12.1.0.2 which causes an exception when trying to create a PreparedStatement for a table whose name contains only one character. This is an issue in the JDBC driver, was reported to Oracle and will be fixed in a later version of the driver. A workaround is to not use tables with only one character in their name, or to quote the name.
      Show
      A bug was identified in Oracle JDBC driver 12.1.0.2 which causes an exception when trying to create a PreparedStatement for a table whose name contains only one character. This is an issue in the JDBC driver, was reported to Oracle and will be fixed in a later version of the driver. A workaround is to not use tables with only one character in their name, or to quote the name.

      Description

      This is reproduced by running MultiCircleJpaCascadeIdentityTest or MultiCircleNonJpaCascadeIdentityTest or HbmWithIdentityTest on Oracle databases. Looks like the Oracle JDBC driver contains a bug:

              Caused by:
              java.sql.SQLException: Invalid argument(s) in call
                  at oracle.jdbc.driver.AutoKeyInfo.getTableName(AutoKeyInfo.java:345)
                  at oracle.jdbc.driver.T4CConnection.doDescribeTable(T4CConnection.java:4897)
                  at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:5702)
                  at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$3.doPrepare(StatementPreparerImpl.java:117)
                  at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:172)
                  ... 34 more
      

      This occurs when the driver is attempting to parse the table name from an INSERT query where the inserted table name contains just one character. If you rename the entities related to the two mentioned tests so that they will have more than one character, the tests will pass.

      Tested driver version: 12.1.0.2.0 (ojdbc7.jar)

      I suggest that we add a workaround for this in our TS (so the tests don't fail) and report this to Oracle.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jmartisk Jan Martiska
                  Reporter:
                  jmartisk Jan Martiska
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: