3 Replies Latest reply on Aug 3, 2003 5:41 AM by shanker

    Pl help me Compositekey object for cmp1.1

    shanker Newbie

      I am using cmp1.1. I am getting following error when i deploy the file. Please help me. thanks in advance.

      _2_0 date=200304110033)] Started in 41s:703ms
      10:27:37,953 INFO [MainDeployer] Starting deployment of package: file:/G:/uma/j
      boss/jboss-3.2.0_tomcat-4.1.24/server/default/deploy/pkemployee.ear
      10:27:38,015 INFO [EARDeployer] Init J2EE application: file:/G:/uma/jboss/jboss
      -3.2.0_tomcat-4.1.24/server/default/deploy/pkemployee.ear
      10:27:38,140 INFO [EJBDeployer] looking for nested deployments in : file:/G:/um
      a/jboss/jboss-3.2.0_tomcat-4.1.24/server/default/tmp/deploy/server/default/deplo
      y/pkemployee.ear/45.pkemployee.ear-contents/pkemployee.jar
      10:27:38,359 WARN [verifier] EJB spec violation:
      Bean : Employee1
      Section: 9.2.9
      Warning: The primary key class must override equals().

      10:27:38,484 ERROR [MainDeployer] could not create deployment: file:/G:/uma/jbos
      s/jboss-3.2.0_tomcat-4.1.24/server/default/tmp/deploy/server/default/deploy/pkem
      ployee.ear/45.pkemployee.ear-contents/pkemployee.jar
      org.jboss.deployment.DeploymentException: Verification of Enterprise Beans faile
      d, see above for error messages.
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:501)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:784)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:776)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:639)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at sun.reflect.GeneratedMethodAccessor37.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)

      MY equals FUNCTION IS LISTED BELOW

      public boolean equals(Object obj)
      {
      if (!(obj instanceof Employee1PK))
      {
      return false;
      }
      Employee1PK tempEmployee1PK = (Employee1PK) obj;
      if((tempEmployee1PK.getEmployeeId()== null)||(tempEmployee1PK.getEmployeeFirstName()== null))
      {
      return false;
      }
      if((tempEmployee1PK.getEmployeeId().equals(this.employeeId)) &&
      (tempEmployee1PK.getEmployeeFirstName().equals(this.employeeFirstName)))
      {
      return true;
      }
      else
      {
      return false;
      }
      }