Discussions

EJB programming & troubleshooting: Error in ejbc for a BMP entity bean

  1. Error in ejbc for a BMP entity bean (1 messages)

    Hi,

    I am getting the following error while building the BMP entity bean.

    >>>ERROR: Error from ejbc: [9.2.8] In EJB CustomerManager, the home interface must define the findByPrimaryKey method.
    >>>ERROR: ejbc found errors

    I have declared the method findByPrimaryKey in the Home interface and defined it in the bean as follows.

    HOME INTERFACE
    --------------
       public Customer findByPrimaryKey(CustomerPK key) throws FinderException , RemoteException

    CUSTOMER BEAN
    -------------
       public CustomerPK ejbFindByPrimaryKey(CustomerPK key) throws FinderException , RemoteException
       {
             // If the key matches to the dtabase key
             return key;
       }

    Has anybody come across this kind of situation and what is the solution to this problem ?

    TIA,

    BIJAN
  2. Error in ejbc for a BMP entity bean[ Go to top ]

    take RemoteException off ejbFind..., that is only for remote declaration.

    Good luck,
    Jeff