- This topic has 9 replies, 3 voices, and was last updated 18 years, 2 months ago by Riyad Kalla.
-
AuthorPosts
-
jbradforMemberThis message has not been recovered.
Riyad KallaMemberThis message has not been recovered.
jbradforMemberThis message has not been recovered.
Scott AndersonParticipantThis message has not been recovered.
jbradforMemberThis message has not been recovered.
Riyad KallaMemberThis message has not been recovered.
jbradforMemberIs there a fix for the EJB packaging problem in version 5?
Riyad KallaMemberYes 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?
jbradforMemberOk, 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>
Riyad KallaMemberjbradfor,
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.
-
AuthorPosts