ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ken Rider" <Ken.Ri...@intelliden.com>
Subject RE: FilterSet NullPointerException with 1.6.1
Date Mon, 03 May 2004 21:23:24 GMT
It turns out the problem was caused by an old hack to fix path
separators for properties referring to directories on Windows. It
probably hasn't been necessary for quite some time (at least not in
1.5.x and 1.6.x) but had never caused a problem so it was still in our
build file. I've attached a sample build file that illustrates the
problem and the fix.

-----Original Message-----
From: Rhino [mailto:rhino1@sympatico.ca] 
Sent: Monday, May 03, 2004 1:39 PM
To: Ant Users List
Subject: Re: FilterSet NullPointerException with 1.6.1

I'm using 1.6.1 and haven't seen this problem.

It might help if you showed us the task that you were executing when you
got
this error. Offhand, I wonder whether the embedded spaces in the path
"Documents and Settings" is part of the problem. Then again, it would be
a
bit surprising if that wasn't an issue in 1.5.x and then suddenly become
one
in 1.6.1.....

Rhino

----- Original Message ----- 
From: "Ken Rider" <Ken.Rider@intelliden.com>
To: "Ant Users List" <user@ant.apache.org>
Sent: Monday, May 03, 2004 3:26 PM
Subject: FilterSet NullPointerException with 1.6.1


I have a target that creates a filterset then references that filterset
on a file copy. With Ant 1.5.1 and 1.5.4 the copy works as expected but
with Ant 1.6.1 I get a NullPointerException (see below). Has anyone else
seen this and, if so, been able to resolve the problem?

Ken

     [copy] Copying 1 file to C:\Documents and Settings\ken.rider

BUILD FAILED
java.lang.NullPointerException
        at java.util.Hashtable.put(Hashtable.java:389)
        at
org.apache.tools.ant.types.FilterSet.getFilterHash(FilterSet.java:191)
        at
org.apache.tools.ant.types.FilterSet.iReplaceTokens(FilterSet.java:344)
        at
org.apache.tools.ant.types.FilterSet.replaceTokens(FilterSet.java:327)
        at
org.apache.tools.ant.types.FilterSetCollection.replaceTokens(FilterSetCo
llection.java:66)
        at
org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:563)
        at
org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:315)
        at
org.apache.tools.ant.taskdefs.Copy.doFileOperations(Copy.java:608)
        at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:412)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:301)
        at org.apache.tools.ant.Target.performTasks(Target.java:328)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
        at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:301)
        at org.apache.tools.ant.Target.performTasks(Target.java:328)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:301)
        at org.apache.tools.ant.Target.performTasks(Target.java:328)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
        at
org.apache.tools.ant.Project.executeTargets(Project.java:1063)
        at org.apache.tools.ant.Main.runBuild(Main.java:632)
        at org.apache.tools.ant.Main.startAnt(Main.java:183)
        at org.apache.tools.ant.Main.start(Main.java:147)
        at org.apache.tools.ant.Main.main(Main.java:230)

Total time: 9 seconds
java.lang.NullPointerException
        at java.util.Hashtable.put(Hashtable.java:389)
        at
org.apache.tools.ant.types.FilterSet.getFilterHash(FilterSet.java:191)
        at
org.apache.tools.ant.types.FilterSet.iReplaceTokens(FilterSet.java:344)
        at
org.apache.tools.ant.types.FilterSet.replaceTokens(FilterSet.java:327)
        at
org.apache.tools.ant.types.FilterSetCollection.replaceTokens(FilterSetCo
llection.java:66)
        at
org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:563)
        at
org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:315)
        at
org.apache.tools.ant.taskdefs.Copy.doFileOperations(Copy.java:608)
        at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:412)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:301)
        at org.apache.tools.ant.Target.performTasks(Target.java:328)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
        at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:301)
        at org.apache.tools.ant.Target.performTasks(Target.java:328)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:301)
        at org.apache.tools.ant.Target.performTasks(Target.java:328)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
        at
org.apache.tools.ant.Project.executeTargets(Project.java:1063)
        at org.apache.tools.ant.Main.runBuild(Main.java:632)
        at org.apache.tools.ant.Main.startAnt(Main.java:183)
        at org.apache.tools.ant.Main.start(Main.java:147)
        at org.apache.tools.ant.Main.main(Main.java:230)


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


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



Mime
View raw message