I found out it's the problem with weblogic. And was
suggested by someone to remove the line
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">.
But i got the following error without the line:

log4j:ERROR Parsing error on line 3 and column 83
log4j:ERROR Document root element 
"log4j:configuration", must match DOCTYPE root "null".
log4j:ERROR Parsing error on line 3 and column 83
log4j:ERROR Document is invalid: no grammar found. but
log4j is configured too.

Also if I include the earlier Sun jaxp implementation
I got the follwoing error:

log4j:ERROR Parsing error on line 2 and column -1
log4j:ERROR URI
"zip:./appserve/serverclasses/log4j-1.2.jar#org/apache/log4j/xml/log4j.dtd"
has a fragment ID.


Is it OK with the ERROR there? Thanks
--- Hu <[EMAIL PROTECTED]> wrote:
> The file name is "log4j.xml".
> 
> Here is code:
> try {
>      DOMConfigurator.configureAndWatch("log4j.xml");
> 
> Here is the xml:
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
> 
> <log4j:configuration debug="true">
> <renderer renderedClass="javax.jms.TextMessage"
>
renderingClass="com.imsn.util.JMSTextMessageRenderer"/>
> 
> <appender name="ass"
> class="com.imsn.util.DatedFileAppender">
>      <param name="File"   value="c:/logs/.ass_log"
> />
>      <param name="Append" value="true" />     
>      <layout class="org.apache.log4j.PatternLayout">
> <param name="ConversionPattern" value="%d -
> %m\r\n"/>
>      </layout>            
> </appender>
>       
> <appender name="app"
> class="com.imsn.util.DatedFileAppender">
>     <param name="File"   value="c:/logs/.app_log" />
>     <param name="Append" value="true" />      
>     <layout class="org.apache.log4j.PatternLayout">
> <param name="ConversionPattern" value="%d -
> %m\r\n"/>
>     </layout>     
> </appender>
> 
> <appender name="STDOUT"
> class="org.apache.log4j.FileAppender">
>   <param name="File" value="System.out" />
>   <layout class="org.apache.log4j.PatternLayout">
>    <param name="ConversionPattern" value="%d %-5p
> [%t]
> %C{2} (%F:%L) - %m\r\n"/>
>  </layout>            
> </appender>
> 
> <category name="com.imsn.tran.AssProcessor"
> additivity="false">
>  <priority value="info" />
>  <appender-ref ref="ass" />
> </category>
> 
> <category name="com.imsn.tran.AppProcessor"
> additivity="false">
>  <priority value="info" />
>  <appender-ref ref="app" />
> </category>   
> 
> <root>
>   <priority value ="debug" />
>   <appender-ref ref="STDOUT" />
> </root>
>       
> </log4j:configuration>
> 
> --- Ceki Gülcü <[EMAIL PROTECTED]> wrote:
> > 
> > When you invoke
> > DOMConfigurator.configureAndWatch(String
> > configFilename) what is the value of
> configFilename?
> > Does the value
> > contain a "#" character?
> > 
> > What are the contents of the XML file you are
> trying
> > to parse?
> > 
> > At 16:01 13.05.2002 -0700, you wrote:
> > >I have problem to configure log4j using xml file.
> > >Somebody please help. Repost:
> > >
> > > > Hi,
> > > > I downloaded the log4j1.2 and I downloaded the
> > xml
> > > > pack from Sun,  I put six jar files on the
> > >classpath, I
> > > > load the xml file in a startup class of
> > weblogic.
> > > > But I got exception:
> > > >
> > > > log4j:ERROR Could not parse input source
> > > > [org.xml.sax.InputSource@3a1834].
> > > > java.util.zip.ZipException: The system cannot
> > find
> > > > the file specified
> > > >         at java.util.zip.ZipFile.open(Native
> > Method)
> > > >         at
> > > > java.util.zip.ZipFile.<init>(ZipFile.java:110)
> > > >         at
> > > > java.util.zip.ZipFile.<init>(ZipFile.java:125)
> > > >         at
> > > >
> >
>
>weblogic.utils.zip.ZipURLConnection.getInputStream(Handler.java:40)
> > > >         at
> java.net.URL.openStream(URL.java:798)
> > > >         at
> > > >
> >
>
>org.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.
> > > > java:740)
> > > >         at
> > > >
> >
>
>org.apache.xerces.impl.XMLEntityManager.startDTDEntity(XMLEntityManag
> > > > er.java:700)
> > > >         at
> > > >
> >
>
>org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScanner
> > > > Impl.java:258)
> > > >         at
> > > >
> >
>
>org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(
> > > > XMLDocumentScannerImpl.java:811)
> > > >         at
> > > >
> >
>
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XM
> > > > LDocumentFragmentScannerImpl.java:333)
> > > >         at
> > > >
> >
>
>org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardP
> > > > arserConfiguration.java:525)
> > > >         at
> > > >
> >
>
>org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardP
> > > > arserConfiguration.java:581)
> > > >         at
> > > >
> >
>
>org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147)
> > > >         at
> > > >
> >
>
>org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:221)
> > > >         at
> > > >
> >
>
>org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.
> > > > java:201)
> > > >         at
> > > >
> >
>
>org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java
> > > > :672)
> > > >         at
> > > >
> >
>
>org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java
> > > > :616)
> > > >         at
> > > >
> >
>
>org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java
> > > > :584)
> > > >         at
> > > >
> >
>
>org.apache.log4j.xml.XMLWatchdog.doOnChange(DOMConfigurator.java:822)
> > > >
> > > >         at
> > > >
> >
>
>org.apache.log4j.helpers.FileWatchdog.checkAndConfigure(FileWatchdog.
> > > > java:80)
> > > >         at
> > > >
> >
>
>org.apache.log4j.helpers.FileWatchdog.<init>(FileWatchdog.java:49)
> > > >         at
> > > >
> >
>
>org.apache.log4j.xml.XMLWatchdog.<init>(DOMConfigurator.java:814)
> > > >         at
> > > >
> >
>
>org.apache.log4j.xml.DOMConfigurator.configureAndWatch(DOMConfigurato
> > > > r.java:574)
> > > >         at
> > > >
> >
>
>org.apache.log4j.xml.DOMConfigurator.configureAndWatch(DOMConfigurato
> > > > r.java:557)
> > > >
> > > > How can I configure it? There is no problem
> with
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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

Reply via email to