4 Replies Latest reply on Dec 21, 2002 6:34 PM by juhalindfors

    BMP entity beans with defined (compound) Primary Key Class

    donsfc

      Im using jboss-3.0.3 and have the following problem with BMP entity beans. When I try to define a custom PK class i get the following exception:

      java.lang.classcastexception : java.lang.Integer

      this occurs on the following line in ejbLoad()

      MyPK key = (MyPK)ctx.primaryKey();

      My PK implements Serializable and defines toString() and hashCode()

      My ejb-jar.xml file contains the line
      <prim-key-class>mypackage.myPK</prim-key-class>

      is there anything else that i am missing?

      The beans work fine with a primary key class of type Integer or String.