I am facing some problems trying to load libs from my application instead of what comes with JBoss.
I try to use the latest and best SLF4J in my application, and in doing so I get the following messages:
SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [vfszip:/C:/devtools/workspace/g2/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server1302541739184/deploy/ecotrakEar.ear/ecotrak.war/WEB-INF/lib/slf4j-log4j12-1.6.1.jar/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [vfszip:/C:/devtools/jboss-5.1.0.GA/common/lib/slf4j-jboss-logging.jar/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html
In my application, I have the following banks located in my WAR lib directory:
- July to SLF4J-1.6.1.jar
- SLF4J-api-1.6.1.jar
- SLF4J-log4j12-1.6.1.jar
My project is being deployed as an EAR with WAR. All libraries are in WAR.
Based on some research, it was suggested that a jboss-classloading.xml file is created for JBoss 5.1. I created one for my EAR:
<classloading xmlns="urn:jboss:classloading:1.0" name="ecotrak.ear" domain="ecotrak.ear" export-all="NON_EMPTY" import-all="true" parent-first="false"> </classloading>
This means that the EAR file is loaded first.
I also created one for my WAR:
<classloading xmlns="urn:jboss:classloading:1.0" name="ecotrak.war" domain="ecotrak.war" parent-domain="ecotrak.ear" top-level-classloader="true" export-all="NON_EMPTY" import-all="true" parent-first="true"> </classloading>
In this configuration, I get the following error in the startup logs:
11:18:07,949 ERROR [[/ecotrak]] Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V at org.apache.commons.logging.impl.SLF4JLocationAwareLog.trace(SLF4JLocationAwareLog.java:107)
What is the correct way to load jars from my project to JBoss?
source share