On deployment of a CMP bean, I receive the following errors:

[Verifier] area_type: The primary key class must override equals().
[Verifier] area_type: The primary key class must override hashCode().

The primary key, area_typePK, is set as the prim-key-class:

<prim-key-class>com.mywds.beans.area_typePK</prim-key-class>

The area_typePK class has the following code:

  public int hashCode()
  {
    return id.intValue();
  }

  public boolean equals( Object obj )
  {

    if ( obj == null || !(obj instanceof area_typePK))
      return false;
    else if (((area_typePK)obj).id == id )
      return true;
    else
      return false;

  }


I have recompiled the code several times, it's in the right place, I've 
restarted JBoss and touched ejb-jar.xml file.  Each time the above error is 
shown.

It's probably one of those things the will be really obvious to others so 
please post any comments.

Thanks for your time,
Tim.

---------------------
It's not what you know, it's who you tell.

-----------------------
"Free text messages!!! Another 100% free service brought to you by the award winning 
Totalise"
Visit http://sms.totalise.net"
    



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to