Remove the space after

xmlns: 

in the tag 
        <log4j:configuration xmlns:
log4j="http://jakarta.apache.org/log4j/";>




> -----Original Message-----
> From: Sara Prigge [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, January 15, 2002 11:58 AM
> To:   '[EMAIL PROTECTED]'
> Subject:      Problem using XML config file
> 
> Hi-
> 
> I've been using log4j with a text config file and would now like to switch
> to an XML config file.  I'm running into some problems - I don't think my
> XML file is being parsed.....?
> 
> Here is the relevant portion of my code:
> 
> [....]
> import org.apache.log4j.xml.DOMConfigurator;
> [...]
> DOMConfigurator.configureAndWatch("logging.xml");
> [...]
> 
> Here is my XML file:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
> 
> <log4j:configuration xmlns: log4j="http://jakarta.apache.org/log4j/";>
> 
>       <appender name="jdbc" class="org.apache.log4j.varia.JDBCAppender">
>               <param name="URL" value="jdbc:odbc:log_testing"/>
>               <param name="user" value=""/>
>               <param name="password" value=""/>
>               <param name="driver" value="sun.jdbc.odbc.JdbcOdbcDriver"/>
>               <param name="sql" value="insert into JDBCAppenderTest
> (message, class, priority, logdate) values ('%m', (%c), %p,
> %d{ISO8601})"/>
>               <param name="buffersize" value="1"/>
>               <param name="threshold" value="WARN"/>
>       </appender>
> 
>       <appender name="rollFile"
> class="org.apache.log4j.RollingFileAppender">
>               <param name="File" value="fmslog.log"/>
>               <param name="MaxFileSize" value="1KB"/>
>               <param name="MaxBackupIndex" value="1"/>
>               <layout class="org.apache.log4j.PatternLayout">
>                       <param name="Conversion Pattern" value="%-15d %-10p
> (%c) - %m%n"/>
>               </layout>
>       </appender>
> 
>       <root>
>               <priority value="debug"/>
>               <appender-ref ref="jdbc"/>
>               <appender-ref ref="rollFile"/>
>       </root>
> </log4j:configuration>
> 
> I am trying this on my own machine: Windows 2000, JDK 1.3.1.  I have
> xalan.jar and xerces.jar in my JDK.  I'm using JBuilder 5.  I'm using
> log4j
> version 1.1.3.
> 
> I get the following error:
> 
> log4j:ERROR Could not parse input stream [java.io.FileInputStream@5663a2].
> 
> org.xml.sax.SAXException: Attribute name "log4j:configuration" must be
> followed by the ' = ' character.
> 
> 1.  Is my XML file incorrect?  I followed the sample XML files provided in
> the log4j project.
> 2.  Is it correct that SAX is being used?  Shouldn't it be DOM?
> 3.  Am I using the configureAndWatch method properly?
> 4.  Are Xalan.jar and/or Xerces.jar causing problems?
> 
> Any help/suggestions/tips are appreciated!
> 
> Thanks-
> Sara
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>

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

Reply via email to