Skip to Content
author's profile photo Former Member
Former Member

Error deploying Entity Bean

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 11, 2005 at 04:23 PM

    How is your primary key defined in the EJB?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 11, 2005 at 05:40 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.