Ok, I understand more now... though you know that log4j.properties is going to 
be used even before ServerImpl gets created right...

It looks like the UCL bits should be operable at the time when Log4jService is 
created... the TCL is set right before it is started.  But I would guess 
(since I am not a CL expert) that since we have not processed the classpath 
element from jboss-service.xml, we have not populated the UCL repo with 
anything useful, short of the conf directory (as set by 
ServerImpl.initBootLibraries()).

If there were UCL's for each registered boot library, would the UCL be used, 
or would the URLCL be used?

If the UCL will be used, then what problems would arise if we either installed 
a UCL for each URLCL, or rather than using a URLCL, use a boot strap UCL, 
which will only load the required boot classes from the URLCL, then once the 
repo is active will force all classes to go through it.  This will mean that 
classes loaded on the URLCL will be serialized right... but we don't really 
care too much about that.

If the above makes sence, then I think it would be worth the effort to 
implement that rather than add to the logging configuration complexity... but 
I am not sure if the above will work.

--jason


On Wednesday 22 May 2002 02:43 pm, Scott M Stark wrote:
> Yes log4j.xml is being used because the Log4jService is created by
> the ServerImpl:
>
> ServerImpl.java:
>       // Setup logging
>       server.createMBean("org.jboss.logging.Log4jService", null);
>       log.debug("Logging has been initialized");
>
> and when JMX calls preRegister the Log4jService is calling its create
> and start which use the configURL==log4j.xml by default.
>
> Log4jService.java:
>    public ObjectName preRegister(MBeanServer server, ObjectName name)
>       throws Exception
>    {
>       name = super.preRegister(server, name);
>       create();
>       start();
>       return name;
>    }
>
> This is what this stack trace shows. I created a patched version of
> DOMConfigurator
> and it is being called to parse the log4j.xml file during the boot
> sequence:
>
> log4j: Attaching appender named [ErrorNotifications] to appender named
> [ASYNCH].
>
> log4j: Class name: [org.apache.log4j.net.SMTPAppender]
> [WARN,BasicMBeanRegistry] preRegister() failed for null:
> java.lang.NoClassDefFoundError: javax/mail/Multipart
>         at java.lang.Class.newInstance0(Native Method)
>         at java.lang.Class.newInstance(Class.java:232)
>         at
> org.jboss.logging.DOMConfigurator.parseAppender(DOMConfigurator.java:162)
>         at
> org.jboss.logging.DOMConfigurator.findAppenderByReference(DOMConfigurator.j
>a va:146)
>         at
> org.jboss.logging.DOMConfigurator.parseAppender(DOMConfigurator.java:199)
>         at
> org.jboss.logging.DOMConfigurator.findAppenderByReference(DOMConfigurator.j
>a va:146)
>         at
> org.jboss.logging.DOMConfigurator.parseChildrenOfCategoryElement(DOMConfigu
>r ator.java:365)
>         at
> org.jboss.logging.DOMConfigurator.parseRoot(DOMConfigurator.java:334)
>
>         at
> org.jboss.logging.DOMConfigurator.parse(DOMConfigurator.java:699) at
> org.jboss.logging.DOMConfigurator.doConfigure(DOMConfigurator.java:599)
>         at
> org.jboss.logging.DOMConfigurator.doConfigure(DOMConfigurator.java:551)
>         at
> org.jboss.logging.DOMConfigurator.configure(DOMConfigurator.java:621)
>         at
> org.jboss.logging.Log4jService$URLWatchTimerTask.reconfigure(Log4jService.j
>a va:487)
>         at
> org.jboss.logging.Log4jService$URLWatchTimerTask.run(Log4jService.java:436)
>         at
> org.jboss.logging.Log4jService.startService(Log4jService.java:280)
>         at
> org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:162)
>         at
> org.jboss.logging.Log4jService.preRegister(Log4jService.java:361) at
> org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanReg
>i stry.java:197)
>         at
> org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:949)
>         at
> org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:247)
>         at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:263)
>         at org.jboss.system.server.ServerImpl.start(ServerImpl.java:216)
>         at org.jboss.Main.boot(Main.java:142)
>         at org.jboss.Main$1.run(Main.java:375)
>         at java.lang.Thread.run(Thread.java:479)
> [INFO,Log4jService] Registration is not done -> destroy
>
>
> ----- Original Message -----
> From: "Jason Dillon" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; "Scott M Stark"
> <[EMAIL PROTECTED]>
> Sent: Tuesday, May 21, 2002 10:29 AM
> Subject: Re: [JBoss-dev] Going to log4j 1.2.2 for 3.x
>
>
> I am still confused about this... for boot, log4j.xml is not used,
> log4j.properties are used.  Can you explain... I am a little slow after
> spending several days in corporate code =|
>
> --jason
>
>
>
>
>
>
> _______________________________________________________________
>
> Don't miss the 2002 Sprint PCS Application Developer's Conference
> August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
>
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to