?
Solved

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

Posted on 2008-11-05
7
Medium Priority
?
1,373 Views
Last Modified: 2012-06-27
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

0
Comment
Question by:Madhu_A
  • 3
  • 3
6 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 22889152
Please post stack trace
0
 

Author Comment

by:Madhu_A
ID: 22889188
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
 

Author Comment

by:Madhu_A
ID: 22889202
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 86

Expert Comment

by:CEHJ
ID: 22890369
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
 

Author Comment

by:Madhu_A
ID: 22890779
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
 
LVL 86

Accepted Solution

by:
CEHJ earned 1500 total points
ID: 22890899
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
The viewer will learn how to implement Singleton Design Pattern in Java.
This video teaches viewers about errors in exception handling.
Suggested Courses
Course of the Month15 days, 10 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question