Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2007

Tip: Looking for answers? Try searching our database.

Need help with using org.apache.log4j pakages (LogManager)

Thread view: 
spiderboy - 29 Jun 2007 20:08 GMT
Greetings,

I downloaded logging-log4j-1.2.14 package and edited the classpath
variable to point to this directory:

C:\logging-log4j-1.2.14\dist\lib\log4j-1.2.14.jar

And my java code has this line:

private static final Logger myLogger =
LogManager.getLogger(<my_class_name>.class.getName());

I am able to compile the code just fine, but when I try to run it, it
gives me this following error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/
log4j/LogManager at <my_class_name>.<clinit>(line number ...)

I looked at the build.xml file but not sure what needs to be modified.
Can anyone please give me some help on how to resolve this error. I
have researched this problem rather thoroughly but failed a find any
solution.

Thanks much.
Richard Reynolds - 29 Jun 2007 23:12 GMT
> Greetings,
>
[quoted text clipped - 20 lines]
>
> Thanks much.

what is your classpath set to when you run it? (not when you compile it)
Lew - 29 Jun 2007 23:43 GMT
> Greetings,
>
[quoted text clipped - 18 lines]
> have researched this problem rather thoroughly but failed a find any
> solution.

Can you provide an SSCCE?

Signature

Lew



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.