logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ceki <c...@qos.ch>
Subject Re: Log4J doesn't work at all
Date Thu, 12 Apr 2012 10:06:38 GMT
On 11.04.2012 19:55, tommmmmm wrote:

[snip]

> 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-1.4.0.91/lib/test/slf4j-log4j12-1.6.1.jar!/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)

As the warning message above shows, 
selenium-server-standalone-2.20.0.jar contains an SLF4J binding. It also 
contains the classes of an *older* version of slf4j-api.jar. Which 
explains the NoSuchMethodError exception about 
org.slf4j.spi.LocationAwareLogger.log method.

Interestingly enough, selenium-server-standalone-2.21.0.jar released 
just a few hours ago does *not* bundle slf4j classes. Note: perhaps 
using a jar file which includes "standalone" in its name was the 
original error. (Disclaimer: I have never used selenium.)

-- 
Ceki
http://twitter.com/#!/ceki

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


Mime
View raw message