I have placed a WAR in an EAR and defined jboss-app.xml in order to run a WAR
in a separate classloader. As far as I can tell it is working, and logging is
working fine for the application, but... on the first call to log4j I get an
exception that has no obvious effect afterwards, but it is annoying. Can
someone help me identify what is missing?
DETAILS:
1) Exception:
10:41:58,538 INFO [STDOUT] log4j:ERROR A
org.jboss.logging.util.OnlyOnceErrorHandler" object is not assignable to a
"org.apache.log4j.spi.ErrorHandler" variable.
10:41:58,538 INFO [STDOUT] log4j:ERROR The class
org.apache.log4j.spi.ErrorHandler" was loaded by
10:41:58,538 INFO [STDOUT] log4j:ERROR [EMAIL PROTECTED]
rl=file:/C:/jboss-3.2.6/server/default/tmp/deploy/tmp62837lp.ear
,addedOrder=35}] whereas object of type
10:41:58,553 INFO [STDOUT] log4j:ERROR
"org.jboss.logging.util.OnlyOnceErrorHandler" was loaded by [EMAIL PROTECTED]
10:41:58,569 INFO [STDOUT] log4j:ERROR Could not create an Appender. Reported
error follows.
10:41:58,569 INFO [STDOUT] java.lang.ClassCastException
10:41:58,584 INFO [STDOUT] at
org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:165)
2) Calling method: PropertyConfigurator.configure(log4jProp);
where log4jProp is a Properties object loaded from a log4j.properties file, and
the method is called in an initialization servlet.
3) application.xml, jboss-app.xml, log4j.properties, and log4j.jar are in the
EAR.
4) application.xml contains (beside DOCTYPE):
< application id="Application_ID" >
<display-name>Lesson Plan Manager</display-name>
< module >
< web >
<web-uri>lp.war</web-uri>
<context-root>lp</context-root>
< /web >
< /module >
< /application >
5) jboss-app contains:
<jboss-app>
<loader-repository>
lp.com:loader=lp.ear
<loader-repository-config>
java2ParentDelegation=false
</loader-repository-config>
</loader-repository>
</jboss-app>
6) log4j.properties contains (for the console appender - other stuff has no
effect even when commented):
log4j.rootLogger=INFO, C
log4j.appender.C=org.apache.log4j.ConsoleAppender
log4j.appender.C.layout=org.apache.log4j.PatternLayout
log4j.appender.C.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p
[%C{1}.%M,%L] %m%n
Thanks.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3867464#3867464
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3867464
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user