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



spiderboy wrote:
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.

Can you provide an SSCCE?

--
Lew
.



Relevant Pages

  • Re: Need help with using org.apache.log4j pakages (LogManager)
    ... I downloaded logging-log4j-1.2.14 package and edited the classpath ... And my java code has this line: ... private static final Logger myLogger = ... I am able to compile the code just fine, but when I try to run it, it ...
    (comp.lang.java.programmer)
  • Re: UnsatisfiedLinkError spuriously thrown
    ... the JAVA code from the same project which is only slight less ... native symbol name that the package name is encoded as part of it. ... What does ldd say? ... dependencies though most aren't in LD_LIBRARY_PATH (like /lib, ...
    (comp.lang.java.programmer)
  • Need help with using org.apache.log4j pakages (LogManager)
    ... I downloaded logging-log4j-1.2.14 package and edited the classpath ... And my java code has this line: ... private static final Logger myLogger = ...
    (comp.lang.java.programmer)
  • Re: UnsatisfiedLinkError spuriously thrown
    ... the JAVA code from the same project which is only slight less ... native symbol name that the package name is encoded as part of it. ... then the JVM will fail to find the correct symbols. ... The CLASSPATH and LIB PATH all ...
    (comp.lang.java.programmer)
  • UnsatisfiedLinkError and Javah in JNI
    ... package name, I succeeded; but with package name, I used javah ... public static void main { ... is one java code named NatBEMain.java: ... public class NatBEMain{ ...
    (comp.lang.java.programmer)