0 Replies Latest reply on Apr 23, 2003 4:53 PM by krishkumar

    deploying EntityBean

    krishkumar

      I am trying to deploy an EJB and I have created a hashCode method in my primary key class, Here is the source.

      package com.DS.EntityBean;

      import java.io.Serializable;

      /**
      * @author bthirnr
      *
      * To change this generated comment edit the template variable "typecomment":
      * Window>Preferences>Java>Templates.
      * To enable and disable the creation of type comments go to
      * Window>Preferences>Java>Code Generation.
      */
      public class AccountPK implements Serializable {

      public String accountID = null;

      AccountPK(String id) {
      this.accountID = id;
      }

      AccountPK() {
      }

      public String toString() {
      return accountID;
      }

      public int hashCode() {
      return accountID.hashCode();
      }

      public boolean equals ( Object account) {
      return ((AccountPK)account).accountID.equals(accountID);
      }
      }

      When I deploy I am getting following error. Can anyone help me.


      [ObjectName: jboss.j2ee:jndiName=Account,service=EJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: Could not find matching method for public native int java.lang.Object.hashCode()]