logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Olli Blackburn" <Olli.Blackb...@borland.com>
Subject RE: Problems with DOMConfigurator and WebLogic 6.1 SP4
Date Tue, 06 Jan 2004 15:55:23 GMT
Try file:///home/anguyen/applications/myapp/WEB-INF/classes/log4j.xml

Olli

> -----Original Message-----
> From: anguyen@itginc.com [mailto:anguyen@itginc.com] 
> Sent: Tuesday, January 06, 2004 6:58 AM
> To: Log4J Users List
> Subject: RE: Problems with DOMConfigurator and WebLogic 6.1 SP4
> 
> 
> 
> I don't think that's the case.  According to the console 
> output, log4j is picking up the correct XML config file:
> 
> "log4j: Using URL 
> [file:/home/anguyen/applications/myapp//WEB-INF/classes/log4j.
> xml] for automatic log4j configuration."
> 
> That message is in the console output when I use 
> -Dlog4j.debug.  The URL is pointing to the correct log4j.xml 
> file.  Any other thoughts?
> 
> Andy Nguyen
> 
> 
> 
> 
> 
> <ravindra.gupta@iflexsolutions.com> on 01/06/2004 12:06:44 AM
> 
> Please respond to "Log4J Users List" <log4j-user@logging.apache.org>
> 
> To:    <log4j-user@logging.apache.org>
> cc:
> 
> Subject:    RE: Problems with DOMConfigurator and WebLogic 6.1 SP4
> 
> Andy ,
> seems that its not getting  path of XML config file ,hence 
> when DOMConfigurator tries to load it , it fails , check 
> whether the System properties are set properly or not .
> 
> 
> -----Original Message-----
> From: anguyen@itginc.com [mailto:anguyen@itginc.com]
> Sent: Tuesday, January 06, 2004 2:08 AM
> To: log4j-user@logging.apache.org
> Subject: Problems with DOMConfigurator and WebLogic 6.1 SP4
> 
> 
> I am using log4j 1.2.7 with a web application under WebLogic 
> 6.1 sp4.  I just recently switched from using 
> log4j.properties to log4j.xml in order to use an asynchronous 
> appender.  I'm running into a problem that I hope someone on 
> this list can help me with.
> 
> The first class that accesses log4j is a 
> ServletContextListener.  My getLogger call is failing:
> 
> private static final Logger log = 
> Logger.getLogger(MyServletContextListener.class);
> 
> I've turned on log4j.debug, and here's what I get in my 
> console output:
> 
> --BEGIN CONSOLE OUTPUT--
> log4j: Trying to find [log4j.xml] using context classloader 
> sun.misc.Launcher$AppClassLoader@3f52a5.
> log4j: Trying to find [log4j.xml] using 
> weblogic.utils.classloaders.ChangeAwareClassLoader@3f61a0 
> finder: weblogic.utils.classloaders.MultiClassFinder@596138 
> class loader.
> log4j: Using URL 
> [file:/home/anguyen/applications/myapp//WEB-INF/classes/log4j.
> xml] for automatic log4j configuration.
> log4j: Preferred configurator class: 
> org.apache.log4j.xml.DOMConfigurator
> log4j: System property is :null
> java.lang.ExceptionInInitializerError: 
> java.lang.ClassCastException: 
> weblogic.xml.jaxp.RegistryDocumentBuilderFactory
>         at 
> javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown
> Source)
>         at
> org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurat
> or.java:644)
>         at
> org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurat
> or.java:616)
>         at
> org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurat
> or.java:602)
>         at
> org.apache.log4j.helpers.OptionConverter.selectAndConfigure(Op
> tionConverter.java:460)
> 
>         at org.apache.log4j.LogManager.<clinit>(LogManager.java:113)
>         at org.apache.log4j.Logger.getLogger(Logger.java:94)
>         at
> com.itgssi.MyServletContextListener.<clinit>(MyServletContextL
> istener.java:35)
> 
>         at java.lang.Class.newInstance0(Native Method)
>         at java.lang.Class.newInstance(Class.java:237)
>         at
> weblogic.servlet.internal.WebAppServletContext.registerEventLi
> stener(WebAppServletContext.java:1997)
> 
>         at
> weblogic.servlet.internal.WebAppServletContext.initFromDescrip
> tors(WebAppServletContext.java:1444)
> 
>         at
> weblogic.servlet.internal.WebAppServletContext.init(WebAppServ
> letContext.java:940)
> 
>         at
> weblogic.servlet.internal.WebAppServletContext.<init>(WebAppSe
> rvletContext.java:875)
> 
>         at
> weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:503)
>         at 
> weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:77)
>         at 
> weblogic.j2ee.Application.addComponent(Application.java:174)
>         at 
> weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
>         at
> weblogic.management.mbeans.custom.DeploymentTarget.addDeployme
> nt(DeploymentTarget.java:364)
> 
>         at
> weblogic.management.mbeans.custom.DeploymentTarget.addDeployme
> nt(DeploymentTarget.java:150)
> 
>         at
> weblogic.management.mbeans.custom.WebServer.addWebDeployment(W
> ebServer.java:76)
> 
> [rest of stack trace removed for brevity]
> 
> --END CONSOLE OUTPUT--
> 
> I have placed log4j.xml in WEB-INF/classes and log4j.jar in 
> WEB-INF/lib.  I think I'm running into a class loader issue, 
> but I'm not sure.  I do have a newer version of xerces in my 
> WEB-INF/lib than what comes with WebLogic, and I think this 
> is causing the CCE.  I tried specifying 
> -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.j
> axp.DocumentBuilderFactoryImpl,
> 
>  but all this did was change the CCE message to 
> "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl".  My 
> guess is that DOMConfigurator is expecting 
> DocumentBuilderFactory.newInstance to return a 
> DocumentBuilderFactory loaded from the webapp class loader, 
> but xerces uses the system class loader when 
> locating/instantiating the DocumentBuilderFactory.  Has 
> anyone experienced this behavior?  Any clues no how I can get 
> around this?  Any help is appreciated.
> 
> Regards,
> 
> Andy Nguyen
> 
> 
> 
> 
> 
> 
> 
> -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> -+-+-+-+-+-+-
> "This message is for the named person's use only. This 
> communication is for
> 
> informational purposes only and has been obtained from 
> sources believed to be reliable, but it is not necessarily 
> complete and its accuracy cannot be guaranteed. It is not 
> intended as an offer or solicitation for the purchase or sale 
> of any financial instrument or as an official confirmation of 
> any transaction. Moreover, this material should not be 
> construed to contain any recommendation regarding, or opinion 
> concerning, any security. It may contain confidential, 
> proprietary or legally privileged information. No 
> confidentiality or privilege is waived or lost by any 
> mistransmission. If you receive this message in error, please 
> immediately delete it and all copies of it from your system, 
> destroy any hard copies of it and notify the sender. You must 
> not, directly or indirectly, use, disclose, distribute, 
> print, or copy any part of this message if you are not the 
> intended recipient.  Any views expressed in this message are 
> those of the individual sender, except where the message 
> states otherwise and the sender is authorized to state them 
> to be the views of any such entity.
> 
> ITG Inc. reserves the right to monitor and archive all 
> electronic communications through its network.
> -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> -+-+-+-+-+-+-
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 
> 
> DISCLAIMER:
> This message contains privileged and confidential information 
> and is intended only for the individual named.If you are not 
> the intended recipient you should not 
> disseminate,distribute,store,print, copy or deliver this 
> message.Please notify the sender immediately by e-mail if you 
> have received this e-mail by mistake and delete this e-mail 
> from your system.E-mail transmission cannot be guaranteed to 
> be secure or error-free as information could be 
> intercepted,corrupted,lost,destroyed,arrive late or 
> incomplete or contain viruses.The sender therefore does not 
> accept liability for any errors or omissions in the contents 
> of this message which arise as a result of e-mail 
> transmission. If verification is required please request a 
> hard-copy version.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> -+-+-+-+-+-+-
> "This message is for the named person's use only. This 
> communication is for 
> informational purposes only and has been obtained from 
> sources believed to 
> be reliable, but it is not necessarily complete and its 
> accuracy cannot be 
> guaranteed. It is not intended as an offer or solicitation 
> for the purchase or sale of any financial instrument or as an 
> official confirmation of any transaction. Moreover, this 
> material should not be construed to contain any 
> recommendation regarding, or opinion concerning, any 
> security. It may contain confidential, proprietary or legally 
> privileged information. No confidentiality or privilege is 
> waived or lost by any mistransmission. If you receive this 
> message in error, please immediately delete it and all copies 
> of it from your system, destroy any hard copies of it and 
> notify the sender. You must not, directly or indirectly, use, 
> disclose, distribute, 
> print, or copy any part of this message if you are not the intended 
> recipient.  Any views expressed in this message are those of 
> the individual sender, except where the message states 
> otherwise and the sender is 
> authorized to state them to be the views of any such entity.
> 
> ITG Inc. reserves the right to monitor and archive all electronic 
> communications through its network. 
> -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> -+-+-+-+-+-+-
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message