Bug 34722 - Cenqua clover failure's with ant 1.6.3
Summary: Cenqua clover failure's with ant 1.6.3
Status: RESOLVED FIXED
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.6.3
Hardware: PC Windows 2000
: P2 major (vote)
Target Milestone: 1.6.4
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-03 12:14 UTC by Robert Maxwell
Modified: 2008-02-22 12:18 UTC (History)
0 users



Attachments
just the stack trace of the failure (7.34 KB, application/octet-stream)
2005-05-03 12:30 UTC, Robert Maxwell
Details
modified DirectoryScanner.java (57.52 KB, text/plain)
2005-05-03 16:49 UTC, Matt Benson
Details
diff (1.31 KB, patch)
2005-05-03 16:50 UTC, Matt Benson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Maxwell 2005-05-03 12:14:29 UTC
I have just upgraded to ant 1.6.3 while using anthill to build nightly 
versions of our software. We use clover reporting to help us test and get a 
code coverage of the tests, but over the past few days i have been getting 
build failures due to the new version of ant.
the problem stems from a java.lang.nullpointerexception error.

a full stack trace is below

BUILD FAILED
C:\Tools\AntHill\AllSDEJ\CuramSDEJ\build_scripts\build.xml:125: The following 
error occurred while executing t
his line:
C:\Tools\AntHill\AllSDEJ\CuramSDEJ\build_scripts\build.xml:1140: 
java.lang.NullPointerException
        at org.apache.tools.ant.ProjectHelper.addLocationToBuildException
(ProjectHelper.java:539)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:384)
        at org.apache.tools.ant.taskdefs.CallTarget.execute
(CallTarget.java:107)
        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)
Caused by: C:\Tools\AntHill\AllSDEJ\CuramSDEJ\build_scripts\build.xml:1140: 
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.helper.SingleCheckExecutor.executeTargets
(SingleCheckExecutor.java:37)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
        ... 13 more
Caused by: java.lang.NullPointerException
        at org.apache.tools.ant.DirectoryScanner.isMorePowerfulThanExcludes
(DirectoryScanner.java:1208)
        at org.apache.tools.ant.DirectoryScanner.couldHoldIncluded
(DirectoryScanner.java:1167)
        at org.apache.tools.ant.DirectoryScanner.slowScan
(DirectoryScanner.java:972)
        at org.apache.tools.ant.DirectoryScanner.getExcludedFiles
(DirectoryScanner.java:1335)
        at org.apache.tools.ant.taskdefs.CloverCompilerAdapter.setJavac(1.3.5-
build-598:285)
        at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:928)
        at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        ... 19 more
--- Nested Exception ---
C:\Tools\AntHill\AllSDEJ\CuramSDEJ\build_scripts\build.xml:1140: 
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.helper.SingleCheckExecutor.executeTargets
(SingleCheckExecutor.java:37)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
        at org.apache.tools.ant.taskdefs.CallTarget.execute
(CallTarget.java:107)
        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)
Caused by: java.lang.NullPointerException
        at org.apache.tools.ant.DirectoryScanner.isMorePowerfulThanExcludes
(DirectoryScanner.java:1208)
        at org.apache.tools.ant.DirectoryScanner.couldHoldIncluded
(DirectoryScanner.java:1167)
        at org.apache.tools.ant.DirectoryScanner.slowScan
(DirectoryScanner.java:972)
        at org.apache.tools.ant.DirectoryScanner.getExcludedFiles
(DirectoryScanner.java:1335)
        at org.apache.tools.ant.taskdefs.CloverCompilerAdapter.setJavac(1.3.5-
build-598:285)
        at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:928)
        at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        ... 19 more
--- Nested Exception ---
java.lang.NullPointerException
        at org.apache.tools.ant.DirectoryScanner.isMorePowerfulThanExcludes
(DirectoryScanner.java:1208)
        at org.apache.tools.ant.DirectoryScanner.couldHoldIncluded
(DirectoryScanner.java:1167)
        at org.apache.tools.ant.DirectoryScanner.slowScan
(DirectoryScanner.java:972)
        at org.apache.tools.ant.DirectoryScanner.getExcludedFiles
(DirectoryScanner.java:1335)
        at org.apache.tools.ant.taskdefs.CloverCompilerAdapter.setJavac(1.3.5-
build-598:285)
        at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:928)
        at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757)
        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.helper.SingleCheckExecutor.executeTargets
