wood burning stoves 2.0*
The moose likes Ant, Maven and Other Build Tools and the fly likes build path problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "build path problem" Watch "build path problem" New topic
Author

build path problem

vipul bondugula
Ranch Hand

Joined: Oct 14, 2010
Posts: 218
Hi Ranchers,

I have a ear project which has ejb,web and other util jars. while deploying to server, ejb jar is unable to refer to util jars. so NoClassDefFoundErrors are coming. If i copy util jars into server, then it is working fine. I am using MyEclipse 10 blue. Please give me suggestion on adding other util jars to ejb jar file. I already tried in adding for properties-->build path. and order and export i checked jar files. still of no use.. Please provide a suggestion


Thanks
Vipul Kumar
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1527
Have you tried using Ant to build? On Ecilpse you may need to right click on the jar and chose -->BuildPath-->Add to build path so that it becomes available to the path.


Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs] [Certification Guides] [The Linux Documentation Project]
vipul bondugula
Ranch Hand

Joined: Oct 14, 2010
Posts: 218
Akhilesh Trivedi wrote:Have you tried using Ant to build? On Ecilpse you may need to right click on the jar and chose -->BuildPath-->Add to build path so that it becomes available to the path.


I have tried it. But it didn't work. when i start server, throwing NoclassDefFoundError exception.
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1527
Did not work means?
vipul bondugula
Ranch Hand

Joined: Oct 14, 2010
Posts: 218
Akhilesh Trivedi wrote:Did not work means?


kk..will explain clearly. I have a ear project which has log4j.jar file. In the ear project i am having ejb.jar,utils.jar,sample.web. I added log4j.jar from ear to ejb.jar build path. during compilation, it is ok. but during run-time , throwing NoClassDefFoundError.

seems like log4j.jar is deployed in concord.ear, ejb.jar is unable to refer to log4j.jar during run-time.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5838
    
    7

The first thing you need to do is verify that log4j.jar went into your EAR file and where it went. From a command line, cd to the folder with the EAR and enter "jar -tf concord.ear". Post the result.

I am also a little confused as tow what projects you have any what JARs are referenced in each project.

And you are building this with MyEclipse, and not with some other build tool (such as Ant or Maven), right?


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: build path problem