Hi,
I tried to run java org.apache.log4j.performance.Logging with sample1.xml
in the log4j 1.1.2 bundle but got this error. If I change the line
<log4j:configuration> to <configuration> I'm able to run the test with a
few warning. I've checked the local copy of log4j.dtd and it looks fine,
no typo bug like "logj:configuration". I've attached sample1.xml below the
error messages. Where did I go wrong ?
java org.apache.log4j.performance.Logging /h
liangsun/sample1.xml 10 10 10
Warning: validation was turned on but an org.xml.sax.ErrorHandler was not
set, which is probably not what is desired. Parser will use a default
ErrorHandler to print the first 10 errors. Please call
the 'setErrorHandler' method to fix this.
Error:
URI=jar:file:/home/liangsun/java/JBoss-2.2.1_Jetty3.1.RC4/jboss/lib/ext/l
og4j.jar!/org/apache/log4j/xml/log4j.dtd Line=4: Undeclared prefix:
"log4j:confi
guration".
log4j:ERROR Could not parse input stream [java.io.FileInputStream@21b6d].
java.lang.NullPointerException
at
org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:523)
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
.java:179)
at
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java
:585)
at
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java
:520)
at
org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:5
99)
at org.apache.log4j.performance.Logging.init(Logging.java:264)
at org.apache.log4j.performance.Logging.main(Logging.java:225)
log4j:ERROR No appenders could be found for category
(A0123456789.B0123456789.C0
123456789).
log4j:ERROR Please initialize the log4j system properly.
actual time: 1900.0
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration debug="false">
<appender name="STDOUT" class="org.apache.log4j.FileAppender">
<param name="File" value="System.out" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/>
</layout>
</appender>
<category name="org.apache.log4j.xml">
<priority value="info" />
</category>
<root>
<priority value ="debug" />
<appender-ref ref="STDOUT" />
</root>
</log4j:configuration>
smime.p7s