0 Replies Latest reply on Oct 8, 2004 1:32 PM by 346268

    dummy://log4j.dtd (log4j problem in Oracle 10gAS)


      Wonder who has log4j.xml experience in EJB environment?

      I tried on Oracle 10gAS on Windows (the iAS version actually is still, my log4j initilization code looks like:

      InputStream inStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(sLogFileName);
      new DOMConfigurator().doConfigure(inStream, LogManager.getLoggerRepository());

      There is no problem to find the log4j.xml however the application server complains the log4j.dtd:

      04/10/08 18:48:18 Start process
      04/10/08 18:48:33 Oracle Application Server Containers for J2EE 10g ( initialized
      04/10/08 18:49:09 log4j:ERROR Parsing error on line 0 and column 0
      04/10/08 18:49:09 log4j:ERROR File "dummy://log4j.dtd" not found.
      04/10/08 18:49:09 log4j:ERROR Could not parse input source [org.xml.sax.InputSource@177fa9a].
      04/10/08 18:49:09 org.xml.sax.SAXException: Stopping after fatal error: File "dummy://log4j.dtd" not found.
      04/10/08 18:49:09 at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1245)
      04/10/08 18:49:09 at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocument(DefaultEntityHandler.java:501)
      04/10/08 18:49:09 at org.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:314)
      04/10/08 18:49:09 at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1097)
      04/10/08 18:49:09 at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:195)
      04/10/08 18:49:09 at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:665)
      04/10/08 18:49:09 at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:616)

      I check DOMConfiguration.java, it contains:

      docBuilder.setErrorHandler(new SAXErrorHandler());
      docBuilder.setEntityResolver(new Log4jEntityResolver());
      // we change the system ID to a valid URI so that Crimson won't
      // complain. Indeed, "log4j.dtd" alone is not a valid URI which
      // causes Crimson to barf. The Log4jEntityResolver only cares
      // about the "log4j.dtd" ending.
      Document doc = docBuilder.parse(inputSource);

      Anybody has an idea and help me? Thanks in advance.