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

          There are no comments yet on this issue.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development