commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Achim Felber <afel...@austin.rr.com>
Subject Re: [logging] LogConfigurationException
Date Tue, 03 Jun 2003 03:50:12 GMT
Andreas,

I think Anthony might be right; you could be using incompatible versions
of Log4J and commons-logging. Below is an application that worked for me. 
Make sure Log4J finds its configuration file. The debug switch can be quite 
helpfull too. ;-)

Regards,
Achim
===========================================================
import org.apache.commons.logging.*;
import org.apache.log4j.*;

public class LogTest
{
  public static void main(String[] args)
  {
    LogFactory.getLog("TestLog").debug("Seems to work ...!");
  }
}

// java -Dlog4j.debug=true -Dlog4j.configuration=file:/c:/data/sort4.properties LogTest

On Mon, Jun 02, 2003 at 01:58:27PM -0400, Anthony Eden wrote:
> You can also put the log4j.properties file in a location which is known 
> to Log4J.  Take a look at the Default Initialization Procedure section 
> in the short manual ( http://jakarta.apache.org/log4j/docs/manual.html ) 
> for information on how Log4J attempts to find the properties file.
> 
> As for the specific problem, make sure you are using both the current 
> version of Log4J and the current version of Commons Logging.  Also, 
> check your whole classpath for other copies of either Commons Logging or 
> Log4J.
> 
> Sincerely,
> Anthony Eden
> 
> Andreas Probst wrote:
> >Hi Achim,
> >
> >thank you for your answer. You're right - I would have to change 
> >the configuration only once. It's not what I expected, but OK, I 
> >think I can live with it.
> >
> >However, putting an 
> >BasicConfigurator.configure();
> >into the main() method doesn't solve the current problem:
> >
> >Caused by: org.apache.commons.logging.LogConfigurationException: 
> >org.apache.commons.logging.LogConfigurationException: 
> >org.apache.commons.logging.LogConfigurationException: Class 
> >org.apache.commons.logging.impl.Log4JLogger does not implement 
> >Log
> >
> >Does anyone have a clue there?
> >
> >Regards
> >
> >Andreas

-- 
Achim Felber
e-mail: afelber@austin.rr.com

Mime
View raw message