Geoff,

Hmm... I don't see what the problem is. Leave the log4j.dtd file in log4j.jar. You do 
not need a copy of it anywhere else. Your xml file should like:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration SYSTEM "log4j.dtd">   

<configuration>
 ...
</configuration>

(This is for log4j v1.0.4. If you are using the code in our cvs rep, then replace 
"configuration" with "log4j:configuration".

You do not need to set a path (relative or absolute) to the log4j.dtd. Just leave the 
reference as "log4j.dtd" in the DOCTYPE declaration. In other words, there is no need 
to worry about the path to log4j.dtd. OK?

Cheers, Ceki

ps: This has been tested to work with Xerces and Sun's XML parser. Are you by any 
chance using a different parser? 
 

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
>
>-----Original Message-----
>From: Ceki Gülcü [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, 7 February 2001 17:21
>To: LOG4J Users Mailing List
>Subject: Re: Help using DOMConfigurator
>
>
>Geoff,
>
>There is no need to displace the log4j.dtd file. Leave it where it was. 
>
>Why is java.util.zip involved? Have you placed the files in a jar archive?
>Ceki
>
>At 14:02 07.02.2001 +0800, you wrote:
>>Hello all,
>> 
>>I'm trying to use the latest copy of log4j and trying to use the
>>DOMConfigurator.
>>
>>I've taken a copy of the sample1.xml, renamed it, copied the DTD to the
>same
>>directory and when I try and run:
>> 
>>DOMConfigurator.configure(xmlFilePath);
>> 
>>I get:
>> 
>>log4j:ERROR Could not parse input stream
>[java.io.FileInputStream@86695348].
>>java.util.zip.ZipException: error in opening zip file
>>        at java.util.zip.ZipFile.open(Native Method)
>>        at java.util.zip.ZipFile.<init>(ZipFile.java:69)
>>        at java.util.zip.ZipFile.<init>(ZipFile.java:84)
>>        at
>>weblogic.utils.zip.ZipURLConnection.getInputStream(Handler.java:40)
>>        at java.net.URL.openStream(URL.java:818)
>>        at
>>org.apache.xerces.readers.DefaultReaderFactory.createReader(DefaultReaderFa
>c
>>tory.java, Co
>>mpiled Code)
>>        at
>>org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExternalEnti
>t
>>y(DefaultEnti
>>tyHandler.java:767)
>>        at
>>org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExternalSubs
>e
>>t(DefaultEnti
>>tyHandler.java:566)
>>        at
>>org.apache.xerces.framework.XMLDTDScanner.scanDoctypeDecl(XMLDTDScanner.jav
>a
>>:1131)
>>        at
>>org.apache.xerces.framework.XMLDocumentScanner.scanDoctypeDecl(XMLDocumentS
>c
>>anner.java:21
>>77)
>>        at
>>org.apache.xerces.framework.XMLDocumentScanner.access$0(XMLDocumentScanner.
>j
>>ava:2133)
>>        at
>>org.apache.xerces.framework.XMLDocumentScanner$PrologDispatcher.dispatch(XM
>L
>>DocumentScann
>>er.java, Compiled Code)
>>        at
>>org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner
>.
>>java, Compile
>>d Code)
>>        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:900)
>>        at
>>org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:1
>2
>>3)
>>        at
>>org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:566)
>>        at
>>org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:513)
>> 
>>
>>Any Ideas??
>>
>>Cheers, 
>>
>>Geoff Oliphant 
>>
>>
>>
>>
>>===========================================================================
>=====================
>>                                     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]
>
>----
>Ceki Gülcü           e-mail: [EMAIL PROTECTED] (preferred)
>av. de Rumine 5              [EMAIL PROTECTED]
>CH-1005 Lausanne          
>Switzerland            Tel: ++41 21 351 23 15
>
>
>---------------------------------------------------------------------
>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]

----
Ceki Gülcü           e-mail: [EMAIL PROTECTED] (preferred)
av. de Rumine 5              [EMAIL PROTECTED]
CH-1005 Lausanne          
Switzerland            Tel: ++41 21 351 23 15


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

Reply via email to