0

With the following Maven dependency for Htmlunit,

<dependency>
    <groupId>net.sourceforge.htmlunit</groupId>
    <artifactId>htmlunit</artifactId>
    <version>2.18</version>
</dependency> 

I am getting the following error,

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/mnkb/.m2/repository/ch/qos/logback/logback-classic/1.1.3/logback-classic-1.1.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/mnkb/.m2/repository/org/apache/activemq/activemq-all/5.12.0/activemq-all-5.12.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]

In my pom.xml, I have even commented out the following dependency,

<!-- <dependency>
            <groupId>com.mattbertolini</groupId>
            <artifactId>liquibase-slf4j</artifactId>
            <version>${liquibase-slf4j.version}</version>
        </dependency> -->
Ahmed Ashour
  • 5,179
  • 10
  • 35
  • 56
smart987
  • 834
  • 2
  • 14
  • 34
  • you can refere my pom.xml at the SO post, http://stackoverflow.com/questions/33581831/unable-to-run-htmlunit-application-using-maven-dependency/33603254#33603254. I am using that same pom.xml, but now I am getting slf4j error. – smart987 Nov 09 '15 at 18:42

1 Answers1

0

The activemq-all dependency seems to be an uberjar that contains slf4j. Some other dependency seems to pull in slf4j as well. That's why you get this error. If you can try to get rid of the activemq-all dependency, maybe by using activemq-core. Seems to be an issue with ActiveMQ's packaging (see https://issues.apache.org/jira/browse/AMQ-5009).

Jan Thomä
  • 13,296
  • 6
  • 55
  • 83