解决log4j.xml问题http//jakarta.apache.org/log4j/ uri is not registered

在Eclipse中,配置log4j.xml出现“http //jakarta.apache.org/log4j/ uri is not registered”的错误信息。

原始的log4j.xml配置文件:

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

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"  debug="true">
 

解决方法,具体修改如下所示。

<?xml version="1.0" encoding="GB2312" ?>
<!DOCTYPE log4j:configuration SYSTEM "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">

<log4j:configuration debug="true">

解决log4j.xml问题http//jakarta.apache.org/log4j/ uri is not registered

时间: 2024-10-24 18:32:04

解决log4j.xml问题http//jakarta.apache.org/log4j/ uri is not registered的相关文章

log4j.xml与log4j.dtd的配置详细说明与使用

1.log4j.dtd .dtd文件是对相应.xml进行约束验证用的.这里不做介绍了,详细见上一篇关于dtd的介绍:xml基础.DTD验证.Schema验证 log4j.dtd的文件: <?xml version="1.0" encoding="UTF-8" ?> <!-- Authors: Chris Taylor, Ceki Gulcu. --> <!-- Version: 1.2 --> <!-- A configur

log4j.xml 为什么要使用SLF4J而不是Log4J

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> <appender name="stdout" cl

log4j.xml配置详解(转)

转自:http://willow-na.iteye.com/blog/347340 Xml代码 <?xml version="1.0" encoding="UTF-8"?>     <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">             <log4j:configuration xmlns:log4j='http://jakarta.apache.o

log4j.xml配置文件

<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> <!-- 根节点的配置顺序: renderer appender pl

log4j日志文件 log4j.xml log4j.properties配置

1,导入log4j  jar包; 2,配置log4j.xml或log4j.properties文件; ----------------------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE log4j:configuratio

2份能用的log4j.xml

1 <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'> <appender name="STDOUT" class=&qu

Log4j.xml的配置信息

源码 1 <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'> 2 3 <appender name="STDOUT" class="org.apache.log4j.ConsoleAppender"> 4 <layout class="org.apache.log4j.PatternLayout"> 5 <param n

logger4j.properties和log4j.xml的常用配置(干货)

背景:不介绍了,日志对于一个项目的重要性大家都懂的: 直接上代码(含注释说明) log4j.xml的 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j

log4j.xml(信息打印)

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/' > <appender name="myConsole" class=&q