- This topic has 5 replies, 3 voices, and was last updated 20 years, 1 month ago by Scott Anderson.
-
AuthorPosts
-
Roshan D’SouzaParticipantHi,
I have an EJB project that depends on a jar file and another simple java project which I have included in the build path. The java project has a few jar files that it refrences. I then have an EAR project that includes the above EJB project as a module. When I try to deploy the EAR project on Weblogic 8.1 I find that the EAR is packaged correctly. However, the dependent jar files of the EJB and the java project are not copied to the EAR root. I do find that the classes in the java project are merged with the EJB classes. I am following the example given in the documentation for EAR project and have set all the MyEclipse-EAR and MyEclipse-EJB settings appropriately. But I still cannot get the dependent jar to be deployed. Am I missing something??
JDK – 1.4.2_04
Eclipse – 3.0.0
MyEclipse – 3.8.3Roshan.
Riyad KallaMemberRoshan,
You most likely will want to make those JARs either a User Library and set them on the EJB or External JAR references… both of which should get deployed. I believe the level of disconnection between the EAP and the Java Project’s dep JARs is the reason they are not deployed. I will check on this for you.
Roshan D’SouzaParticipantRiyad,
Thanks for your reply. This is what I did. I first created a new UserLibrary called TEST and added the external jar to it. Then I opened up the properties for the EJB project and in the Java Build Path->Libraries tab clicked on Add Library… and added the TEST library. I created another library called TEST2 and added all the jars refrenced by the java project and added it to the java project in the same way. I then right-clicked on the EAR project and selected MyEclipse->New Module Manifests. I found that the manifest did not include the dependent jar. The class-path was blank. I then deployed the EAR project and found exactly the same result as before. The dependent jar files, i.e. the jar refrenced by the EJB and the jars refrenced by the java project, were not deployed. Am I doing something wrong??
Roshan.
Scott AndersonParticipantRoshan,
To deploy everything you need to do the following:
1) In the java project, navigate to Properties > Java Build Path > Order and Export and “check” the libraries from the build path you’d like packaged in your EAR. Checking them marks them for export for the deployer.
2) In the EAR project, navigate to Properties > Project References and “check” the name of your java project to add it as a dependency for the EAR.
3) Navigate to Window > Preferences > MyEclipse > J2EE Projects > EAR Project and in the Library Deployment section, check the option to “include jars exported from dependent java projects” and select OK.
4) Right-click on your enterprise project in the Package Explorer and select MyEclipse > New Module Manifests to create new MANIFEST.MF files for your module projects that contain Class-Path entries for the additional libraries in the EAR.For more information on deployment, please see the advanced section of Enterprise Project Quickstart in the included Help or on the website in the Documentation section here: http://www.myeclipseide.com/ContentExpress-display-ceid-67.html
Roshan D’SouzaParticipantScott,
Thanks for that. It now works like a charm!! I know I was missing something.
Roshan.
Scott AndersonParticipantGlad to hear it.
-
AuthorPosts