- This topic has 3 replies, 2 voices, and was last updated 18 years, 8 months ago by
Riyad Kalla.
-
AuthorPosts
-
yaomingMemberI’ve just started using MyEclipse for a couple of weeks. Now I’m having some trouble with my EAR project, which has 2 components, ejb project and web project. The problem is for this ejb project, which depends on another 2 jar files which have a lot of APIs used by this ejb project.
In MyEclipse, of course I added these 2 jar files in the Build-Path to make the compiler happy. For runtime, the only way I can think about is to copy the 2 jar files directly under EAR project (or subfolder like lib or something, depending on what I put in the MANIFEST.MF), and put the entry CLASS-PATH of its MANIFEST.MF. Then deployed the EAR project. I verified the deployed EAR file, everything looks ok, including those 2 jar files. But once I run, always get NoClassFound exception. In other words, those 2 jar files are not properly used, even it looks like they are properly deployed there.
I searched this forum, and always got the answer with the section 9 of the following: http://www.myeclipseide.com/images/tutorials/quickstarts/earprojects/. But, what that section talks about is how to use Project Reference, while my ejb project is not dependant on another existing project, but just jar files.
I think this is pretty common problem. Anyone can help me out with this issue?
Thanks a lot,
yaoming
Riyad KallaMemberyaoming,
Deployment of EAR’s isn’t as straight forward as it could be when you are trying to deploy dependencies *of* dependencies, but it can be done. To recap, is this your structure?+ MyEAR (EAR) + MyEJB (EJB) + JAR (Dependency) + JAR (Dependency) + MyWeb (Web)
Also if you are getting class not found exceptions *and* your JARs are deploying fine, make sure you go to MyEclipse > New Module Manifests, to regenerated the Manifest files and then double check that they are picking up the paths correctly.
yaomingMemberwell, I got it work by putting the jar files under APP-INF/lib of EAR folder. I didn’t specify anything in the Manifests.
But the other way is still not working. If i tried to put jar files directly under EAR folder and specify the Manifest.MF.
but thanks for your kind reply,
Riyad KallaMemberHmm I don’t know why the other way isn’t working, but I’m glad to hear it is working now.
-
AuthorPosts