slf4j with logback not working with JBoss EAP 6.

Solution Unverified - Updated -

Issue

  • We are having EAR application with slf4j logback and jboss-deployment-structure.xml file but it is not working JBoss EAP6.

Resolution

  • Make sure all the logging libraries should the present in EAR's lib folder and the jboss-deployment-structure.xml in the ear's META-INF folder.
  • The jboss-deployment-structure.xml file would be like :
<jboss-deployment-structure>
    <deployment>
        <exclusions>
            <module name='org.slf4j' />
            <module name='org.slf4j.impl' />
        </exclusions>
    </deployment>
    <sub-deployment name="Sample.jar">
        <exclusions>
            <module name='org.slf4j' />
            <module name='org.slf4j.impl' />
        </exclusions>
    </sub-deployment>
</jboss-deployment-structure>

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments