Posts tagged ‘Log4j’

Logs to kill bogus Jboss logs

As from version 4.2.0, JBoss ships with Apache Tomcat 6, which is supposed to be Bug-43079-free. However, a fresh install & run of Jboss 4.2.3 (with a little tweak of log4j settings) still shows the bogus log :

WARN  [org.apache.catalina.deploy.SecurityCollection] Suspicious url pattern: “/restricted/*” – see http://java.sun.com/aboutJava/communityprocess/first/jsr053/servlet23_PFD.pdf  section 11.2

After decompiling the SecurityCollection.class file within jbossweb.jar under $JBOSS_HOME\server\bpm\deploy\jboss-web.deployer, I noticed that the bug stil there


if(pattern.endsWith("*") && pattern.charAt(pattern.length() - 1) != '/' && log.isDebugEnabled())

Not having mauch time to fix, recompile and repackage, here ’s a little workaround using particular log4j setting to send this log to a “/dev/null”-like planet:


<appender name="NULL" class="org.apache.log4j.varia.NullAppender" />
<logger name="org.apache.catalina.deploy.SecurityCollection" additivity="false">
<appender-ref ref="NULL" />
</logger>

Of course, we loose no extra logs information from SecurityCollection class as it only has one (and undesired) logging statement.