facebook

Porting WSAD 5.1.1 to MyEclipse5.1 using XDoclet

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #262081 Reply

    Russ
    Member

    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:

    
    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?

    #262087

    Russ
    Member

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

    
    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

    #262135

    Greg
    Member

    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.

    #262186

    Russ
    Member

    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

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Porting WSAD 5.1.1 to MyEclipse5.1 using XDoclet

You must be logged in to post in the forum log in