logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Faggart, Robin" <rfagg...@carreker.com>
Subject Log4j NoClassDefFoundError
Date Wed, 17 May 2006 21:23:08 GMT
Hi..

I'm running a stand-alone java app -i.e. no Websphere on two different
AIX boxes,  TST04 and DEV03.  Currently the version of Java 1.4
installed on  TST04 is 1.4.2 and on DEV03 is 1.4.1.  The code calls the
apache logging code (log4j) and  it runs fine on DEV03.  On TST04, I
consistently get the following error when the Logger is instantiated:

Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/log4j/Logger

Just as a test, I copied the Java 1.4.1 environment over to TST04 and I
pointed to that environment.  The program worked...which is consistent
with what I see on the DEV03 1.4.1 environment.

At that point I was convinced that it was a log4j problem with 1.4.2,
but I've since then put together a very simple standalone program that
does nothing more than create a logger and write messages to a file.
That program works on both 1.4.2 and 1.4.1.  I've also seen cases (and
I've fixed them all, I think) where I see this same error reported
because file permissions are incorrect.   I fully understand that the
log4j.jar file has to be in the classpath...and it is.  If it wasn't, it
wouldn't work under either environment.  

Because of the second program working, I have to rule out that it's a
"log4j" "java version 1.4.2" compatibility problem...but I'm just
wondering if there's anyone out there that might be able to shed some
light on this...

Thanks
Robin

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message