OpenJPA
  1. OpenJPA
  2. OPENJPA-1001

java.lang.IndexOutOfBoundsException when executing attached test case

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.1
    • Fix Version/s: 1.2.3, 1.3.0, 2.0.0-beta2
    • Component/s: jdbc
    • Labels:
      None
    • Environment:
      Can reproduce on Max OS X and Linux

      Description

      I am hitting the following exception when executing the given test case:

      Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
      at java.util.ArrayList.RangeCheck(ArrayList.java:546)
      at java.util.ArrayList.get(ArrayList.java:321)
      at org.apache.openjpa.jdbc.sql.SQLBuffer.setParameters(SQLBuffer.java:615)
      at org.apache.openjpa.jdbc.sql.SQLBuffer.prepareStatement(SQLBuffer.java:515)
      at org.apache.openjpa.jdbc.sql.SQLBuffer.prepareStatement(SQLBuffer.java:471)
      at org.apache.openjpa.jdbc.sql.SelectImpl.prepareStatement(SelectImpl.java:463)
      at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:379)
      at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:325)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.getInitializeStateResult(JDBCStoreManager.java:503)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:322)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:278)
      at org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:111)
      at org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57)
      at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:894)
      at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:852)
      ... 53 more
      <openjpa-1.2.1-rexported nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Index: 1, Size: 1
      at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:875)
      at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:774)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.find(JDBCStoreManager.java:951)
      at org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.load(RelationFieldStrategy.java:609)
      at org.apache.openjpa.jdbc.meta.FieldMapping.load(FieldMapping.java:819)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:688)
      at org.apache.openjpa.kernel.DelegatingStoreManager.load(DelegatingStoreManager.java:116)
      at org.apache.openjpa.kernel.ROPStoreManager.load(ROPStoreManager.java:78)
      at org.apache.openjpa.kernel.StateManagerImpl.loadFields(StateManagerImpl.java:2921)
      at org.apache.openjpa.kernel.StateManagerImpl.loadField(StateManagerImpl.java:2999)
      at org.apache.openjpa.kernel.StateManagerImpl.fetchObjectField(StateManagerImpl.java:2242)
      at org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.delete(RelationFieldStrategy.java:256)
      at org.apache.openjpa.jdbc.meta.FieldMapping.delete(FieldMapping.java:589)
      at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.delete(AbstractUpdateManager.java:238)
      at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.delete(AbstractUpdateManager.java:252)
      at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.populateRowManager(AbstractUpdateManager.java:143)
      at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:85)
      at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:72)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:717)
      at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:130)
      at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2010)
      at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1908)
      at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1679)
      at org.apache.openjpa.kernel.QueryImpl.isInMemory(QueryImpl.java:956)
      at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:796)
      at org.apache.openjpa.kernel.QueryImpl.deleteAll(QueryImpl.java:872)
      at org.apache.openjpa.kernel.QueryImpl.deleteAll(QueryImpl.java:868)
      at org.apache.openjpa.kernel.DelegatingQuery.deleteAll(DelegatingQuery.java:541)
      at org.apache.openjpa.persistence.QueryImpl.executeUpdate(QueryImpl.java:331)
      at org.apache.openjpa.persistence.test.PersistenceTestCase.clear(PersistenceTestCase.java:232)
      at org.apache.openjpa.persistence.test.PersistenceTestCase.clear(PersistenceTestCase.java:205)
      at org.apache.openjpa.persistence.test.SingleEMFTestCase.tearDown(SingleEMFTestCase.java:71)
      at junit.framework.TestCase.runBare(TestCase.java:130)

      ...

      1. IncompleteRelationshipChildEntity.java
        5 kB
        Richard Rak
      2. IncompleteRelationshipParentEntity.java
        5 kB
        Richard Rak
      3. IncompleteRelationshipSubclass.java
        1 kB
        Richard Rak
      4. OPENJPA-1001.patch
        21 kB
        B.J. Reed
      5. TestIncompleteRelationship.java
        3 kB
        Richard Rak

        Activity

        No work has yet been logged on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development