Hi,

Question is: Is your bean primary
key type CategoryPK (as you use in
your ejbCreate() method), or is it
java.lang.String (as you declare in
your ejb-jar.xml file?


Best Regards,

Ole Husgaard.


Indika Fernando wrote:
> 
> hi all,
> I am wriiting an BMP beans and using the jboss server...
> my create method is given below:
> In the Bean ::::
> public CategoryPK ejbCreate(String catID,String catName,int hierarchyLevel,
>            String parentCode,String description,String image)
>                   throws CreateException, RemoteException
>  {
>     alll the stuff that is needed
>     return new CategoryPK(catID);
> }
> 
> My Home Interface is::::
> Category create(String catID,String catName,int hierarchyLevel,
>                     String parentCode,String description,String image)
> throws CreateException,RemoteException;
> 
> But when I deploy the following errors were given::::::
> 
> Bean   : CategoryBean
> Method : public CategoryPK ejbCreate(String, int, String, String, String)
> throws
> CreateException, RemoteException
> Section: 9.2.3
> Warning: The return type of an ejbCreate(...) method must be the entity
> bean's
> primary key type.
> 
> [Verifier]
> Bean   : CategoryBean
> Method : public CategoryPK ejbFindByPrimaryKey(CategoryPK) throws
> FinderExceptio
> n, RemoteException
> Section: 9.2.5
> Warning: The return type of the ejbFindByPrimaryKey method must be the
> primary k
> ey type.
> 
> my DEPLOYMET DESCRIPTOR
> (Part of it is given below...)
> <entity>
>       <description>Category</description>
>       <ejb-name>CategoryBean</ejb-name>
>       <home>com.sr.espada.se.services.catman.CategoryHome</home>
>       <remote>com.sr.espada.se.services.catman.Category</remote>
>       <ejb-class>com.sr.espada.se.services.catman.CategoryBean</ejb-class>
>       <persistence-type>Bean</persistence-type>
>       <prim-key-class>java.lang.String</prim-key-class>
>       <reentrant>False</reentrant>
>    <cmp-field><field-name>catID</field-name></cmp-field>
>       <cmp-field><field-name>catName</field-name></cmp-field>
>       <cmp-field><field-name>creationDate</field-name></cmp-field>
>       <cmp-field><field-name>hierarchyLevel</field-name></cmp-field>
>       <cmp-field><field-name>parentCode</field-name></cmp-field>
>       <cmp-field><field-name>description</field-name></cmp-field>
>       <cmp-field><field-name>image</field-name></cmp-field>
>    <primkey-field>catID</primkey-field>
>     </entity>
> 
> <session>
>       <description>CategoryCollection</description>
>       <ejb-name>CategoryCollectionBean</ejb-name>
>       <home>com.sr.espada.se.services.catman.CategoryCollectionHome</home>
>       <remote>com.sr.espada.se.services.catman.CategoryCollection</remote>
> 
> <ejb-class>com.sr.espada.se.services.catman.CategoryCollectionBean</ejb-clas
> s>
>       <session-type>Stateless</session-type>
>       <transaction-type>Bean</transaction-type>
>    <ejb-ref>
>          <ejb-ref-name>ejb/Category</ejb-ref-name>
>          <ejb-ref-type>Entity</ejb-ref-type>
>          <home>com.sr.espada.se.services.catman.CategoryHome</home>
>          <remote>com.sr.espada.se.services.catman.Category</remote>
>          <ejb-link>CategoryBean</ejb-link>
>    </ejb-ref>
>     </session>
> 
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> List Help?:          [EMAIL PROTECTED]


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to