Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-1725

Schemaname wrongly included in DBDictionary.checkNameLength after Tablename correctly truncated

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.2, 1.3.0, 2.0.0, 2.1.0
    • 2.1.1, 2.2.0
    • None
    • None
    • 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)

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mikedd Michael Dick
            roerch Joerg Knoche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment