Login | Register
My pages Projects Community openCollabNet

Discussions > users > RE: NullPointerException with AntCallBack

antelope
Discussion topic

Back to topic list

RE: NullPointerException with AntCallBack

Author Simon Taylor <Simon dot Taylor at corizon dot com>
Full name Simon Taylor <Simon dot Taylor at corizon dot com>
Date 2006-01-26 08:44:27 PST
Message Hey Dale,
I am on Ant version 1.6.5 and the latest 3.2.10 of antelope, I have now
managed to overcome the problem by using the AntCallBack from
ant-contrib.
Thanks for the response,
Simon

For interest, here is some test code..removing the import makes it
work..


    <taskdef name="antcallback"
classname="ise.antel​ope.tasks.AntCallBac​k"/>
    <import file="deploycorizon.xml"/>

    <target name="all">
        <antcallback target="call" return="test.prop">
           <param name="test1.prop" value="foo"/>
        </antcallback>
   </target>
   
   <target name="call">
        <echo>this is the callback target</echo>
   </target>
    


-----Original Message-----
From: Dale Anson [mailto:danson at grafidog dot com]
Sent: 26 January 2006 15:46
To: Simon Taylor
Cc: users at antelope dot tigris dot org
Subject: Re: NullPointerException with AntCallBack

What version of Ant are you using? Can you provide a short example
build file that demonstrates the problem?

Thanks,

Dale



On Thu, 26 Jan 2006, Simon Taylor wrote:

> I am getting the following error trying to use AntCallBack in a
> script, I have an import command which imports another script into
> this one (script is empty). If I remove the import command then the
> AntCallBack works.
> Any Help appreciated.
> Simon
>
>
> BUILD FAILED
> C:\deployment\gene​ric\deployresolve.x​ml:40: The following error
> occurred while executing this line:
> C:\deployment\gene​ric\deployresolve.x​ml:3:
> java.lang.NullPointerException
> at
> org.apache.tools.ant​.ProjectHelper.addLo​cationToBuildExcepti​on(Project
> He
> lper.java:539)
> at org.apache.tools.ant​.taskdefs.Ant.execut​e(Ant.java:384)
> at
> org.apache.tools.ant​.taskdefs.CallTarget​.execute(CallTarget.​java:107)
> at
> org.apache.tools.ant​.UnknownElement.exec​ute(UnknownElement.j​ava:275)
> at org.apache.tools.ant​.Task.perform(Task.j​ava:364)
> at org.apache.tools.ant​.Target.execute(Targ​et.java:341)
> at org.apache.tools.ant​.Target.performTasks​(Target.java:369)
> at
> org.apache.tools.ant​.Project.executeSort​edTargets(Project.ja​va:1216)
> at
org.apache.tools.ant​.Project.executeTarg​et(Project.java:1185​)
> at
> org.apache.tools.ant​.helper.DefaultExecu​tor.executeTargets(D​efaultExec
> ut
> or.java:40)
> at
> org.apache.tools.ant​.Project.executeTarg​ets(Project.java:106​8)
> 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.mai​n(Launcher.java:67)
> Caused by: C:\deployment\gene​ric\deployresolve.x​ml:3:
> java.lang.NullPointerException
> at org.apache.tools.ant​.Task.perform(Task.j​ava:373)
> at org.apache.tools.ant​.Target.execute(Targ​et.java:341)
> at
> org.apache.tools.ant​.helper.ProjectHelpe​r2.parse(ProjectHelp​er2.java:1
> 42
> )
> at ise.antelope.tasks.A​ntCallBack.execute(A​ntCallBack.java:373)​
> at
> org.apache.tools.ant​.UnknownElement.exec​ute(UnknownElement.j​ava:275)
> at org.apache.tools.ant​.Task.perform(Task.j​ava:364)
> at org.apache.tools.ant​.Target.execute(Targ​et.java:341)
> at org.apache.tools.ant​.Target.performTasks​(Target.java:369)
> at
> org.apache.tools.ant​.Project.executeSort​edTargets(Project.ja​va:1216)
> at
> org.apache.tools.ant​.helper.SingleCheckE​xecutor.executeTarge​ts(SingleC
> he
> ckExecutor.java:37)
> at
> org.apache.tools.ant​.Project.executeTarg​ets(Project.java:106​8)
> at org.apache.tools.ant​.taskdefs.Ant.execut​e(Ant.java:382)
> ... 13 more
> Caused by: java.lang.NullPointerException
> at
> org.apache.tools.ant​.taskdefs.ImportTask​.execute(ImportTask.​java:96)
> at
> org.apache.tools.ant​.UnknownElement.exec​ute(UnknownElement.j​ava:275)
> at org.apache.tools.ant​.Task.perform(Task.j​ava:364)
> ... 24 more
> --- Nested Exception ---
> C:\deployment\gene​ric\deployresolve.x​ml:3:
> java.lang.NullPointerException
> at org.apache.tools.ant​.Task.perform(Task.j​ava:373)
> at org.apache.tools.ant​.Target.execute(Targ​et.java:341)
> at
> org.apache.tools.ant​.helper.ProjectHelpe​r2.parse(ProjectHelp​er2.java:1
> 42
> )
> at ise.antelope.tasks.A​ntCallBack.execute(A​ntCallBack.java:373)​
> at
> org.apache.tools.ant​.UnknownElement.exec​ute(UnknownElement.j​ava:275)
> at org.apache.tools.ant​.Task.perform(Task.j​ava:364)
> at org.apache.tools.ant​.Target.execute(Targ​et.java:341)
> at org.apache.tools.ant​.Target.performTasks​(Target.java:369)
> at
> org.apache.tools.ant​.Project.executeSort​edTargets(Project.ja​va:1216)
> at
> org.apache.tools.ant​.helper.SingleCheckE​xecutor.executeTarge​ts(SingleC
> he
> ckExecutor.java:37)
> at
> org.apache.tools.ant​.Project.executeTarg​ets(Project.java:106​8)
> at org.apache.tools.ant​.taskdefs.Ant.execut​e(Ant.java:382)
> at
> org.apache.tools.ant​.taskdefs.CallTarget​.execute(CallTarget.​java:107)
> at
> org.apache.tools.ant​.UnknownElement.exec​ute(UnknownElement.j​ava:275)
> at org.apache.tools.ant​.Task.perform(Task.j​ava:364)
> at org.apache.tools.ant​.Target.execute(Targ​et.java:341)
> at org.apache.tools.ant​.Target.performTasks​(Target.java:369)
> at
> org.apache.tools.ant​.Project.executeSort​edTargets(Project.ja​va:1216)
> at
org.apache.tools.ant​.Project.executeTarg​et(Project.java:1185​)
> at
> org.apache.tools.ant​.helper.DefaultExecu​tor.executeTargets(D​efaultExec
> ut
> or.java:40)
> at
> org.apache.tools.ant​.Project.executeTarg​ets(Project.java:106​8)
> 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.mai​n(Launcher.java:67)
> Caused by: java.lang.NullPointerException
> at
> org.apache.tools.ant​.taskdefs.ImportTask​.execute(ImportTask.​java:96)
> at
> org.apache.tools.ant​.UnknownElement.exec​ute(UnknownElement.j​ava:275)
> at org.apache.tools.ant​.Task.perform(Task.j​ava:364)
> ... 24 more
> --- Nested Exception ---
> java.lang.NullPointerException
> at
> org.apache.tools.ant​.taskdefs.ImportTask​.execute(ImportTask.​java:96)
> at
> org.apache.tools.ant​.UnknownElement.exec​ute(UnknownElement.j​ava:275)
> at org.apache.tools.ant​.Task.perform(Task.j​ava:364)
> at org.apache.tools.ant​.Target.execute(Targ​et.java:341)
> at
> org.apache.tools.ant​.helper.ProjectHelpe​r2.parse(ProjectHelp​er2.java:1
> 42
> )
> at ise.antelope.tasks.A​ntCallBack.execute(A​ntCallBack.java:373)​
> at
> org.apache.tools.ant​.UnknownElement.exec​ute(UnknownElement.j​ava:275)
> at org.apache.tools.ant​.Task.perform(Task.j​ava:364)
> at org.apache.tools.ant​.Target.execute(Targ​et.java:341)
> at org.apache.tools.ant​.Target.performTasks​(Target.java:369)
> at
> org.apache.tools.ant​.Project.executeSort​edTargets(Project.ja​va:1216)
> at
> org.apache.tools.ant​.helper.SingleCheckE​xecutor.executeTarge​ts(SingleC
> he
> ckExecutor.java:37)
> at
> org.apache.tools.ant​.Project.executeTarg​ets(Project.java:106​8)
> at org.apache.tools.ant​.taskdefs.Ant.execut​e(Ant.java:382)
> at
> org.apache.tools.ant​.taskdefs.CallTarget​.execute(CallTarget.​java:107)
> at
> org.apache.tools.ant​.UnknownElement.exec​ute(UnknownElement.j​ava:275)
> at org.apache.tools.ant​.Task.perform(Task.j​ava:364)
> at org.apache.tools.ant​.Target.execute(Targ​et.java:341)
> at org.apache.tools.ant​.Target.performTasks​(Target.java:369)
> at
> org.apache.tools.ant​.Project.executeSort​edTargets(Project.ja​va:1216)
> at
org.apache.tools.ant​.Project.executeTarg​et(Project.java:1185​)
> at
> org.apache.tools.ant​.helper.DefaultExecu​tor.executeTargets(D​efaultExec
> ut
> or.java:40)
> at
> org.apache.tools.ant​.Project.executeTarg​ets(Project.java:106​8)
> 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.mai​n(Launcher.java:67)
>
> Total time: 1 second
>
> --------------------​--------------------​--------------------​---------
> To unsubscribe, e-mail: users-unsubscribe@an​telope.tigris.org
> For additional commands, e-mail: users-help at antelope dot tigris dot org
>
>

« Previous message in topic | 2 of 2 | Next message in topic »

Messages

Show all messages in topic

NullPointerException with AntCallBack Simon Taylor <Simon dot Taylor at corizon dot com> Simon Taylor <Simon dot Taylor at corizon dot com> 2006-01-26 05:29:31 PST
     RE: NullPointerException with AntCallBack Simon Taylor <Simon dot Taylor at corizon dot com> Simon Taylor <Simon dot Taylor at corizon dot com> 2006-01-26 08:44:27 PST
Messages per page: