2 Replies Latest reply on Mar 1, 2002 2:38 AM by Juha Lindfors

    where to log4j.dtd in jboss

    Ramesh Newbie

      Hi

      I facing the following problem.
      any help is appreciated.

      I have one standard MBean.This MBean uses one utility class which will interact with the BMP entity bean and reads the following xml as a CLOB from the database

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

      <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>

      <appender name="AxielleFileAppender" class="org.apache.log4j.RollingFileAppender">
      <param name="File" value="axielle.log"/>
      <param name="MaxFileSize" value="10MB"/>
      <param name="MaxBackupIndex" value="1"/>
      <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d{ISO8601} [%t] %-5p %c %x - %m%n"/>
      </layout>
      </appender>
      </log4j:configuration>

      After getting the above xml from the database i want document object.so i am parsing by using following code


      DocumentBuilder documentBuilder =
      builderFactory.newDocumentBuilder ();

      document =
      documentBuilder
      .parse (new InputSource (new StringReader (xmlString)));

      At this point i am getting the following exception

      org.xml.sax.SAXParseException: Relative URI "log4j.dtd"; can not be resolved without a document URI.
      at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3035)
      at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3029)
      at org.apache.crimson.parser.Parser2.parseSystemId(Parser2.java:2627)
      at org.apache.crimson.parser.Parser2.maybeExternalID(Parser2.java:2605)
      at org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1116)

      at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:488)
      at org.apache.crimson.parser.Parser2.parse(Parser2.java:304)
      at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)

      at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java179

      regards
      Ramesh