SLF4J: Class path contains multiple SLF4J bindings.

286 views
Skip to first unread message

Shravan Kumar

unread,
Jul 5, 2016, 4:19:07 PM7/5/16
to Gatling User Group
I am new to this gatling and its strange it giving me a warning as 'SLF4J: Class path contains multiple SLF4J bindings."

SLF4J: Found binding in [jar:file:/C:/gatling_2.2/lib/logback-classic-1.1.3.jar!
/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/gatling_2.2/lib/logback-classic-1.1.7.jar!
/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

Henri Tremblay

unread,
Jul 5, 2016, 5:12:55 PM7/5/16
to Gatling User Group
Which version of gatling are you using? Are you sure you didn't mix two of them in the same directory?

Because only logback 1.1.7 should be in your lib directory when unzipping the official bundle.

Zoé Thivet

unread,
May 23, 2018, 12:10:27 AM5/23/18
to Gatling User Group
Hi,

I ran into the same problem and solved it by adding an exclusion in the jmxtrans dependency:

<dependency>
<groupId>org.jmxtrans</groupId>
<artifactId>jmxtrans</artifactId>
<version>263</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>

Cheerio,

Zoé
Message has been deleted

danny

unread,
May 29, 2018, 11:30:00 AM5/29/18
to Gatling User Group
for sbt this is my config...had the same issue....had to decide on using the logback provided by gatling over slf4j

lazy val root = (project in file(".")).enablePlugins(PlayJava,GatlingPlugin).disablePlugins(PlayLogback).settings(inConfig(Gatling)(Defaults.testSettings): _*)
scalaSource in Gatling := baseDirectory.value / "funcSpecTests"
resourceDirectory in Gatling := baseDirectory.value / "funcSpecTests/resources"

scalaVersion := "2.11.8"

libraryDependencies ++= Seq(

"org.asynchttpclient" % "async-http-client" % "2.0.39" % "test",
"io.netty" % "netty-all" % "4.0.51.Final" % "test"
).map(_.exclude("org.slf4j", "slf4j-log4j12"))


libraryDependencies += "io.gatling.highcharts" % "gatling-charts-highcharts" % "2.2.5" % "test,it"
libraryDependencies += "io.gatling" % "gatling-test-framework" % "2.2.5" % "test,it"
Reply all
Reply to author
Forward
0 new messages