File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse project:  Jar will not be exported or published Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse project:  Jar will not be exported or published" Watch "Eclipse project:  Jar will not be exported or published" New topic
Author

Eclipse project: Jar will not be exported or published

Mary Taylor
Ranch Hand

Joined: Sep 11, 2000
Posts: 322
I am now having the ClassNotFoundException that the following message says may result from the log4j-1.2.14.jar file not being exported or published. I have two other jar files in this project that are causing me no problems, mail.jar and jstl-12.jar. The two jars that are not causing any problem are listed under "Wep App Libraries" on the Libraries Property page whereas the log4j jar is listed separately at the top of the display on that page. All 3 are physically located in the same directory: C:\development\MyProject\WebContent\WEB-INF\lib. I honestly don't remember if I used "Add External Jars" to add each one, but either that or Add Jars.

Severity and Description Path Resource
Classpath entry C:/development/MyProject/WebContent/WEB-INF/lib/log4j-1.2.15.jar will not be exported or published. Runtime ClassNotFoundExceptions may result. MyProject

Location Creation Time Id
P/MyProject 1243977965108 2927


All 3 jars are owned by the same user in this Vista operating system. However, the log4j- 1.2.15.jar file does not appear if I select Project -> Properties->JavaBuildPath->Add Jars ->MyProject ->WebContent ->WEB-INF-> lib;. I checked the permissions -> security ->Advanced ->Owner tab, and all 3 show the same owner and the same permissions.

I deleted the problematic jar file, downloaded it again as myself, moved it into the lib directory and still do not see it when using the above method to add it to the project.

What could be the problem with this log4j jar file?

Thank you.
Mary Taylor
Ranch Hand

Joined: Sep 11, 2000
Posts: 322
I'd really appreciate some advice on this issue; I am at a dead end here. I will look for a Vista forum; but this is stopping me dead with Eclipse and adding a jar to this project. I'm really working hard on this and short of going back to XP which is not an option, can anyone get me going on resolving this?

Thank you.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10486
    
    9

Is the jar in your eclipse classpath?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Two months back I was facing the same problem, like whenever I export my web app as a war file, the external added jar files didn't get included in app/lib directory, causing exceptions during deployment.

Here is the problem and its answer


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Mary Taylor
Ranch Hand

Joined: Sep 11, 2000
Posts: 322
Here is the oh so simple solution from the MyEclipse forums:

Can you switch to the navigator view, right-click refresh the project, make sure it's not in the LIB dir,
then try and drag and drop the JAR into the lib dir and see if it shows up.


All I had to do was refresh the project! How many times have we forgotten a simple step and made the solution so complex?
Thanks to everyone who took a look at this.

Dinesh Kumar Durairaj
Greenhorn

Joined: Dec 10, 2008
Posts: 5

Two months back I was facing the same problem, like whenever I export my web app as a war file, the external added jar files didn't get included in app/lib directory, causing exceptions during deployment.

Here is the problem and its answer


The solution is now obsolete. The new versions of eclipse doesnt have J2EE Module Dependencies option in project properties. Instead they are replaced by Deployment Assembly. Click on add button in deployment and include the jars you want to export to war file while deploying.

Start from scratch and keep on scratching..
Brad Collins
Greenhorn

Joined: May 15, 2013
Posts: 8
The new versions of eclipse doesnt have J2EE Module Dependencies option in project properties. Instead they are replaced by Deployment Assembly.

@Dinesh, thanks for this update: exactly what I was looking for.


-Brad
 
 
subject: Eclipse project: Jar will not be exported or published