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 27031] New: - BSF 2.3 RC1 hindering Javascript execution
Date Wed, 18 Feb 2004 14:15:39 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27031>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27031

BSF 2.3 RC1 hindering Javascript execution

           Summary: BSF 2.3 RC1 hindering Javascript execution
           Product: Ant
           Version: 1.6.1
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Optional Tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: thedew@hotmail.com


I was unable to get the <script language="javascript"> task to work in version 
1.6.0 and 1.6.1 of ant using BSF 2.3.0RC1.  Running ant on a build script 
containing this task (regardless of whether or not there was javascript to 
execute within the <script> tags) would give the following exception when using 
a 1.3.1 JDK:

java.lang.NoSuchMethodError
        at org.apache.tools.ant.Project.executeTarget(Project.java:1224)
        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.launch.Launcher.run(Launcher.java:197)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
--- Nested Exception ---
java.lang.NoSuchMethodError
        at org.apache.bsf.engines.javascript.JavaScriptEngine.eval(Unknown Sourc
e)
        at org.apache.bsf.util.BSFEngineImpl.exec(Unknown Source)
        at org.apache.bsf.BSFManager$6.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.bsf.BSFManager.exec(Unknown Source)
        at org.apache.tools.ant.util.ScriptRunner.executeScript(ScriptRunner.jav
a:130)
        at org.apache.tools.ant.taskdefs.optional.Script.execute(Script.java:61)

        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.launch.Launcher.run(Launcher.java:197)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)



If I used JDK 1.4.2, I would get a similar, but different exception:

java.lang.NoSuchMethodError: org.mozilla.javascript.Context.getDebuggableEngine(
)Lorg/mozilla/javascript/debug/DebuggableEngine;
        at org.apache.tools.ant.Project.executeTarget(Project.java:1224)
        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.launch.Launcher.run(Launcher.java:197)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
Caused by: java.lang.NoSuchMethodError: org.mozilla.javascript.Context.getDebugg
ableEngine()Lorg/mozilla/javascript/debug/DebuggableEngine;
        at org.apache.bsf.engines.javascript.JavaScriptEngine.eval(Unknown Sourc
e)
        at org.apache.bsf.util.BSFEngineImpl.exec(Unknown Source)
        at org.apache.bsf.BSFManager$6.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.bsf.BSFManager.exec(Unknown Source)
        at org.apache.tools.ant.util.ScriptRunner.executeScript(ScriptRunner.jav
a:130)
        at org.apache.tools.ant.taskdefs.optional.Script.execute(Script.java:61)

        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)
        ... 5 more
--- Nested Exception ---
java.lang.NoSuchMethodError: org.mozilla.javascript.Context.getDebuggableEngine(
)Lorg/mozilla/javascript/debug/DebuggableEngine;
        at org.apache.bsf.engines.javascript.JavaScriptEngine.eval(Unknown Sourc
e)
        at org.apache.bsf.util.BSFEngineImpl.exec(Unknown Source)
        at org.apache.bsf.BSFManager$6.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.bsf.BSFManager.exec(Unknown Source)
        at org.apache.tools.ant.util.ScriptRunner.executeScript(ScriptRunner.jav
a:130)
        at org.apache.tools.ant.taskdefs.optional.Script.execute(Script.java:61)

        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.launch.Launcher.run(Launcher.java:197)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)


I tried rolling back to BSF 2.2, however,I could not get this to work with ant 
1.6.x (I would get a java.lang.NoClassDefFoundError: 
org/apache/bsf/BSFException...but I think you documented in the manual that you 
had to use BSF 2.3.0RC1 or higher anyways).  Currently, to get scripting to 
work, I'm using BSF 2.2 with ant 1.5.4.  In all situtations described, I was 
using Rhino1.5 R4.1's js.jar.

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


Mime
View raw message