You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2004/10/22 01:59:55 UTC
DO NOT REPLY [Bug 31840] New: -
NPE using XmlLogger and antlib
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31840>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=31840
NPE using XmlLogger and antlib
Summary: NPE using XmlLogger and antlib
Product: Ant
Version: 1.6.2
Platform: Other
OS/Version: Other
Status: NEW
Severity: Critical
Priority: Other
Component: Core tasks
AssignedTo: dev@ant.apache.org
ReportedBy: mariano@fuegolabs.com
I put down the problem to a simple procedure to reproduce:
I have sample.xml and antlib.xml, I just define the antlib in sample.xml and
when I try to run it with the XmlLogger I get this:
mariano@fenix:/w/MAIN/local/modules/boot.launcher> ant -f sample.xml -logger
org.apache.tools.ant.XmlLogger
Buildfile: sample.xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="log.xsl"?>
<build time="0 seconds" error="/w/MAIN/local/modules/boot.launcher/sample.xml:5:
srcdir attribute must be set!">
<task name="java.lang.NullPointerException
at
org.apache.tools.ant.util.DOMElementWriter.encode(DOMElementWriter.java:174)
at
org.apache.tools.ant.util.DOMElementWriter.write(DOMElementWriter.java:95)
at
org.apache.tools.ant.util.DOMElementWriter.write(DOMElementWriter.java:113)
at org.apache.tools.ant.XmlLogger.buildFinished(XmlLogger.java:189)
at org.apache.tools.ant.Project.fireBuildFinished(Project.java:1796)
at org.apache.tools.ant.Main.runBuild(Main.java:693)
at org.apache.tools.ant.Main.startAnt(Main.java:188)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
this happens because the antlib taskname is null, I debugged it and found that
the taskname attribute of the antlib is never defined. and when the logger
receives the taskStarted for the antlib, it stores a null for the value, and
that breaks the XmlLogger.
I really need this to be able to use CruiseControl with our ant project, since
it uses it extensively as I understand.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org