OpenJPA
  1. OpenJPA
  2. OPENJPA-679

java.lang.ArrayIndexOutOfBoundsException may occur when a relation field is annotated as a primary key and a foreign key

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.1, 1.3.0
    • Component/s: None
    • Labels:
      None

      Description

      <openjpa-1.2.0-SNAPSHOT-rexported nonfatal general error>
      org.apache.openjpa.persistence.PersistenceException: 0
      at
      org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:196)
      at
      org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:142)
      at
      org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:192)
      at
      org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:145)
      ....

      Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
      at
      org.apache.openjpa.jdbc.sql.DBDictionary.getForeignKeyConstraintSQL(DBDictionary.java:3373)
      at
      org.apache.openjpa.jdbc.sql.DBDictionary.getAddForeignKeySQL(DBDictionary.java:3252)
      at
      org.apache.openjpa.jdbc.schema.SchemaTool.addForeignKey(SchemaTool.java:1066)
      at org.apache.openjpa.jdbc.schema.SchemaTool.add(SchemaTool.java:604)
      at org.apache.openjpa.jdbc.schema.SchemaTool.add(SchemaTool.java:344)
      at org.apache.openjpa.jdbc.schema.SchemaTool.run(SchemaTool.java:321)
      at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:501)
      at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:453)
      at
      org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:159)
      at
      org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory.java:119)
      at
      org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:189)

      1. testcase_679.patch
        26 kB
        Fay Wang
      2. OPENJPA-679.patch
        3 kB
        Fay Wang
      3. openjpa_679.patch
        4 kB
        Fay Wang
      4. openjpa_679_1.patch
        4 kB
        Fay Wang
      5. identifying_rel_test.zip
        26 kB
        Catalina Wei

        Activity

          People

          • Assignee:
            Fay Wang
            Reporter:
            Fay Wang
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development