| Author |
Error while validate Descriptors
|
Ramakrishnan Ponmudi
Ranch Hand
Joined: Apr 20, 2004
Posts: 72
|
|
i am getting the following error. what is the cause for this error? Checking J2EE compliance of beans ERROR: Error while checking J2EE compliance of beans ERROR: Error from ejbc: In EJB ProductBean, the local home interface findByPrimaryKey method must return the local interface type of the entity bean. ERROR: Error from ejbc: In EJB ProductBean, the return type for the local home finder method findByPrimaryKey(java.lang.Integer) must be (for a single-object finder) the local interface type of the entity bean, or (for a mult-object finder) java.util.Enumeration or java.util.Collection. NOTE: EJB2.0 CMP finders may not return a java.util.Enumeration Class. ERROR: Error from ejbc: In EJB ProductBean, the return type for the local home create method create(java.lang.Integer) must be the local interface type of the bean. ERROR: Error from ejbc: In EJB ProductBean, the return type for the local home create method createProductDetails(java.lang.Integer,java.lang.String,double) must be the local interface type of the bean.
|
 |
Aleena Rehman
Ranch Hand
Joined: Sep 20, 2005
Posts: 66
|
|
Hi, Please see the suggestions below... ERROR: Error from ejbc: In EJB ProductBean, the local home interface findByPrimaryKey method must return the local interface type of the entity bean. Ans1:-> Check the return type of your findByPrimaryKey() method in your Local Home interface. It should always return local component interface. ERROR: Error from ejbc: In EJB ProductBean, the return type for the local home finder method findByPrimaryKey(java.lang.Integer) must be (for a single-object finder) the local interface type of the entity bean, or (for a mult-object finder) java.util.Enumeration or java.util.Collection. NOTE: EJB2.0 CMP finders may not return a java.util.Enumeration Class. Ans:-> It seems that you are returning a Collection/Enumeration from your findByPrimaryKey(), which defies all logic. Your primary key should uniquely identify a row in your table, and this means, you should only return a LocalComponent Interface. ERROR: Error from ejbc: In EJB ProductBean, the return type for the local home create method create(java.lang.Integer) must be the local interface type of the bean. Ans: Again, return type for LocalHome create() method must be Local Component interface. ERROR: Error from ejbc: In EJB ProductBean, the return type for the local home create method createProductDetails(java.lang.Integer,java.lang.String,double) must be the local interface type of the bean. Ans: for any LocalHome create() method, return type must be local component interface. Your creatProductDetails(Integer,String,double) seems to be returning something else. Hope that helps..
|
Aleena Rehman<br />SCJP, SCBCD 95%, SCWCD 85%, IBM-OOAD 84%, SCEA-I 91%
|
 |
 |
|
|
subject: Error while validate Descriptors
|
|
|