You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by nm...@vestmark.com on 2006/03/11 12:49:46 UTC

Log4JLogger does not implement Log

Hello,

I recently started encountering this classloading problem while running
ant. According to the FAQ, I should post to this list so I can get some
diagnostic tests to try. So... here I am! What tests should I try?

Nathan Meyers
nmeyers@vestmark.com

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: Log4JLogger does not implement Log

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
On Mon, 2006-03-13 at 15:07 -0500, nmeyers@vestmark.com wrote:
> OK, we tracked it down. The problem turned out to be in an ant task
> performing a JSP compile. Here's the note from the developer who
> found the problem:
> 
> > The "Class org.apache.commons.logging.impl.Jdk14Logger does not implement
> > Log." issue we ran into was that ant's classloader was corrupted by the
> > JspC ant task of the version of Tomcat that we were using.
> > 
> > This issue is more fully described in:
> > http://issues.apache.org/bugzilla/show_bug.cgi?id=32330
> > 
> > Interestingly enough, using commons-logging 1.1-RC5 got us past the
> > logging issues, although ant failed in other ways down the line.
> 
> So... this may not be terribly relevant to this problem for other people,
> but it was a surprising outcome for us.

or maybe it is...

the 1.0.x series of releases are fragile. it was hard to know whether
some of the reported problems were real or whether they were symptoms of
other serious problems. looks like the 1.1 codebase is proving more
robust and this should give use more information.

thanks very much for looking into this for us :)

- robert


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: Log4JLogger does not implement Log

Posted by nm...@vestmark.com.
OK, we tracked it down. The problem turned out to be in an ant task
performing a JSP compile. Here's the note from the developer who
found the problem:

> The "Class org.apache.commons.logging.impl.Jdk14Logger does not implement
> Log." issue we ran into was that ant's classloader was corrupted by the
> JspC ant task of the version of Tomcat that we were using.
> 
> This issue is more fully described in:
> http://issues.apache.org/bugzilla/show_bug.cgi?id=32330
> 
> Interestingly enough, using commons-logging 1.1-RC5 got us past the
> logging issues, although ant failed in other ways down the line.

So... this may not be terribly relevant to this problem for other people,
but it was a surprising outcome for us.

Nathan


