ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 37386] New: - checksum todir= attribute generates nullpointer exception
Date Mon, 07 Nov 2005 18:32:07 GMT
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=37386>.
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=37386

           Summary: checksum todir= attribute generates nullpointer
                    exception
           Product: Ant
           Version: 1.6.5
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: ajchida@gmail.com
                CC: ajchida@gmail.com


<checksum algorithm="SHA" file="${build.lib}/app.jar" todir="${build.dest}"/>
throws
/home/app/build.xml: java.lang.NullPointerException
If i remove todir="${build.dest}" parameter, everything compiles.
I'm using Ant 1.6.5 on Sun JDK 1.5.0_05.

The build.xml and the trace is attached.

[app@miracle src]$ ant -v
Apache Ant version 1.6.5 compiled on June 2 2005
Buildfile: build.xml
Detected Java version: 1.5 in: /usr/local/java/jdk1.5.0_05/jre
Detected OS: Linux
parsing buildfile /home/app/src/build.xml with URI = file:///home/app/src/build.xml
Project base dir set to: /home/app/src
Build sequence for target(s) `all' is [compile, checksum, all]
Complete build sequence is [compile, checksum, all, ]

compile:
    [javac] helloworld.java added as helloworld.class doesn't exist.
    [javac] Compiling 1 source file
    [javac] Using modern compiler
    [javac] Compilation arguments:
    [javac] '-classpath'
    [javac]
'/usr/local/apache-ant-1.6.5/lib/ant-launcher.jar:/usr/local/apache-ant-1.6.5/lib/ant-xalan1.jar:/usr/local/apache-ant-1.6.5/lib/ant-apache-resolver.jar:/usr/local/apache-ant-1.6.5/lib/xercesImpl.jar:/usr/local/apache-ant-1.6.5/lib/ant-junit.jar:/usr/local/apache-ant-1.6.5/lib/ant-icontract.jar:/usr/local/apache-ant-1.6.5/lib/ant-netrexx.jar:/usr/local/apache-ant-1.6.5/lib/ant-xslp.jar:/usr/local/apache-ant-1.6.5/lib/ant-commons-net.jar:/usr/local/apache-ant-1.6.5/lib/ant-nodeps.jar:/usr/local/apache-ant-1.6.5/lib/ant-jsch.jar:/usr/local/apache-ant-1.6.5/lib/ant-apache-log4j.jar:/usr/local/apache-ant-1.6.5/lib/xml-apis.jar:/usr/local/apache-ant-1.6.5/lib/ant-vaj.jar:/usr/local/apache-ant-1.6.5/lib/ant-weblogic.jar:/usr/local/apache-ant-1.6.5/lib/ant-starteam.jar:/usr/local/apache-ant-1.6.5/lib/ant-swing.jar:/usr/local/apache-ant-1.6.5/lib/ant-jdepend.jar:/usr/local/apache-ant-1.6.5/lib/ant.jar:/usr/local/apache-ant-1.6.5/lib/ant-commons-logging.jar:/usr/local/apache-ant-1.6.5
 /lib/ant-trax.jar:/usr/local/apache-ant-1.6.5/lib/ant-stylebook.jar:/usr/local/apache-ant-1.6.5/lib/ant-jai.jar:/usr/local/apache-ant-1.6.5/lib/ant-apache-bcel.jar:/usr/local/apache-ant-1.6.5/lib/ant-javamail.jar:/usr/local/apache-ant-1.6.5/lib/ant-apache-bsf.jar:/usr/local/apache-ant-1.6.5/lib/ant-apache-regexp.jar:/usr/local/apache-ant-1.6.5/lib/ant-apache-oro.jar:/usr/local/apache-ant-1.6.5/lib/ant-jmf.jar:/usr/local/apache-ant-1.6.5/lib/ant-antlr.jar:/usr/local/java/jdk1.5.0_05/lib/tools.jar
'
    [javac] '-sourcepath'
    [javac] '/home/app/src'
    [javac] '-g'
    [javac]
    [javac] The ' characters around the executable and arguments are
    [javac] not part of the command.
    [javac] File to be compiled:
    [javac]     /home/app/src/helloworld.java

checksum:

BUILD FAILED
/home/app/src/build.xml:10: java.lang.NullPointerException
        at org.apache.tools.ant.Task.perform(Task.java:373)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
        at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
        at org.apache.tools.ant.Main.runBuild(Main.java:668)
        at org.apache.tools.ant.Main.startAnt(Main.java:187)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Caused by: java.lang.NullPointerException
        at java.io.File.<init>(File.java:277)
        at org.apache.tools.ant.taskdefs.Checksum.getChecksumFile(Checksum.java:406)
        at
org.apache.tools.ant.taskdefs.Checksum.addToIncludeFileMap(Checksum.java:366)
        at
org.apache.tools.ant.taskdefs.Checksum.validateAndExecute(Checksum.java:349)
        at org.apache.tools.ant.taskdefs.Checksum.execute(Checksum.java:224)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        ... 10 more
--- Nested Exception ---
java.lang.NullPointerException
        at java.io.File.<init>(File.java:277)
        at org.apache.tools.ant.taskdefs.Checksum.getChecksumFile(Checksum.java:406)
        at
org.apache.tools.ant.taskdefs.Checksum.addToIncludeFileMap(Checksum.java:366)
        at
org.apache.tools.ant.taskdefs.Checksum.validateAndExecute(Checksum.java:349)
        at org.apache.tools.ant.taskdefs.Checksum.execute(Checksum.java:224)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
        at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
        at org.apache.tools.ant.Main.runBuild(Main.java:668)
        at org.apache.tools.ant.Main.startAnt(Main.java:187)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)

Total time: 2 seconds

***********************************************
<?xml version='1.0'?>
<project name="hello" default="all" basedir=".">
<description>Simple ANT build file</description>

    <target name="compile">
        <javac srcdir="." debug="true" includes="*.java"/>
    </target>

    <target name="checksum">
        <checksum algorithm="SHA" file="helloworld.class" todir="."/>
    </target>
   
    <target name="all" depends="compile,checksum">
        <echo message="All Done"/>
    </target>
</project>

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message