logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacob Kjome" <h...@visi.com>
Subject Re: Log4J doesn't work at all
Date Wed, 11 Apr 2012 21:19:48 GMT

Selenium depends upon SLF4J.  You may recall that I mentioned SLF4J in a 
previous email.  In appears Selenium includes it's own SLF4J binding.  It 
seems rather silly to me that they would include this as part of their main 
library rather than as a separate, optional, jar.

I suggest you contact the Selenium developers and, possibly, the SLF4J 
developers to find a solution.

In any case, if you are going to have SLF4J in your classpath and want to use 
Log4j as the implementation, you should include the following in the 


And get rid of any, and all, commons-logging jars.  The "jcl-over-slf4j.jar" 
contains the package/classes of commons-logging, except they are a 
re-implementation bound to SLF4J.


On Wed, 11 Apr 2012 19:55:20 +0200
 tommmmmm <tommmmmm@gmail.com> wrote:
> I added/removed jars one by one.... of course it had to be the last one.
> When I removed
> /home/min/ucng/javaLibs/selenium-server-standalone-2.20.0.jar
> It started to work. However... I need selenium - it's my main browser. So
> when I added it back....
> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in
> [jar:file:/home/min/ucng/javaLibs/pbapi-full-!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in
> [jar:file:/home/min/ucng/javaLibs/selenium-server-standalone-2.20.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
> explanation.
> Exception in thread "main" java.lang.NoSuchMethodError:
> org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;Ljava/lang/Throwable;)V
> at
> org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocationAwareLog.java:99)
> at
> org.apache.http.impl.conn.SingleClientConnManager.getConnection(SingleClientConnManager.java:212)
> at
> org.apache.http.impl.conn.SingleClientConnManager$1.getConnection(SingleClientConnManager.java:190)
> at
> org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:401)
> at
> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
> at
> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
> at
> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:732)
> at jobManager.UploadManager.main2(UploadManager.java:135)
> at jobManager.UploadManager.main(UploadManager.java:44)
> Java Result: 1
> And when I removed the extra slf4j
> as 
> Then I go back to a project that compiles but doesn't show output of
> HttpClient logger.
> Now I am like this @_@
> What has some wierd slf4j to commons-logging or log4j. And what it has to
> do with HttpClient... I am so so so so confused.

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

View raw message