ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | architecture List | October 2004 Index

<--  Date Index  --> <--  Thread Index  -->

ClassCastException in log4j.MonologLoggerFactory.getLogger


Hello,

I am trying to send messages to a Joram server from a session bean located in 
JBoss. JBoss 4.0 uses Log4J 1.2.8 for logging. 

When I access to Joram JNDI registry from my Session bean I get a 
ClassCastException:
Caused by: java.lang.ExceptionInInitializerError
at 
fr.dyade.aaa.jndi2.client.NamingContextFactory.getInitialContext(NamingContextFactory.java:57)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at MySessionBean.sendDirectMessage(MySessionBean.java:129)
(...)
Caused by: java.lang.ClassCastException
at 
org.objectweb.util.monolog.wrapper.log4j.MonologLoggerFactory.getLogger(MonologLoggerFactory.java:205)
at fr.dyade.aaa.util.Debug.getLogger(Debug.java:139)
at fr.dyade.aaa.jndi2.client.Trace.<clinit>(Trace.java:34)
 .. 46 more

I have found in this mailing list archives that I should add 
log4j.loggerFactory=org.objectweb.util.monolog.wrapper.log4j.MonologCategoryFactory
in the log4j configuration file, so I added a 
<categoryFactory 
class="org.objectweb.util.monolog.wrapper.log4j.MonologCategoryFactory"/> 
tag in the log4j.xml of JBoss, but I still get a ClassCastException.

I replaced Joram's Monolog Jar(release 1.7.2) by the newest one: 1.8 but it 
doesn't help either, still the same ClassCastException as above.

What can I do?
Gerald


PS: Here is my Monolog configuration file a3debug.cfg:
log.config.classname 
org.objectweb.util.monolog.wrapper.log4j.MonologLoggerFactory
handler.tty.type Console
handler.tty.output System.out
handler.tty.pattern  %d : %O{1}.%M : %m%n
logger.fr.dyade.aaa.handler.0 tty
logger.fr.dyade.aaa.level ERROR
logger.org.objectweb.joram.handler.0 tty
logger.org.objectweb.joram.level ERRORnull

Forfait AOL ADSL 5 Méga à 22.90EUR/mois



<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.