OpenJPA
  1. OpenJPA
  2. OPENJPA-1725

Schemaname wrongly included in DBDictionary.checkNameLength after Tablename correctly truncated

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.2, 1.3.0, 2.0.0, 2.1.0
    • Fix Version/s: 2.1.1, 2.2.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      Linux, J2SE, OracleDB 10.2.0.1, JDBC drivers 10.2.0.1, 11.2.0.1, 10.2.0.4, OpenJPA versions as listed above

      Description

      While enhancing and mapping files for an Oracle database the tablenames are correctly truncated after 30 characters (or whatever I write as maxTableNameLenght in the DBDictionary), the check in DBDictionary.checkNameLength includes the name of the schema which is used, therefore exceeding and failing the check for 30 characters by (length of schemaname +1) (see exception below).

      Exception in thread "main" <openjpa-2.0.0-r422266:935683 nonfatal user error> org.apache.openjpa.util.UserException: Table name "TEST.LS_DETPOINT_WITH_ORIENTATIONDA" is 35-character long. The database allows maximum 30-character for a table name.
      [java] at org.apache.openjpa.jdbc.sql.DBDictionary.checkNameLength(DBDictionary.java:5215)
      [java] at org.apache.openjpa.jdbc.sql.DBDictionary.getCreateTableSQL(DBDictionary.java:3304)
      [java] at org.apache.openjpa.jdbc.sql.OracleDictionary.getCreateTableSQL(OracleDictionary.java:899)
      [java] at org.apache.openjpa.jdbc.schema.SchemaTool.createTable(SchemaTool.java:956)

        Issue Links

          Activity

          Joerg Knoche created issue -
          Donald Woods made changes -
          Field Original Value New Value
          Link This issue is related to OPENJPA-866 [ OPENJPA-866 ]
          Donald Woods made changes -
          Fix Version/s 1.3.0 [ 12313326 ]
          Fix Version/s 2.1.0 [ 12314542 ]
          Michael Dick made changes -
          Fix Version/s 2.2.0 [ 12315910 ]
          Fix Version/s 1.3.0 [ 12313326 ]
          Fix Version/s 2.1.0 [ 12314542 ]
          Michael Dick made changes -
          Assignee Michael Dick [ mikedd ]
          Michael Dick made changes -
          Fix Version/s 2.1.1 [ 12316191 ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          Michael Dick made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Milosz Tylenda made changes -
          Link This issue relates to OPENJPA-2038 [ OPENJPA-2038 ]

            People

            • Assignee:
              Michael Dick
              Reporter:
              Joerg Knoche
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development