Following errors related to SLF4J are seen in the server.log file.
Errors are mostly seen in an environment that has been migrated from JBoss 7.2 to 7.4. There are no reports of this error on a clean installtion of JBoss EAP 7.4
15:44:13,792 ERROR [stderr] (ServerService Thread Pool -- 107) SLF4J: Class path contains multiple SLF4J bindings.
15:44:13,793 ERROR [stderr] (ServerService Thread Pool -- 107) SLF4J: Found binding in [vfs:/E:/EAP-7.4.0/standalone/deployments/iam_im.ear/ca-nim-sm.war/WEB-INF/lib/log4j-slf4j-impl-2.2.jar/org/slf4j/impl/StaticLoggerBinder.class]
15:44:13,793 ERROR [stderr] (ServerService Thread Pool -- 107) SLF4J: Found binding in [vfs:/E:/EAP-7.4.0/standalone/deployments/iam_im.ear/library/slf4j-jdk14.jar/org/slf4j/impl/StaticLoggerBinder.class]
15:44:13,793 ERROR [stderr] (ServerService Thread Pool -- 107) SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
15:44:13,795 ERROR [stderr] (ServerService Thread Pool -- 107) SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
IM 14.4 / 14.5
JBoss 7.4
The class StaticLoggerBinder is defined into two jars iam_ear/library as well as ca-nim-sm.war. It is throwing an error because it has some static binding and is trying to load twice.
Errors related to SLF4J are benign and can be ignored.
SLF4J is a simple logging façade for java. It is not a logging component, and even it does not do the actual logging. It is only an abstraction layer to an underlying logging component. In the case of Log4j, it is a logging component, and it does the logging instructed to do.
The class StaticLoggerBinder is defined into two jars iam_ear/library as well as ca-nim-sm.war. It is throwing an error because it has some static binding and is trying to load twice.
Workaround:
You can exclude the CA NIM SM package from the deployment. However, before implementing this solution, please make sure that there are no active integrations with external Service Desk systems and that there is not any such integrations planned in the future.
Should the requirement to integrate with service desk system arise in future, you need to restore the changes described in steps below.
Step 1: Take a back up of application.xml & jboss-deployment-structure.xml file under lcoation %JBOSS_INSTALL_PATH%\standalone\deployments\iam_im.ear\META-INFS
Step 2: Remove the references of CA NIM SM package (comment or delete it) (references as shown below)
application.xml
<module id="CA_NIM_SM">
<web>
<web-uri>ca-nim-sm.war</web-uri>
<context-root>/iam/imnimsm</context-root>
</web>
</module>
jboss-deployment-structure.xml
<sub-deployment name="ca-nim-sm.war">
<exclusions>
<!-- Exclude the ``javaee.api`` module which contains all JEE6 apis-->
<module name="javaee.api" />
</exclusions>
<dependencies>
<!-- Manually add all JEE6-apis except the javax.ws.rs.api, javax.json.api -->
<module name="javax.activation.api" export="true" />
<module name="javax.annotation.api" export="true" />
<module name="javax.batch.api" export="true" />
<module name="javax.ejb.api" export="true" />
<module name="javax.el.api" export="true" />
<module name="javax.enterprise.api" export="true" />
<module name="javax.enterprise.concurrent.api" export="true" />
<module name="javax.inject.api" export="true" />
<module name="javax.interceptor.api" export="true" />
<module name="javax.jms.api" export="true" />
<module name="javax.jws.api" export="true" />
<module name="javax.mail.api" export="true" />
<module name="javax.management.j2ee.api" export="true" />
<module name="javax.persistence.api" export="true" />
<module name="javax.resource.api" export="true" />
<module name="javax.rmi.api" export="true" />
<module name="javax.security.auth.message.api"
export="true" />
<module name="javax.security.jacc.api" export="true" />
<module name="javax.servlet.api" export="true" />
<module name="javax.servlet.jsp.api" export="true" />
<module name="javax.transaction.api" export="true" />
<module name="javax.validation.api" export="true" />
<!-- <module name="javax.ws.rs.api" export="true" services="export"/> -->
<module name="javax.xml.bind.api" export="true" />
<module name="javax.xml.soap.api" export="true" />
<module name="javax.xml.ws.api" export="true" />
<!-- This one always goes last. -->
<module name="javax.api" export="true" />
<!-- Avoid conflict with Xalan Jar in our library dir -->
<module name="org.apache.xalan" />
<!-- Required as part of NIM 3.2 integration -->
<module name="com.sun.xml.messaging.saaj" export="true" />
</dependencies>
</sub-deployment>
Step 3: Save the file and restart the JBoss service.