Question: I am using querydsl (which depends on sl4j-api 1.6) and arquillian-persistence-api (which depends on slf4j-jdk14 1.5.6).
If I ignore in maven the older version 1.5.6 I get the following message on JBoss

`SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".  

SLF4J: Defaulting to no-operation (NOP) logger implementation  

SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.`

I am using arquillian with managed JBoss AS 7.1 for testing (Maven downloads the version from maven central and run the tests).
I am also using arquillian persistence api.

What should I do to correct the given warning? I mean which dependency should I keep or how would I allow both to work properly?

I suppose this is why I am not getting any error messages on arquillian persistence api failure (because the logger is not working?).

Answer: 
The message you are seeing is a warning, not an error. It means SLF4J is selecting a binding for you because you've not chosen one yourself. The default binding simply discards all log messages, which is not very useful.

If you have conflicting versions in Maven, normally it's safer to force the newer version. Libraries are *often* backwards compatible.

So, stick with your newer version of `slf4j-api` and just ensure you declare a binding as a dependency, e.g. `slf4j-jdk14`. If you are producing a library, ensure your binding is declared with `test` scope only.
First of all. Regarding the dependencies.

In order to add SLF4J you must put **ONE** and only **ONE** of these dependencies in your pom.xml. It depends on what implementation you choose to use. Every dependency you add in the pom.xml is added automatically in the classpath. If one of the below dependencies are provided by another dependency then you can omit it. Dont forget that you must include only one even if the dependency is provided by another dependency.

```xml
<dependency>
   <groupId>ch.qos.logback</groupId>
   <artifactId>logback-classic</artifactId>
   <version></version>
</dependency>

```

```xml
<dependency>
   <groupId>org.slf4j</groupId>
   <artifactId>slf4j-simple</artifactId>
   <version></version>
   <scope>compile</scope>
</dependency>

```

```xml
<dependency>
   <groupId>org.slf4j</groupId>
   <artifactId>log4j-over-slf4j</artifactId>
   <version></version>
   <scope>compile</scope>
</dependency>

```

```xml
<dependency>
   <groupId>org.slf4j</groupId>
   <artifactId>slf4j-jdk14</artifactId>
   <version></version>
   <scope>compile</scope>
</dependency>

```

Now regarding the annoying error you are getting when building your maven project. If after having only one of the above dependencies you still get the SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". then you are facing a bug from m2e. 

Eclipse Juno and Indigo, when using the bundled maven version(m2e), are not suppressing the message SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". This behaviour is present from the m2e version 1.1.0.20120530-0009 and onwards. 

Although, this is indicated as an error your logs will be saved normally. The highlighted error will still be present until there is a fix of this bug. More about this in the [m2e support site](https://bugs.eclipse.org/bugs/show_bug.cgi?id=387064).

The current available solution is to use an external maven version rather than the bundled version of Eclipse. You can find about this solution and more details regarding this bug in the question below which i think describes the same problem you are facing.

[SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". error](https://stackoverflow.com/questions/11916706/slf4j-failed-to-load-class-org-slf4j-impl-staticloggerbinder-error)