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

argument type mismatch error randomly occured

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Duplicate
    • Affects Version/s: 1.2.2, 1.2.3
    • Fix Version/s: None
    • Component/s: Enhance, jdbc, kernel
    • Labels:
      None
    • Environment:
      SLES 10
      JRE 6 U15
      Glassfish 2.1.1

      Description

      We are using an embedded class as Id :
      @Entity
      @Table(name = "GC5REQUESTLOG")
      @DataCache(enabled = false)
      public class RequestLogDA implements java.io.Serializable {

      // Fields
      @EmbeddedId
      @AttributeOverrides(

      { @AttributeOverride(name = "srvcLogID", column = @Column(name = "G5005ID")), @AttributeOverride(name = "srvcLogDate", column = @Column(name = "G5005DATE")), @AttributeOverride(name = "requestID", column = @Column(name = "G5008ID")) }

      )
      private RequestLogIdDA id;
      ....
      }
      @Embeddable
      public class ResponseLogIdDA implements java.io.Serializable {

      @Column(name = "G5005ID", nullable = false, precision = 12, scale = 0)
      private Long srvcLogID;

      @Column(name = "G5005DATE", nullable = false, length = 7)
      private Date srvcLogDate;

      @Column(name = "G5008ID", nullable = false, precision = 6, scale = 0)
      private Integer requestID;
      .....
      }

      sometimes we see following error in log files.
      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:696)
      at org.apache.openjpa.kernel.ObjectIdStateManager.setValue(ObjectIdStateManager.java:736)
      at org.apache.openjpa.kernel.ObjectIdStateManager.store(ObjectIdStateManager.java:507)
      at org.apache.openjpa.jdbc.meta.strats.EmbedValueHandler.toObjectValue(EmbedValueHandler.java:168)
      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:976)
      at org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:278)
      at org.apache.openjpa.jdbc.sql.SelectImpl$SelectResult.load(SelectImpl.java:2415)
      at org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:272)
      at org.apache.openjpa.jdbc.kernel.InstanceResultObjectProvider.getResultObject(InstanceResultObjectProvider.java:59)
      at org.apache.openjpa.lib.rop.EagerResultList.<init>(EagerResultList.java:36)
      at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1228)
      at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:990)
      at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:848)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              hmmahboobi@gmail.com hm
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: