why is Log4j trying to find log4j.dtd

前端 未结 6 574
时光取名叫无心
时光取名叫无心 2021-02-08 01:21

I\'m getting an exception when I try to run my application (in eclipse) complaining about log4j.dtd. Am I meant to have a dtd file if I use the xml configuration for log4j?

6条回答
  •  遇见更好的自我
    2021-02-08 02:07

    If you are using XML-based log4j, then yes, you will need the DTD file. Copy this DTD file into your workspace: http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd

    Make sure it sits at the same directory as your log4j XML file.

提交回复
热议问题