cancel
Showing results for 
Search instead for 
Did you mean: 

Error deploying Entity Bean

Former Member
0 Kudos

Hello All,

I am getting the following error when I try to deploy the EAR file with a BMP Entity Bean:

Cannot deploy application WorkOrderEAR.. Reason: Incorrect application WorkOrderEAR:Bean WorkOrderBean: The primary key class java.lang.Object is not a legal Value Type in RMI-IIOP.Bean WorkOrderBean: The primary key class java.lang.Object does not define method equals(java.lang.Object). The primary key class must provide suitable implementation of the equals(Object) method. EJB Specification 10.6.13.Bean WorkOrderBean: The primary key class java.lang.Object does not define method hashCode(). The primary key class must provide suitable implementation of the hashCode() method. EJB Specification 10.6.13.

When I remove the Entity Bean(from EAR), the EAR gets deployed without any errors.

What would be the reason for getting this error and what is the resolution?

Thanks,

Asheesh

Accepted Solutions (0)

Answers (2)

Answers (2)

Vlado
Advisor
Advisor
0 Kudos

Hi Asheesh,

In the ejb-jar.xml you have specified the primary key class of your BMP entity bean WorkOrderBean as java.lang.Object. This is not possible. java.lang.Object should be specified only for CMP entity beans with unknown primary key. Please specify the correct primary key class in the deployment descriptor - this should solve your problem.

Regards,

Vladimir

Former Member
0 Kudos

Hello Vladimir,

You are right. I had marked the primary key class as Java.lang.Object. Once I changed that the bean deployed without any issues.

Thanks.

Former Member
0 Kudos

How is your primary key defined in the EJB?