[JBoss Microcontainer] - How to ignore specific WEB-INF/lib jars
by Stephen Coy
Stephen Coy [https://community.jboss.org/people/sfcoy] created the discussion
"How to ignore specific WEB-INF/lib jars"
To view the discussion, visit: https://community.jboss.org/message/649879#649879
--------------------------------------------------------------
Hi there,
I've been rummaging around here for a few hours trying to figure this out.
We have a web application that has been developed as a "universal" WAR file. This means that the same WAR must deploy and run on the three application servers that we support, including JBoss 5.1.
This webapp contains both a log4j implementation and an slf4j implementation. This results in the following errors when the application is started:
2012-02-01 17:30:08,327 ERROR [STDERR] (HDScanner) log4j:ERROR A "org.jboss.logging.appender.FileAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
2012-02-01 17:30:08,329 ERROR [STDERR] (HDScanner) log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
2012-02-01 17:30:08,330 ERROR [STDERR] (HDScanner) log4j:ERROR [BaseClassLoader@447d0c6c{vfszip:/Users/steve/servers/jboss-eap-5.1.1/server/axelerator-platform/deploy/axelerator-platform-mr-web-12.1.1-SNAPSHOT.war/}] whereas object of type
2012-02-01 17:30:08,331 ERROR [STDERR] (HDScanner) log4j:ERROR "org.jboss.logging.appender.FileAppender" was loaded by [org.jboss.bootstrap.NoAnnotationURLClassLoader@7bd63e39].
2012-02-01 17:30:08,332 ERROR [STDERR] (HDScanner) log4j:ERROR Could not instantiate appender named "FILE".
2012-02-01 17:30:08,361 ERROR [STDERR] (HDScanner) SLF4J: Class path contains multiple SLF4J bindings.
2012-02-01 17:30:08,362 ERROR [STDERR] (HDScanner) SLF4J: Found binding in [vfszip:/Users/steve/servers/jboss-eap-5.1.1/common/lib/slf4j-jboss-logging.jar/org/slf4j/impl/StaticLoggerBinder.class]
2012-02-01 17:30:08,364 ERROR [STDERR] (HDScanner) SLF4J: Found binding in [vfszip:/Users/steve/servers/jboss-eap-5.1.1/server/axelerator-platform/deploy/axelerator-platform-mr-web-12.1.1-SNAPSHOT.war/WEB-INF/lib/slf4j-jdk14-1.5.8.jar/org/slf4j/impl/StaticLoggerBinder.class]
We prefer to use the JBoss provided implementations of these as this simplifies logging configuration for administrators.
Therefore, I'd like to know if it's possible to filter out these two jars from the classloader so that they're effectively ignored in our JBoss deployment.
And if so, how do we go about it?
Thanks
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/649879#649879]
Start a new discussion in JBoss Microcontainer at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 11 months