findByPrimaryKey Method Error (FATAL) !!!

Discussions

EJB programming & troubleshooting: findByPrimaryKey Method Error (FATAL) !!!

  1. findByPrimaryKey Method Error (FATAL) !!! (3 messages)

    Hi,

       Am pretty new to EJB. Using Weblogic 5.1 with sp6 on Win2000. I have downloaded the source code for examples from com.oreilly and I am trying to deploy my entity bean (Cabin bean) but it gives me error saying ... ejbCreate(int) method in CabinBean must return primary key type and also it doesnt show me my serialized class com.titan.cabin.CabinPK in Primary key type (while deploying) .... I have the ejb-jar.xml file along with other class files (following EJB1.1specs) but still it doesnt work..
      r there any known issues over Win2000 or may be I have goofed up somewhere ...
      
      Plz help ...

    Cheers
    Jai


  2.           Hi,

               Ensure that the return type of the ejbCreate() should be PK.

              The return type of create() method in Home interface is Remote interface.

               Thank u

                 Satya
  3. findByPrimaryKey Method Error (FATAL) !!![ Go to top ]

    In the Deploy tool for Weblogic, make sure that the check box for "Primary Key Field" under the persistance node of the CabinBean says "none" and the "primary key type" is labelled as "com.titan.cabin.CabinPK". If you have changed this to "Integer" and/or tried to use "id" as your PK (as anyone with database experience may try to do!!), you will get the problem you describe..

    Good Luck

    Mike
  4. I also meet this problem[ Go to top ]

    But I dont think this is the solution , I have tried it as u said. ( I use Oracle9i ).When I change to another DBMS,the problem disappeared. I think the problem may be in the jdbc driver. But I dont know how to solve it. Expect anyone's help! thanks a lot!