Class not found exception - Ear file not picking jar files through Manifest file.

So I was given a web project with code etc but the project was missing a .Manifest file. In order to run this project I created an Ear project and included the web project as war file (Application.xml) all done through RAD6.
Now during run time at a certain point the application throws classnotfound exception for a file that is in a jar files. So I created a .manifest file in the WEB project and am trying to include the jar files (which I placed in lib folder in the EAR project). So manifest file is in web project and the jar files are in Ear project. I updated the Java Jar Dependencies to include all the jar files I mentioned in the .manifest file.

But still I get the same error. I have tried different path combinations but they do not work. Any quick help is appreciated. Thankyou.
Manifest-Version: 1.0
Class-Path: US_export_policy.jar 
 anuhak.jar 
 com.ibm.ctg.client-5.0.0.jar 
 ....
Created-By: Madhu

Open in new window

Madhu_AAsked:
Who is Participating?
 
CEHJCommented:
Please post stack trace
0
 
Madhu_AAuthor Commented:
The stack trace is null for some reason (cos the code is catching a throwable?) but here is the exception message: java.lang.NoClassDefFoundError: org.XYZ.anuhak.datasource.DataSource

While the jar file containing the class is in the lib folder of the EAR file.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
Madhu_AAuthor Commented:
Ops the .Manifest file is as follows (I was trying different path combinations)
Manifest-Version: 1.0
Class-Path: lib/US_export_policy.jar 
 lib/anuhak.jar 
 lib/com.ibm.ctg.client-5.0.0.jar 
 lib/com.megginson.sax.xml-writer-0.2.jar 
......

Open in new window

0
 
CEHJCommented:
Can you execute the following from the same directory as contains the ear file (referred to here as 'x.ear') and post the output please? Put jarsearch.jar in the same dirctory as the ear file. You can get it on this page:

http://technojeeves.com/joomla/index.php/free/45-jarsearch


mkdir search
cd search
jar xf ..\x.ear
 
 
java -jar ..\jarsearch.jar . DataSource

Open in new window

0
 
Madhu_AAuthor Commented:
I have made some progress. Actually the jar file for DataSource is being found but that class internally uses a class which is missing. Here is that class:
java.lang.NoClassDefFoundError: com.cortexeb.tools.clover.S

Any Idea where i can download this clover jar file containing the missing class. I beilieve clover is some kind of testing tool.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.