[jboss-user] [JBoss Microcontainer] - How to ignore specific WEB-INF/lib jars

Stephen Coy do-not-reply at jboss.com
Wed Feb 1 06:21:01 EST 2012

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 at 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 at 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?


Reply to this message by going to Community

Start a new discussion in JBoss Microcontainer at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120201/75a6f9c5/attachment-0001.html 

More information about the jboss-user mailing list