On Sun, Mar 12, 2006 at 05:12:08PM +1300, Simon Kitching wrote:
> On Sat, 2006-03-11 at 06:49 -0500, nmeyers@vestmark.com wrote:
> > Hello,
> > 
> > I recently started encountering this classloading problem while running
> > ant. According to the FAQ, I should post to this list so I can get some
> > diagnostic tests to try. So... here I am! What tests should I try?
> 
> Thanks very much for posting here..we *do* need more data on this issue.
> 
> Rick and Robert have both suggested some things to try which may help
> you. More importantly for the *project*, I'd be very interested to know
> more about the circumstances that triggered this. If you can answer the
> following questions it would be appreciated.
> 
> What operating system are you using?
> 
> Are you running Ant from the commandline, or from some tool (eg
> eclipse)?
> 
> Are you using any ant optional tasks, eg JUnit?
> 
> What happens when you use the commons-logging-1.1-RC5
> (http://people.apache.org/~rdonkin/commons-logging) as noted by Robert?
> Of course what "use" means depends on how you are running Ant. 
> 
> Cheers,
> 
> Simon
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: Log4JLogger does not implement Log

Posted by nm...@vestmark.com.
On Sun, Mar 12, 2006 at 05:12:08PM +1300, Simon Kitching wrote:
> On Sat, 2006-03-11 at 06:49 -0500, nmeyers@vestmark.com wrote:
> > Hello,
> > 
> > I recently started encountering this classloading problem while running
> > ant. According to the FAQ, I should post to this list so I can get some
> > diagnostic tests to try. So... here I am! What tests should I try?
> 
> Thanks very much for posting here..we *do* need more data on this issue.
> 
> Rick and Robert have both suggested some things to try which may help
> you. More importantly for the *project*, I'd be very interested to know
> more about the circumstances that triggered this. If you can answer the
> following questions it would be appreciated.
> 
> What operating system are you using?

The problem is being seen on a Windows server. It appeared recently in a
process that has worked for quite some time, so we're trying to track down
whether the team managing that system made any recent relevant changes.

> 
> Are you running Ant from the commandline, or from some tool (eg
> eclipse)?

I don't manage that process, so I don't know full details. It's launched
from a .bat script that is, I believe, being called from a manager
installed as a Windows service. It's definitely not running under eclipse,
but it's possible it's running under a Java-based service launcher.


> 
> Are you using any ant optional tasks, eg JUnit?

It appears to be the core <exec> task that's failing.

> 
> What happens when you use the commons-logging-1.1-RC5
> (http://people.apache.org/~rdonkin/commons-logging) as noted by Robert?
> Of course what "use" means depends on how you are running Ant. 

Haven't had a chance to try it yet.

Thanks, and I'll pass on more info as I get it.

Nathan

> 
> Cheers,
> 
> Simon
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: Log4JLogger does not implement Log

Posted by Simon Kitching <sk...@apache.org>.
On Sat, 2006-03-11 at 06:49 -0500, nmeyers@vestmark.com wrote:
> Hello,
> 
> I recently started encountering this classloading problem while running
> ant. According to the FAQ, I should post to this list so I can get some
> diagnostic tests to try. So... here I am! What tests should I try?

Thanks very much for posting here..we *do* need more data on this issue.

Rick and Robert have both suggested some things to try which may help
you. More importantly for the *project*, I'd be very interested to know
more about the circumstances that triggered this. If you can answer the
following questions it would be appreciated.

What operating system are you using?

Are you running Ant from the commandline, or from some tool (eg
eclipse)?

Are you using any ant optional tasks, eg JUnit?

What happens when you use the commons-logging-1.1-RC5
(http://people.apache.org/~rdonkin/commons-logging) as noted by Robert?
Of course what "use" means depends on how you are running Ant. 

Cheers,

Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


RE: Log4JLogger does not implement Log

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
On Sat, 2006-03-11 at 09:17 -0800, Rick Herrick wrote:
> Is your classpath in your ant script (just ant, I think, on *nix, ant.bat on
> Windows) getting screwed up?  And/or do you have your classpath configured
> correctly?  Basically, you should check what classpath is getting passed
> into the JVM that's starting up ant.  Depending on what platform you're on,
> there are different ways to do this.  On Windows, just comment out all of
> the "@echo off" statements in the scripts.  On *nix, just change the line
> ant_exec_debug=false to ant_exec_debug=true and it'll echo out the command
> before it runs it.  You can then look at the jars on the classpath and see
> what you're getting for the Log class.
> 
> My guess is that the Jakarta Commons Logging library, Log4J, and Java
> Logging libraries are getting mixed up somehow.  All of these have various
> Log and Logger classes in different packages and I have had different
> versions walk on each other and cause havoc.  The first thing to try is to
> check that your classpath is clean and has only a single version of whatever
> libs you need.
> 
> If the problem is actually occurring IN THE BUILD as opposed to just in the
> ant run, then you need to check the classpath that's set up within the build
> script itself.  That's totally dependent on the contents of the script.

there have been some unconfirmed reports of some form of subtle
incompatibility between later log4j builds and commons-logging-1.0.4. 

if you still have problems after rick's advice then please try to latest
1.1 release candidate
(http://people.apache.org/~rdonkin/commons-logging). if this still fails
then please switch on the diagnostic logging and open a JCL bug report
(http://issues.apache.org/bugzilla) containing the output.

- robert


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


RE: Log4JLogger does not implement Log

Posted by Rick Herrick <ri...@violetshivers.com>.
Is your classpath in your ant script (just ant, I think, on *nix, ant.bat on
Windows) getting screwed up?  And/or do you have your classpath configured
correctly?  Basically, you should check what classpath is getting passed
into the JVM that's starting up ant.  Depending on what platform you're on,
there are different ways to do this.  On Windows, just comment out all of
the "@echo off" statements in the scripts.  On *nix, just change the line
ant_exec_debug=false to ant_exec_debug=true and it'll echo out the command
before it runs it.  You can then look at the jars on the classpath and see
what you're getting for the Log class.

My guess is that the Jakarta Commons Logging library, Log4J, and Java
Logging libraries are getting mixed up somehow.  All of these have various
Log and Logger classes in different packages and I have had different
versions walk on each other and cause havoc.  The first thing to try is to
check that your classpath is clean and has only a single version of whatever
libs you need.

If the problem is actually occurring IN THE BUILD as opposed to just in the
ant run, then you need to check the classpath that's set up within the build
script itself.  That's totally dependent on the contents of the script.

Rick Herrick
rick@violetshivers.com

> -----Original Message-----
> From: nmeyers@vestmark.com [mailto:nmeyers@vestmark.com]
> Sent: Saturday, March 11, 2006 3:50 AM
> To: commons-user@jakarta.apache.org
> Subject: Log4JLogger does not implement Log
> 
> Hello,
> 
> I recently started encountering this classloading problem while running
> ant. According to the FAQ, I should post to this list so I can get some
> diagnostic tests to try. So... here I am! What tests should I try?
> 
> Nathan Meyers
> nmeyers@vestmark.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org