posted 15 years ago
ClassCastException is thrown inside ejbLoad().
Occupation occupation= (Occupation)ctx.getPrimaryKey();
Occupation is primary key class(occupationId is an int field).
when i replaced Occupation with Integer, as below, no exception was thrown.
Integer id = (Integer)ctx.getPrimaryKey();
1.why getPrimaryKey() is not returning primary key class?
2.what getPrimaryKey() actually does?
have a great day,
krishna prasad