Iam using Weblogic 5.1 appserver and iam trying to write
a simple container managed bean which gets the name from
database but when iam trying to deploy the bean it throws
an error saying findByPrimary() key method is not defined
any one knows the solution please respond soon..
my simple suggesstion is to i think you have to set classpath correctly and then compile all the files again including home,remote and implementation also and i also faced the same thing and solved this problem by adjusting path...hope you will do it..
i hope the example is from Ed Roman's Mastering EJB. I was able to deploy all the examples given in the book except the CMP and BMP Entity EJB's, it throws the error message 'findbyprimarykey' must be defined in the home inferface. I was able to deploy the examples shipped with the Weblogic server 5.1. If it is the problem with class path and so can tell me what setting need to be changed.
Would it be difficult to add this to your home interface:
public <your_ejb_remote_interface> findByPrimaryKey throws FinderException, RemoteException;
I'm pretty sure this is what the container is looking for...
Oops--that line should be like this:
public <your_ejb_remote_interface> findByPrimaryKey(<your_primary_key_class key) throws FinderException, RemoteException;
jason, i encountered the problem when i was trying to deploy the example given in Ed Roman's Mastering EJB Book. I tried out the syntax what u have given in the reply even then it is not working any more suggestions on this...
Problem is in deployement description in the line
<prim-key>...type....</prim-key>. Type need to be the type of the input parameter.