Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
russray
Post subject: Porting WSAD 5.1.1 to MyEclipse5.1 using XDoclet  PostPosted: Nov 16, 2006 - 09:13 PM
Registered Member
Registered Member


Joined: Feb 05, 2006
Posts: 221

We are trying to port the source code for a EJB project to MyEclipse. What we have done is taken the source code and created an XDoclet for generating the stubs and skeltons classes. We are able to compile and build/deploy projects, but when the server starts up we get this error:


Where we go looking ser get this explaination to our problem:
Code:

Your session bean class must contain the following method:

public void ejbCreate() throws CreateException{
}

Copied and pasted from the ejb spec section 7.10.3

7.10.3 ejbCreate methods
The session bean class must define one or more ejbCreate(...) methods whose signatures
must follow these rules:
• The method name must have ejbCreate as its prefix.
• The method must be declared as public.
• The method must not be declared as final or static.
• The return type must be void.
• The method arguments must be legal types for RMI/IIOP if there is a create<
METHOD>(...) corresponding to the ejbCreate(...) method on the
session beanÂ’s remote home interface.
• The throws clause may define arbitrary application exceptions, possibly including the
javax.ejb.CreateException.
Compatibility Note: EJB 1.0 allowed the ejbCreate method to throw the java.rmi.RemoteException
to indicate a non-application exception. This practice was deprecated in EJB 1.1—an EJB 1.1 or
EJB 2.0 compliant enterprise bean should throw the javax.ejb.EJBException or another RuntimeException
to indicate non-application exceptions to the Container (see Section 18.2.2). An EJB 2.0 compliant
enterprise bean should not throw the java.rmi.RemoteException from the ejbCreate method .

_________________
Kabir Khan
JBoss AOP Lead
JBoss, a division of Red Hat



The session section is checked for XDoclet.


Can you shed some light on this?
 
 View user's profile Send private message  
Reply with quote Back to top
russray
Post subject:   PostPosted: Nov 16, 2006 - 10:01 PM
Registered Member
Registered Member


Joined: Feb 05, 2006
Posts: 221

We added the ejbCreate method with the throws CreateException in the Session Beans and I am still getting the

Code:

15:58:33,779 INFO  [EARDeployer] Init J2EE application: file:/C:/jboss-4.0.5.GA/server/default/deploy/Project.ear/
15:58:36,076 WARN  [verifier] EJB spec violation:
Bean   : _SessionBean_Stub
Section: 7.10.3
Warning: A Session bean must define at least one ejbCreate method.

15:58:36,623 ERROR [MainDeployer] Could not create deployment: file:/C:/jboss-4.0.5.GA/server/default/deploy/PowerImage.ear/ProjectEJB.jar/
org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
   at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:610)


I am at a lost on how to proceed? Any suggestions?

Russ
 
 View user's profile Send private message  
Reply with quote Back to top
support-greg
Post subject:   PostPosted: Nov 17, 2006 - 03:43 PM
Moderator
Moderator


Joined: Mar 31, 2004
Posts: 1615

Russ,

It sounds like maybe one of the interfaces may not be getting generated correctly. If you are using the "Standard EJB" Xdoclet configuration, then you must make sure that your package where you keep your Session bean ends with ".ejb". The standard ejb configuration does a package substitution for ".ejb" to ".interfaces", and if you don't have the ".ejb" package suffix, some interfaces overlap and may not be getting generated.

If this isn't the problem, can you post some sample code of your Session Bean to the forums so we can take a look at what is going on.

_________________
Greg
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
russray
Post subject:   PostPosted: Nov 17, 2006 - 06:38 PM
Registered Member
Registered Member


Joined: Feb 05, 2006
Posts: 221

Greg:

Thank you very much for your reply.

What I have discovered is XDoclet is not creating the ejbCreate() method in the SessionBean. I also found an outstanding bug with XDoclet for this very issue: XDT-1544 XDoclet 1.2.3 is not generating ejbCreate in local/remote home interfaces.

Russ
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits