*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Error while validate Descriptors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Error while validate Descriptors" Watch "Error while validate Descriptors" New topic
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%
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error while validate Descriptors
 
Similar Threads
findbyprimarykey doubt
Error while execution of session facade pattern
Problem Deploying in jboss3.2
This Weeks Giveaway
choosing between home business methods and finders