Even if Class.forName would work correctly there would still
be a problem. We need to seperate the loading of the log4j
configuration into two phases to correspond to the two phases
of loading the boot classes and then loading the remaining classes
for the given server configuration.

xxxxxxxxxxxxxxxxxxxxxxxx
Scott Stark
Chief Technology Officer
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx
----- Original Message -----
From: "Jason Dillon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Scott M Stark"
<[EMAIL PROTECTED]>
Sent: Monday, May 20, 2002 8:28 PM
Subject: Re: [JBoss-dev] log4j.jar appender loading


A custom DOMConfigurator would be easier, but will only fix this specific
problem...  and I am sure that this will popup again for some other reason.

If we can make a tiny and intelligent wrapper to use instead of
URLClassLoader
for ServerLoader, which will use the default URLClassLoader behavior until
the UCL repository is up, then switches to using it... it might work, but I
am not sure what the full implications of that would be.

What we really need is a way to change the system classloader... so that
code
that uses Class.forName() will work correctly.  But I expect that changes of
that happening are close to nil...

--jason


On Tuesday 21 May 2002 11:16 pm, Scott M Stark wrote:
> Inclusion of log4j.jar in the ServerLoader bootclasspath breaks
> loading of unbundled classes used by appenders such as the JavaMail
> classes since the DOMConfigurator used Class.forName to load appenders,
> etc. Either the class loader created by the ServerLoader needs to be a
> custom
> subclass that dynamcically integrates with the UCL loader repository when
> available, or we need to subclass org.apache.log4j.xml.DOMConfigurator and
> override the parseXXX methods to use the TCL.
>
> log4j: Attaching appender named [ErrorNotifications] to appender named
> [ASYNCH].
> log4j: Class name: [org.apache.log4j.net.SMTPAppender]
> java.lang.NoClassDefFoundError: javax/mail/Multipart
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:115)
>         at
>
org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:159
>) at
>
org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurato
>r .java:144)
>         at
>
org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:196
>) at
>
org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurato
>r .java:144)
>         at
>
org.apache.log4j.xml.DOMConfigurator.parseChildrenOfCategoryElement(DOMConf
>i gurator.java:361)
>         at
> org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:330)
>         at
> org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:693)
>         at
> org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:593)
>         at
> org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:545)
>         at
> org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:615)
>         at
>
org.jboss.logging.Log4jService$URLWatchTimerTask.reconfigure(Log4jService.j
>a va:488)
>         at
> org.jboss.logging.Log4jService$URLWatchTimerTask.run(Log4jService.jav
> a:437)
>         at java.util.TimerThread.mainLoop(Timer.java:430)
>         at java.util.TimerThread.run(Timer.java:380)
>
> xxxxxxxxxxxxxxxxxxxxxxxx
> Scott Stark
> Chief Technology Officer
> JBoss Group, LLC
> xxxxxxxxxxxxxxxxxxxxxxxx
>
>
> _______________________________________________________________
>
> 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



_______________________________________________________________

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