OpenJPA
  1. OpenJPA
  2. OPENJPA-1204

Argument type mismatch when an EmbeddedId contains an Emun type

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0-M3
    • Component/s: jdbc
    • Labels:
      None

      Description

      Caused by: java.lang.IllegalArgumentException: argument type mismatch
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.openjpa.enhance.Reflection.set(Reflection.java:761)
      at org.apache.openjpa.kernel.ObjectIdStateManager.setValue(ObjectIdStateManager.java:741)
      at org.apache.openjpa.kernel.ObjectIdStateManager.store(ObjectIdStateManager.java:508)
      at org.apache.openjpa.jdbc.meta.strats.EmbedValueHandler.toObjectValue1(EmbedValueHandler.java:254)
      at org.apache.openjpa.jdbc.meta.strats.EmbedValueHandler.toObjectValue(EmbedValueHandler.java:202)
      at org.apache.openjpa.jdbc.meta.strats.ObjectIdValueHandler.toObjectValue(ObjectIdValueHandler.java:77)
      at org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy.getPrimaryKeyValue(HandlerFieldStrategy.java:330)
      at org.apache.openjpa.jdbc.meta.ClassMapping.getObjectId(ClassMapping.java:188)
      at org.apache.openjpa.jdbc.meta.ClassMapping.getObjectId(ClassMapping.java:147)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:934)
      at org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:280)
      at org.apache.openjpa.jdbc.sql.SelectImpl$SelectResult.load(SelectImpl.java:2349)
      at org.apache.openjpa.jdbc.meta.strats.RelationToManyInverseKeyFieldStrategy.loadElement(RelationToManyInverseKeyFieldStrategy.java:87)
      at org.apache.openjpa.jdbc.meta.strats.RelationCollectionInverseKeyFieldStrategy.loadElement(RelationCollectionInverseKeyFieldStrategy.java:76)
      at org.apache.openjpa.jdbc.meta.strats.StoreCollectionFieldStrategy.load(StoreCollectionFieldStrategy.java:555)
      at org.apache.openjpa.jdbc.meta.FieldMapping.load(FieldMapping.java:919)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:641)
      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:3035)
      at org.apache.openjpa.kernel.StateManagerImpl.load(StateManagerImpl.java:451)
      at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:971)

      1. patch.txt
        12 kB
        Fay Wang

        Activity

        Fay Wang created issue -
        Fay Wang made changes -
        Field Original Value New Value
        Attachment patch.txt [ 12414851 ]
        Fay Wang made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Fay Wang made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Donald Woods made changes -
        Fix Version/s 2.0.0-M3 [ 12314148 ]
        Fix Version/s 2.0.0 [ 12314019 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development