(SingleCheckExecutor.java:37)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
        at org.apache.tools.ant.taskdefs.CallTarget.execute
(CallTarget.java:107)
        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: 31 seconds
Comment 1 Robert Maxwell 2005-05-03 12:30:20 UTC
Created attachment 14916 [details]
just the stack trace of the failure
Comment 2 Matt Benson 2005-05-03 15:49:25 UTC
ah, I believe I see how DirectoryScanner.slowScan() is broken in 1.6.3 .  Looks
like a 1.6.4 release will be necessary. :(
Comment 3 Robert Maxwell 2005-05-03 16:29:14 UTC
a bug within ant version 1.6.3 that would be fixed in 1.6.4
Comment 4 Matt Benson 2005-05-03 16:34:15 UTC
not sure I understood that last comment.  I'm about to attach a patched version
of ant.jar, if you could verify that it fixes the problem.
Comment 5 Matt Benson 2005-05-03 16:48:28 UTC
I think the jar is too big for an attachment.  I will attach the modified file 
as well as a diff.  Let me know if you need me to e-mail the jar to you 
privately.
Comment 6 Matt Benson 2005-05-03 16:49:27 UTC
Created attachment 14919 [details]
modified DirectoryScanner.java
Comment 7 Matt Benson 2005-05-03 16:50:12 UTC
Created attachment 14920 [details]
diff
Comment 8 Stefan Bodewig 2005-05-03 17:18:22 UTC
Matt, you can always publish the jar via http://people.apache.org/~mbenson/

+1 to your patch
Comment 9 Robert Maxwell 2005-05-03 17:25:15 UTC
I sent an e-mail to you with my address
Cheers again
Comment 10 Robert Maxwell 2005-05-04 10:18:08 UTC
Got the jar and added it into the lib directory, then went and tried it out. 
Worked perfectly for all the normal ant builds, but when it came back to using 
clover with it i got the following error below, i'm not sure if this is an ant 
problem, but it works fine with ant 1.6.2 .

BUILD FAILED
C:\work\testWAS\CuramSDEJ\build_scripts\clover.xml:29: Could not create task 
or type of type: clover-setup.

Ant could not find the task or a class this task relies upon.

This is common and has a number of causes; the usual
solutions are to read the manual pages then download and
install needed JAR files, or fix the build file:
 - You have misspelt 'clover-setup'.
   Fix: check your spelling.
 - The task needs an external JAR file to execute
     and this is not found at the right place in the classpath.
   Fix: check the documentation for dependencies.
   Fix: declare the task.
 - The task is an Ant optional task and the JAR file and/or libraries
     implementing the functionality were not found at the time you
     yourself built your installation of Ant from the Ant sources.
   Fix: Look in the ANT_HOME/lib for the 'ant-' JAR corresponding to the
     task and make sure it contains more than merely a META-INF/MANIFEST.MF.
     If all it contains is the manifest, then rebuild Ant with the needed
     libraries present in ${ant.home}/lib/optional/ , or alternatively,
     download a pre-built release version from apache.org
 - The build file was written for a later version of Ant
   Fix: upgrade to at least the latest release version of Ant
 - The task is not an Ant core or optional task
     and needs to be declared using <taskdef>.
 - You are attempting to use a task defined using
    <presetdef> or <macrodef> but have spelt wrong or not
   defined it at the point of use

Remember that for JAR files to be visible to Ant tasks implemented
in ANT_HOME/lib, the files must be in the same directory or on the
classpath

Please neither file bug reports on this problem, nor email the
Ant mailing lists, until all of these causes have been explored,
as this is not an Ant bug.
        at org.apache.tools.ant.UnknownElement.getNotFoundException
(UnknownElement.java:493)
        at org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java
(Compiled Code))
        at org.apache.tools.ant.UnknownElement.maybeConfigure
(UnknownElement.java(Compiled Code))
        at org.apache.tools.ant.Task.perform(Task.java(Compiled Code))
        at org.apache.tools.ant.Target.execute(Target.java(Compiled Code))
        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: 1 minute 2 seconds
Comment 11 Robert Maxwell 2005-05-04 11:59:32 UTC
Sorry just haven't got the clover.jar file in the ant lib directory.
I can probably suggest that this bug is now fixed and that it can be therefore 
closed?
Comment 12 Matt Benson 2005-05-04 15:53:43 UTC
Thanks for reporting the problem, and for testing the patch! Marking target as
1.7 for now but this will be in a 1.6.4 release in the near future.