• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Eclipse project: Jar will not be exported or published

 
Mary Taylor
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11165
14
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the jar in your eclipse classpath?
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Mary Taylor
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
Java jQuery Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Brad Collins
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic