problem in ejbc


EJB programming & troubleshooting: problem in ejbc

  1. problem in ejbc (1 messages)

    hi everybody,
                 i written a bmp bean.ejbc is giving problem while generating final jar file.following error it is showing.
    error from ejbc: [9.2.8] In EJB gatewaybean,the home interface must define the findByPrimaryKey method.
    error: ejbc found errors
    i will send my home interface

    import javax.ejb.*;
    import java.rmi.*;

    public interface GatewayHome extends EJBHome {

    public Gateway create (int kbussid, String sgatewayname, String sversion,String sfilename,int kpublish,String suserid, int kstatus )
      throws CreateException, RemoteException;

    public Gateway findByPrimaryKey (GatewayPK key) throws FinderException, RemoteException;

    // Gateway findByBusinessid(GatewayPK key ) throws FinderException,RemoteException;
    my GatewayPK program

    public class GatewayPK implements {

    public int kid;

    public GatewayPK(){ }

    public GatewayPK(int value) {

    kid = value;

    public boolean equals(Object obj) {
    if(obj == null || !(obj instanceof GatewayPK))
    return false;
    else if(((GatewayPK)obj).kid == kid)
    return true;
    return false;

    public long hashCode() {
    return kid;

    public String toString() {
    return String.valueOf(kid);

    could anybody helps regarding this i will appreciate

    thanks in advance.
  2. problem in ejbc[ Go to top ]

    Hai, i hope u are running build command from DOS prompt. Am i right. Why dont u try to create the jar file using "Ejb deployer tool". Hope it wont show this problem. Actually i too faced this problem, but now i forget how i get solved it. I am sorry to say this. But still, u try from Ejb-deployer tool"
    Best regards