Facelets 'loadImplicit' error

From Shrubbery

Jump to: navigation, search


One annoying thing about using Facelets with SEAM/EJB3/JBoss is that there are some strange 'ERROR' log messages that happen when the first page is hit. They look something like this:

07:38:26,843 ERROR \[STDERR\] Nov 29, 2006 7:38:26 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from: jar:file:/C:/java/jboss-4.0.5.GA-ejb3/server/default/./tmp/deploy/tmp64384starter1.ear-contents/webapp-exp.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-ui.taglib.xml

So, I've finally figured out what this means. Basically, the Facelets compiler is emitting the message to System.err, which JBoss's Log4J setup interprets as an error level log message. I think that's a reasonable assumption to make with Log4J.

If java.util.logging were a pet dog I'd say: Bad logging! Bad! Nnno!

The folks at Sun should know better than to write to System.err, especially if the message is not an error. Perhaps the JDK logging can be tweaked to make this work better, but still... highly annoying.

Contents

JBoss Seam 2.1 Solution

The Seam folks have fixed this annoyance in Seam 2.1: http://jira.jboss.org/jira/browse/JBSEAM-2750

Solution #1

This is the simplest: Ignore the messages. They are only errors because ConsoleHandler writes log messages to System.err (dodgy) and the JBoss logging framework interprets them as errors, redirecting the messages as ERROR level (understandable).

One other idea is shown in this email. Just set the level of STDERR to FATAL:

<category name="STDERR">
       <priority value="FATAL"/>
</category>

Solution #2

Use a different logging handler by using a different java.util.logging (a.k.a. JULI) configuration. See Routing java.util.logging messages to Log4J.

Solution #3

Use a ContextListener to reconfigure JULI to send logging messages to Log4J. This works really nicely in JBoss AS4 as a JMX MBean, and this guy seems to think it works well too.  :)

Personal tools