logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 23705] New: - Parser get confused when using external entities.
Date Thu, 09 Oct 2003 18:43:10 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23705>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23705

Parser get confused when using external entities.

           Summary: Parser get confused when using external entities.
           Product: Log4j
           Version: 1.2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: Other
        AssignedTo: log4j-dev@jakarta.apache.org
        ReportedBy: jzulu2000@hotmail.com


I have this two files to configure my log4j in a web context, using tomcat 
4.0.6(included in netbeans 3.5) and jdk 1.4.1-b21


<!--
 1.    log4j.xml, in WEB-INF/classes
->

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd" [
  <!ENTITY pool-categories SYSTEM "pool-categories.ent">
]>

<log4j:configuration debug="true">

  <appender name="AppenderConsola" class="org.apache.log4j.ConsoleAppender">
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%m%n"/>
    </layout>
  </appender>

  <appender name="AppenderTexto" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="C:\\Archivos de programa\\NetBeans IDE 3.5
\\tomcat406\\webapps\\ipsa\\errores\\Log.log" />
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%p %c - %m%n"/>
    </layout>
  </appender>

  <appender name="AppenderFactor5" 
class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="C:\\Archivos de programa\\NetBeans IDE 3.5
\\tomcat406\\webapps\\ipsa\\errores\\LogFactor5.log" />
    <param name="MaxFileSize" value="500KB" />
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="[slf5s.start]%d{yyyy/MM/dd 
HH:mm:ss}[slf5s.DATE]%p[slf5s.PRIORITY]%c[slf5s.CATEGORY]%m[slf5s.MESSAGE]%n"/>
    </layout>
  </appender>


  <!-- 
   - Se definen las categorias para el pool.
  -->
  &pool-categories;

</log4j:configuration>




<!--
 2.    pool-categories.ent, in WEB-INF/classes
->


  <category name="co.com.winet.util.connpool">
    <priority value="DEBUG" />
    <appender-ref ref="AppenderConsola" /> 
    <appender-ref ref="AppenderTexto" /> 
  </category>

  <category name="co.com.winet.util.connpool.ConexionesPool$GeneradorLog">
    <priority value="DEBUG" />
    <appender-ref ref="AppenderFactor5" /> 
  </category>



The tomcat console is as follows:


Starting service Tomcat-Standalone
Apache Tomcat/4.0.6
Starting service Tomcat-Apache
Apache Tomcat/4.0.6
log4j:ERROR Parsing error on line 0 and column 0
log4j:ERROR File "dummy://log4j.dtdpool-categories.ent" not found.
log4j:ERROR Could not parse input source [org.xml.sax.InputSource@1e4853f].
org.xml.sax.SAXException: Stopping after fatal error: 
File "dummy://log4j.dtdpool-categories.ent" not found.
        at org.apache.xerces.framework.XMLParser.reportError
(XMLParser.java:1245)
        at 
org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExternalEntity
(DefaultEntityHandler.java:780)
        at 
org.apache.xerces.readers.DefaultEntityHandler.startReadingFromEntity
(DefaultEntityHandler.java:663)
        at 
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch
(XMLDocumentScanner.java:1264)
        at org.apache.xerces.framework.XMLDocumentScanner.parseSome
(XMLDocumentScanner.java:381)
        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
        at org.apache.xerces.jaxp.DocumentBuilderImpl.parse
(DocumentBuilderImpl.java:195)
        at org.apache.log4j.xml.DOMConfigurator.doConfigure
(DOMConfigurator.java:665)
        at org.apache.log4j.xml.DOMConfigurator.doConfigure
(DOMConfigurator.java:616)
        at org.apache.log4j.xml.DOMConfigurator.doConfigure
(DOMConfigurator.java:602)
        at org.apache.log4j.helpers.OptionConverter.selectAndConfigure
(OptionConverter.java:460)
        at org.apache.log4j.LogManager.<clinit>(LogManager.java:113)
        at org.apache.log4j.Logger.getLogger(Logger.java:85)
        at co.com.winet.util.connpool.PoolManager.<clinit>(PoolManager.java:50)
        ...

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


Mime
View raw message