facebook

EJB Packaging and Deployment

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #255070 Reply

    jbradfor
    Member

    This message has not been recovered.

    #255085 Reply

    Riyad Kalla
    Member

    This message has not been recovered.

    #255179 Reply

    jbradfor
    Member

    This message has not been recovered.

    #255272 Reply

    Scott Anderson
    Participant

    This message has not been recovered.

    #255316 Reply

    jbradfor
    Member

    This message has not been recovered.

    #255333 Reply

    Riyad Kalla
    Member

    This message has not been recovered.

    #257000 Reply

    jbradfor
    Member

    Is there a fix for the EJB packaging problem in version 5?

    #257009 Reply

    Riyad Kalla
    Member

    Yes I believe so, we had 2 other reports of complex ear deployment issues and both were fixed. A major confusing factor when deploying configs like EAR->EJB->JAVA is that people sometimes forget to ‘export’ the dependent JARs from the respective project.

    Can you refresh me on your configuration and what is happening?

    #257796 Reply

    jbradfor
    Member

    Ok, I have confirmed with MuyEclipse 5, this problem still exists. Here is a breakdown of the problem.

    1 EAR project (contains 1 EJB project)

    1 EJB Project (depends upon 1 Java Project)

    1 Java project (this java project also contains another jar /lib/log4j.jar)

    We have tried all deployment options for EARs and EJBs and we still can not get MyEclipse to package this scenario correctly. Our expectation is that since the Java project contains a JAR file on its build path, which also happens to be contained within the Java project, that the log4j.jar file would also be packaged up within the EAR file. Here is a snippet of the .classpath file from the EJB project and the Java projects.

    EJB:
    <classpath>
    <classpathentry kind=”src” path=”src”/>
    <classpathentry kind=”con” path=”org.eclipse.jdt.launching.JRE_CONTAINER”/>
    <classpathentry kind=”con” path=”com.genuitec.eclipse.j2eedt.core.J2EE14_CONTAINER”/>
    <classpathentry combineaccessrules=”false” kind=”src” path=”/ajavaproject”/>
    <classpathentry kind=”lib” path=”/ajavaproject/lib/log4j.jar”/>
    <classpathentry kind=”output” path=”classes”/>
    </classpath>

    Java:
    <classpath>
    <classpathentry kind=”src” path=”src”/>
    <classpathentry kind=”con” path=”org.eclipse.jdt.launching.JRE_CONTAINER”/>
    <classpathentry kind=”lib” path=”lib/log4j.jar”/>
    <classpathentry kind=”output” path=”bin”/>
    </classpath>

    #257803 Reply

    Riyad Kalla
    Member

    jbradfor,
    The good news is that this is infact possible, the bad news is that it’s complicated and we need to stream line the process. I’ll outline the general gist of it (I just reproduced this locally with 3 projects, so I know it works):

    1) Remove the Java libraries from your EJB build path, instead just add the Java project to your EJB build path, then go to your Java project and export all it’s JARs.
    2) Now go and add a reference to the Java project to your EAR, so it knows it’s a dependent Java utility project.
    3) Go to your MyEclipse > EAR settings in your EAR project and adjust the deployment rules for the first box to “JAR dependent Java projects” and in the second box “Jars exported from dependent java projects” (or set these up however you want).
    4) Now hit OK and regenerate your MANIFEST files fi you want
    5) Deploy your project, viola!

    NOTE: If you need an example, you can grab my test setup from here.

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: EJB Packaging and Deployment

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