I've managed to solve this problem.

The problem was that I had the log4j.jar file in the weblogic java classpath
(as defined in the startWeblogic.cmd file) as well as the application
classpath.  I believe that this fixed the problem.  

Make sure that the log4j.jar file is in the java classpath and that it is
NOT in the web-inf/lib directory of your webapp.

Cheers

Geoff

-----Original Message-----
From: Ashton Vaz [mailto:[EMAIL PROTECTED]]
Sent: Friday, 9 February 2001 9:24
To: LOG4J Users Mailing List
Subject: RE: Help using DOMConfigurator


Ceki, Geoff,

    Here's a stack trace with log4j debugging turned on that might shed
some additional information.  Using a sub-class for category I've output
the URL to the log4j.dtd file (4th output line).  As you can see the
delimiter for between the jar file and dtd is '#' when instead it should
be '!'.  I'm betting that this is because of the weblogic zip classes
being used.  I've "patched" this by checking the URL obtained via the
class loader and reconstructing a new one if the '#' is present.  The hack
works but I'd like to have a solid fix to this.  This problem seems to
occur only on Weblogic 5.1.0 under solaris (running service pack 4) on
*some* (this is why I can't isolate the problem! :( ) machines.

log4j: Could not find resource: [log4j.properties].
log4j: System property is :null
log4j: Standard DocumentBuilderFactory search succeded.
log4j: DocumentBuilderFactory is:
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
log4j: URL to log4j.dtd is
[zip:/home/cluster-ccw/WlsCluster/appclasses/spice_utils-full.jar#org/apache
/log4j/xml/log4j.dtd].
log4j:ERROR Could not parse input stream
[java.io.FileInputStream@1fa3acb].
java.util.zip.ZipException: error in opening zip file
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.open(Compiled Code)
        at java.util.zip.ZipFile.<init>(Compiled Code)
        at java.util.zip.ZipFile.<init>(Compiled Code)
        at weblogic.utils.zip.ZipURLConnection.getInputStream(Compiled Code)
        at java.net.URL.openStream(Compiled Code)
        at
org.apache.xerces.readers.DefaultReaderFactory.createReader(Compiled
Code)
        at
org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExternalEntit
y(DefaultEntityHandler.java:767)
  etc.

Ashton

--- Ceki Gülcü <[EMAIL PROTECTED]> wrote:
> 
> Geoff,
> 
> I think I am beginning to understand the problem. I am assuming that you
> mean log4j.jar when referring to the "jar file". From looking at the
> stack trace, you are using Apache Xerces. The error seems to occur in
> DOMConfigurator.java line 566 which corresponds to:
> 
>      Document doc = docBuilder.parse(inputSource); 
> 
> There is a suspicious line in the stack trace:
> 
>  weblogic.utils.zip.ZipURLConnection.getInputStream(Handler.java:40)
> 
> Why on earth weblogic.utils.zip involved in opening a URL connection?
> You tell me. You might want to take the issue with the weblogic people.
> Hope this helps a bit more than my previous posts. :-) Ceki
> 
> 
> At 07:56 08.02.2001 +0800, you wrote:
> >I'm importing the jar file into the weblogic classpath and it's trying
> to
> >get the dtd out of the jar file.
> >The program has no problem getting the other files (.class files) out
> of the
> >jar file.
> >
> >I've deleted the dtd from the jar file and moved it to another
> directory and
> >pointed the xml to the dtd there.
> >
> >This is less than ideal - I would prefer to keep it in the jar file.
> >
> >Any ideas?
> >
> >Cheers
> >
> >Geoff

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


================================================================================================
                                     IMPORTANT INFORMATION

This message and any files transmitted with it are confidential and should be read 
only by those
persons to whom it is addressed.   
If you have received this message in error, please notify us immediately by way of 
reply. Please
also destroy and delete the message from your computer. Any unauthorised form of 
reproduction
of this message is strictly prohibited.

It is the duty of the recipient to virus scan and otherwise test the information 
provided before
loading onto any computer system.  
SEALCORP does not warrant that the information is free of a virus or any other defect 
or error.

SEALCORP is not liable for the proper and complete transmission of the information 
contained in
this communication, nor for any delay in its receipt.

Any views expressed in this message are those of the individual sender, except where 
the sender
specifically states them to be the views of SEALCORP.

================================================================================================

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to