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

Exception is thrown during retrieval of an entity which contains a persistent collection of embeddable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.0, 1.2.1, 1.3.0, 2.0.0-M2
    • 1.2.1, 1.3.0, 2.0.0-M2
    • None
    • None

    Description

      When an entity contains a persistent collection of embeddables and the embeddable has a to-One relation in it, the following exception is thrown during retrieval of this entity:

      <openjpa-1.2.1-SNAPSHOT-r422266:712930M fatal general error> org.apache.openjpa.persistence.PersistenceException: org.apache.openjpa.persistence.jdbc.annotations.PColl_EntityA.embedCollection.org.apache.openjpa.persistence.jdbc.annotations.PColl_EntityB.m2oC
      at org.apache.openjpa.kernel.StateManagerImpl.setExtraFieldData(StateManagerImpl.java:721)
      at org.apache.openjpa.kernel.StateManagerImpl.setIntermediate(StateManagerImpl.java:698)
      at org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.loadEmbedded(RelationFieldStrategy.java:968)
      at org.apache.openjpa.jdbc.meta.strats.EmbedValueHandler.toObjectValue(EmbedValueHandler.java:165)
      at org.apache.openjpa.jdbc.meta.strats.ElementEmbedValueHandler.toObjectValue(ElementEmbedValueHandler.java:132)
      at org.apache.openjpa.jdbc.meta.strats.HandlerStrategies.loadObject(HandlerStrategies.java:202)
      at org.apache.openjpa.jdbc.meta.strats.HandlerCollectionTableFieldStrategy.loadElement(HandlerCollectionTableFieldStrategy.java:78)
      at org.apache.openjpa.jdbc.meta.strats.StoreCollectionFieldStrategy.load(StoreCollectionFieldStrategy.java:611)
      at org.apache.openjpa.jdbc.meta.FieldMapping.load(FieldMapping.java:819)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:626)
      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.beforeAccessField(StateManagerImpl.java:1493)

      Attachments

        1. openjpa-777.patch
          0.9 kB
          Fay Wang
        2. openjpa-777-testcase.patch
          15 kB
          Fay Wang

        Activity

          People

            mikedd Michael Dick
            faywang Fay Wang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: