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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
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
OWASP: Threats Fundamentals

Learn the top ten threats that are present in modern web-application development and how to protect your business from them.

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
CEHJCommented:
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java EE

From novice to tech pro — start learning today.