Discussions

EJB programming & troubleshooting: Can not deploy container managed bean

  1. Can not deploy container managed bean (6 messages)

    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
    in Home.

    any one knows the solution please respond soon..

    thanks
    Tom

    Threaded Messages (6)

  2. Can not deploy container managed bean[ Go to top ]

    hello Tomy
      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..
  3. Can not deploy container managed bean[ Go to top ]

    hai ram,

    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.

    regards
    sumanth
  4. Can not deploy container managed bean[ Go to top ]

    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...
  5. Can not deploy container managed bean[ Go to top ]

    Oops--that line should be like this:

    public <your_ejb_remote_interface> findByPrimaryKey(<your_primary_key_class key) throws FinderException, RemoteException;
  6. Can not deploy container managed bean[ Go to top ]

    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...

    sumanth
  7. Can not deploy container managed bean[ Go to top ]

    Problem is in deployement description in the line
    <prim-key>...type....</prim-key>. Type need to be the type of the input parameter.