ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 53831] New: calling antcall from <script> throws a java.lang.NullPointerException
Date Wed, 05 Sep 2012 14:10:14 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=53831

          Priority: P2
            Bug ID: 53831
          Assignee: notifications@ant.apache.org
           Summary: calling antcall from <script> throws a
                    java.lang.NullPointerException
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: hashar@free.fr
          Hardware: All
            Status: NEW
           Version: unspecified
         Component: Optional Tasks
           Product: Ant

In the ant 1.8.2 build system, I am having a javascript that rely on an
<antcall/>. That causes me a java.lang.NullPointerException which points to
antcall.

<project default="main">
    <target name="main">
        <script language="javascript"> <![CDATA[
        task = project.createTask( 'macro' );
        task.execute();
        ]]></script>
    </target>

    <macrodef name="macro">
        <sequential>
            <antcall target="antcall" />
        </sequential>
    </macrodef>

    <target name="antcall">
        <echo>[antcall] succeed</echo>
    </target>

</project>


build.xml:11: java.lang.NullPointerException( #3 ... ). The stacktrace just
talk about RhinoScriptEngine, not sure that is any helpful



at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:153)
at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:167)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:247)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.util.ReflectUtil.invoke(ReflectUtil.java:108)
at org.apache.tools.ant.util.ReflectWrapper.invoke(ReflectWrapper.java:81)
at
org.apache.tools.ant.util.optional.JavaxScriptRunner.evaluateScript(JavaxScriptRunner.java:103)
at
org.apache.tools.ant.util.optional.JavaxScriptRunner.executeScript(JavaxScriptRunner.java:67)
at org.apache.tools.ant.taskdefs.optional.Script.execute(Script.java:52)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:809)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

-- 
You are receiving this mail because:
You are the assignee for the bug.

Mime
View raw message