4 Replies Latest reply on Mar 9, 2011 1:49 AM by javatwo

    where is the log4j.dtd?

    javatwo

      When I tried to parse jboss-log4j.xml using xml parser to add a fragment.

       

      <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

       

      I got error: log4j.dtd is not found.

      I could not find log4j.dtd in JBOSS 5.1.0.GA.

       

      Is there a way to disable dtd validation when parsing? or where is the dtd file? Thanks

      Dave

        • 1. Re: where is the log4j.dtd?
          ebross

          It is in every log4j.jar. Where did you get jboss-log4j.xml from?

          • 2. where is the log4j.dtd?
            javatwo

            Thanks. I found it in common/lib/log4j.jar.

             

            org/apache/log4j/xml/log4j.dtd

             

            Do I need to extract it out and put it in the directory as jboss-log4j.xml?  or can I specify the jar in classpath and xmlParser will read it from the jar?

            Thanks for help.

            • 3. where is the log4j.dtd?
              jaikiran

              Where exactly are you seeing that error? On the server console when the server is starting? Can you post more details including the log? Also have you changed anything in a clean installation of JBoss AS?

              • 4. where is the log4j.dtd?
                javatwo

                Since the jboss-log4j.xml can not be parsed without dtd, so I removed the DOCTYPE and parsed it to DOM, and then inserted a fragment.

                 

                but on JBOSS server console:

                log4j:WARN Continuable parsing error 14 and column 83

                log4j:WARN Document root element "log4j:configuration", must match DOCTYPE root "null".

                log4j:WARN Continuable parsing error 14 and column 83

                log4j:WARN Document is invalid: no grammar found.

                 

                Thanks.