How to use SLF4J in Wildfly JMS client?
<p>I wrote a simple JMS 2.0 client that is based on the Wildfly 10 JMS client libraries. When using SLF4J I get the following well-known error message:</p>

<pre><code>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.
</code></pre>

<p>This usually indicates that a SLF4J bridge is missing. I observed that the maven dependency <code>wilfly-jms-client-bom:10.0.0.0.Final</code> also includes the dependencies <code>slf4j-api:1.7.7.jbossorg-1</code> and <code>jcl-over-slf4j:1.7.7.jbossorg-1</code>. Although these dependencies should find their way to the classpath I get the before mentioned error.</p>

<p>SLFJ is also used by Wildfly components. My problem originated in a JNDI lookup for the remote JMS connection factory </p>

<pre><code>ConnectionFactory connectionFactory = 
  (ConnectionFactory) namingContext.lookup("jms/RemoteConnectionFactory");
</code></pre>

<p>The described behavior can also be observed in the Wildfly quick starter example <a href="https://github.com/sgilda/wildfly-quickstart/tree/master/helloworld-jms" rel="nofollow">helloworld-jms</a>.</p>

<p>Below you can find the program and the corresponding <code>pom.xml</code> that reproduces the error (the complete maven project can be downloaded from <a href="http://1drv.ms/1QuNgeF" rel="nofollow">here</a>).</p>

<pre><code>public class JmsClient {

  public static void main(String[] args) {
    org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(JmsClient.class);
    logger.trace("Hello");
  }
}
</code></pre>

<p>pom.xml:</p>

<pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;

    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;samples-jms&lt;/groupId&gt;
    &lt;artifactId&gt;hello-jms&lt;/artifactId&gt;
    &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
    &lt;packaging&gt;jar&lt;/packaging&gt;

    &lt;properties&gt;
        &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
        &lt;version.wildfly&gt;10.0.0.Final&lt;/version.wildfly&gt;
        &lt;version.wildfly.maven.plugin&gt;1.0.2.Final&lt;/version.wildfly.maven.plugin&gt;
        &lt;version.jar.plugin&gt;2.2&lt;/version.jar.plugin&gt;
        &lt;version.exec.plugin&gt;1.2.1&lt;/version.exec.plugin&gt;

        &lt;maven.compiler.target&gt;1.8&lt;/maven.compiler.target&gt;
        &lt;maven.compiler.source&gt;1.8&lt;/maven.compiler.source&gt;
    &lt;/properties&gt;

    &lt;dependencies&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.wildfly&lt;/groupId&gt;
            &lt;artifactId&gt;wildfly-jms-client-bom&lt;/artifactId&gt;
            &lt;version&gt;${version.wildfly}&lt;/version&gt;
            &lt;type&gt;pom&lt;/type&gt;
        &lt;/dependency&gt;
    &lt;/dependencies&gt;

    &lt;build&gt;
        &lt;finalName&gt;${project.artifactId}&lt;/finalName&gt;
        &lt;plugins&gt;
            &lt;plugin&gt;
                &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
                &lt;version&gt;${version.exec.plugin}&lt;/version&gt;
                &lt;configuration&gt;
                    &lt;mainClass&gt;samples.jms.JmsClient&lt;/mainClass&gt;
                &lt;/configuration&gt;
            &lt;/plugin&gt;
            &lt;plugin&gt;
                &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
                &lt;version&gt;${version.jar.plugin}&lt;/version&gt;
                &lt;configuration&gt;
                &lt;/configuration&gt;
            &lt;/plugin&gt;
            &lt;plugin&gt;
                &lt;groupId&gt;org.wildfly.plugins&lt;/groupId&gt;
                &lt;artifactId&gt;wildfly-maven-plugin&lt;/artifactId&gt;
                &lt;version&gt;${version.wildfly.maven.plugin}&lt;/version&gt;
            &lt;/plugin&gt;
        &lt;/plugins&gt;
    &lt;/build&gt;
&lt;/project&gt;
</code></pre>