- This topic has 24 replies, 12 voices, and was last updated 17 years, 1 month ago by cquezel.
-
AuthorPosts
-
Scott AndersonParticipantMurtuza,
I believe the error is just as it states. You’re trying to define a container-managed entity bean and you’re not specifying the correct return type on the ejbCreate method. Perhaps you meant to define the EJB as a Stateless Session Bean instead?
MurtuzaMemberThanks Scott, Actuall I figured out the problem. The problem was i copied and pasted the code from tutorial
public abstract class SimpleBean implements EntityBean {
* @ejb.bean name = “SimpleBean”
* type = “CMP”
* cmp-version = “2.x”
* display-name = “SimpleBean”
* description = “SimpleBean EJB”
* view-type = “both”
* jndi-name = “ejb/SimpleBeanHome”
* local-jndi-name = “ejb/SimpleBeanLocalHome”
* primkey-field = “id”
* @ejb.persistence table-name = “tsimplebean”
* @jboss.persistence table-name = “tsimplebean”
* @ejb:util
* generate=”physical”But there was already a xdoclet tags before the class declaration, which did not have any primary key information. The “Run XDoclet” was probably looking at that bit of xdoclet to generate other classes.
I was successfuly able to develop, deploy and test this simple bean. Can you tell me where i can find advance tutorial (where development of more than one Entity Bean with CRM and Session Facade are demonstrated)
Thanks
Murtuza
Riyad KallaMemberMurtuza, thanks for closing the loop with us, glad it is working.
MurtuzaMemberCan you tell me where i can find advance tutorial (where development of more than one Entity Bean with CRM and Session Facade are demonstrated)
Thanks
Murtuza
Riyad KallaMemberHmm honestly I can’t. Maybe you can search online for some JBoss tutorials or even check their page? I’ve not gotten into EJBs, sorry.
Also Scott is free to reply to this thread later, even though I closed it. So if he knows, he can post a link or two for you.
LiLaLunaMemberYou should post your source or place it somewhere on the web.
Problem normally occurs when the primaryKey specified by xdoclet-tags has not the same type as the return type. May be you missed a xdoclet tag.Sebastian
gzhuyeMemberI’m also working on EJB using the same env(Myeclipse,Jboss,mysql), any plugin components with MyEclipse for the definition of relationships between entity beans with container-managed persistence?
I studied Sun J2EE 1.3 Tutorial, in Chapter: “Container-Managed Persistence Examples”, it has IDE tool to define the relationships between entity beans with container-managed persistence.(http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/CMP4.html)
I can’t find such IDE with JBoss, is it better that MyEclipse has a plugin component with this kind of IDE Tool for EJB development?
Best regards,
Paul
LiLaLunaMemberI added a second tutorial including a session and an entity EJB. the session bean is the fascade providing business methods.
Data is exchanged with a value object.I provided the sources, so I hope that it is a complete example.
session bean fascade to entity bean, using myeclipse, jboss and postgresql
Regards Sebastian
Riyad KallaMemberSebastian,
Your tutorials look great, thank you for providing this resource for all the users.
cquezelMemberThis message has not been recovered.
-
AuthorPosts