Accessing an EJB1.1 entity with composite primary key result in JBAS014268

Solution Unverified - Updated -

Issue

  • Accessing an attribute on an EJB1.1 entity with a composite primary key results in the following error:

    ERROR [org.jboss.as.ejb3] (ServerService Thread Pool -- 61) JBAS014268: Failure in caller transaction.: javax.ejb.EJBException: JBAS018651: Internal error getting primary key field member firstId
        at org.jboss.as.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.getPrimaryKeyValue(JDBCAbstractCMPFieldBridge.java:240) [jboss-as-cmp-7.5.13.Final-redhat-2.jar:7.5.13.Final-redhat-2]
    ...
    Caused by: java.lang.IllegalArgumentException: Can not set java.math.BigDecimal field org.jboss.jbaesner.playground.ejb2.cmp.PlaygroundPK.firstId to org.jboss.jbaesner.playground.ejb2.cmp.PlaygroundPK
        at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167) [rt.jar:1.8.0_111-debug]
        at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171) [rt.jar:1.8.0_111-debug]
        at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:58) [rt.jar:1.8.0_111-debug]
        at sun.reflect.UnsafeObjectFieldAccessorImpl.get(UnsafeObjectFieldAccessorImpl.java:36) [rt.jar:1.8.0_111-debug]
        at java.lang.reflect.Field.get(Field.java:393) [rt.jar:1.8.0_111-debug]
        at org.jboss.as.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.getPrimaryKeyValue(JDBCAbstractCMPFieldBridge.java:233) [jboss-as-cmp-7.5.13.Final-redhat-2.jar:7.5.13.Final-redhat-2]
        ... 153 more
    

Environment

  • JBoss Enterprise Application Platform 6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content