Eclipse log4j.xml – log4j.dtd cannot be validated as the XML definition
来源:互联网 发布:js让多个功能延迟执行 编辑:程序博客网 时间:2024/05/22 17:49
在使用spring tools suite布置Maven项目过程中,log4j.xml中报如下错误,报错信息如下:
Referenced file contains errors (http://toolkit.alibaba-inc.com/dtd/log4j/log4j.dtd). For more
information, right click on the message in the Problems View and select "Show Details...
以下是老外的解决方案,成功解决该该报错信息:
I use log4j in most of the projects for logging and use XML based configuration. Most of the part in log4j.xml is common and all we need to add appenders and loggers.
Recently Eclipse shown a warning in my log4j.xml file as below. However it had no effect on my project build or deployment.
The file cannot be validated as the XML definition “/Users/pankaj/workspace/MyProject/src/main/java/log4j.dtd (No such file or directory)” that is specified as describing the syntax of the file cannot be located.
The line that was throwing the error was:
<!
DOCTYPE
log4j:configuration SYSTEM "log4j.dtd">
Usually Eclipse looks for log4j.dtd in classpath and it doesn’t find it there and hence the error. We can resolve this issue by providing URL for log4j.dtd file like below.
12<!
DOCTYPE
log4j:configuration SYSTEM
"http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">
Some other valid configuration through which we can resolve the warning is:
<!
DOCTYPE
log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN"
"http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">
- Eclipse log4j.xml – log4j.dtd cannot be validated as the XML definition
- The file cannot be validated as the XML definition...
- mybatis的xml文件没有提示,出现the file cannot be validated as the XML definition.....
- The file cannot be validated as the XML definition 异常解决办法
- Eclipse平台log4j.xml找不到log4j.dtd
- The file cannot be validated as there was a connection problem. struts-config.xml
- log4j.xml提示不能找到log4j.dtd
- log4j.xml提示不能找到log4j.dtd
- 验证log4j.xml时不能找到log4j.dtd
- 验证log4j.xml时不能找到log4j.dtd
- The file cannot be validated as the host "struts.apache.org" is currently unreachable.
- struts问题the file cannot be validated as the host "struts.apache.org" is currently unreachable
- Log4j.xml
- log4j.xml
- LOG4J XML
- log4j.xml
- log4j.xml
- Log4J.xml
- [C++] LeetCode #6 ZigZag Conversion
- python读取csv文档
- 使用Fiddler抓取数据包 安装配置
- printf 输出格式设置
- jsp页面截取字符串
- Eclipse log4j.xml – log4j.dtd cannot be validated as the XML definition
- dpdk相关连接
- Java基础4--数组
- Linux初学者需要掌握的命令
- java算法2~求字符串中的数字字串的求和
- Java本来就是从C++衍生出来的
- opengl与d3d产生或填入mipmap参数不同之处
- 高并发量网站解决方案
- ThreadLocal--线程独自共享变量