commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <>
Subject Re: [logging] Startup problem with Tomcat because of commons-logging
Date Sat, 11 Jun 2005 00:28:36 GMT
On Fri, 2005-06-10 at 12:26 +0200, Thomas Dudziak wrote:
> Hi folks,
> I have severe problems with a webapp that uses commons-logging, in
> Tomcat 5.5. The webapp contains the newest commons-logging and log4j
> 1.2.8, and configures logging via a in
> WEB-INF/classes. So far, so normal. When I start Tomcat on the
> commandline, everything works as expected. But when running Tomcat
> from within Eclipse I get this pretty ugly exception:
> ava.lang.NoClassDefFoundError: org/apache/log4j/Category) (Caused by
> org.apache.commons.logging.LogConfigurationException: No suitable Log
> constructor [Ljava.lang.Class;@5ff916 for
> org.apache.commons.logging.impl.Log4JLogger (Caused by
> java.lang.NoClassDefFoundError: org/apache/log4j/Category))
> (complete stack trace at the end of the mail)
> FYI: Tomcat is a fresh and unmodified 5.5.9 running on JDK 1.5.0_01 on
> Windows XP, Eclipse is 3.1M7 with the Sysdeo plugin.
> Any ideas what to do about this ? I tried putting commons-logging and
> log4j into one of the Tomcat library folders but without success.

When Tomcat is started via "" (which calls the
startup script deliberately ignores the current classpath and sets up a
custom one with the right jars (see

Eclipse must somehow be starting Tomcat with an "unclean" classpath. I
can't figure out exactly what's going on here as I don't know Eclipse or
your setup. But forcing tomcat to start "clean" should resolve the

Perhaps there is some option in Eclipse to start tomcat with a "clean"
classpath, eg "fork on startup"?



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message