• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Eclipse project: Jar will not be exported or published

 
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the jar in your eclipse classpath?
 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Greenhorn
Posts: 5
jQuery Tomcat Server Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
I have always wanted to have a neighbor just like you - Fred Rogers. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic