ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mangesh Moghe <mangesh.mo...@tcs.com>
Subject RE: Executing javascript ant task with jdk 1.6
Date Tue, 16 Nov 2010 09:45:20 GMT
Here is the output. I have kept bsf.jar in the classpath in ant.sh as 
without that I am getting error  "java.lang.NoClassDefFoundError: 
org/apache/bsf/BSFException". Below error is when I have removed "js.jar" 
from classpath. This output is with -debug option.

===========BEGIN==============================
Adding reference: ant.PropertyHelper
Detected Java version: 1.5 in: /home/java6/jre
Detected OS: HP-UX
Adding reference: ant.ComponentHelper
Setting ro project property: ant.version -> Apache Ant version 1.6.5 
compiled on June 2 2005
Setting ro project property: ant.file -> /home/usr/test2.xml
Adding reference: ant.projectHelper
Adding reference: ant.parsing.context
Adding reference: ant.targets
parsing buildfile /home/usr/test2.xml with URI = 
file:///home/usr/test2.xml
Setting ro project property: ant.file.null -> /home/usr/test2.xml
Project base dir set to: /home/usr
 +Target: 
Adding reference: jars.from.@{p}
[echoproperties] #Ant properties
[echoproperties] #Tue Nov 16 01:35:57 PST 2010
[echoproperties] ant.file=/home/usr/test2.xml
[echoproperties] ant.file.null=/home/usr/test2.xml
[echoproperties] ant.java.version=1.5
[echoproperties] ant.home=/apache_ant
[echoproperties] ant.library.dir=/apache_ant/lib
[echoproperties] ant.version=Apache Ant version 1.6.5 compiled on June 2 
2005
 +Datatype printpath org.apache.tools.ant.taskdefs.MacroInstance
Could not load a dependent class 
(com/sun/media/jai/codec/FileSeekableStream) for type image
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type 
sshexec
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type scp
Adding reference: jars.from./apache_ant/lib
Could not load a dependent class 
(com/sun/media/jai/codec/FileSeekableStream) for type image
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type 
sshexec
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type scp
Could not load a dependent class (jdepend/xmlui/JDepend) for type jdepend
Could not load a dependent class (junit/framework/Test) for type junit
fileset: Setup scanner in dir /apache_ant/lib with patternSet{ includes: 
[**/*.jar] excludes: [] }
[pathconvert] Set property jars.from./apache_ant/lib.string = 
/apache_ant/lib/ant-antlr.jar
[pathconvert] /apache_ant/lib/ant-apache-bcel.jar
[pathconvert] /apache_ant/lib/ant-apache-bsf.jar
[pathconvert] /apache_ant/lib/ant-apache-log4j.jar
[pathconvert] /apache_ant/lib/ant-apache-oro.jar
[pathconvert] /apache_ant/lib/ant-apache-regexp.jar
[pathconvert] /apache_ant/lib/ant-apache-resolver.jar
[pathconvert] /apache_ant/lib/ant-bootstrap.jar
[pathconvert] /apache_ant/lib/ant-commons-logging.jar
[pathconvert] /apache_ant/lib/ant-commons-net.jar
[pathconvert] /apache_ant/lib/ant-icontract.jar
[pathconvert] /apache_ant/lib/ant-jai.jar
[pathconvert] /apache_ant/lib/ant-javamail.jar
[pathconvert] /apache_ant/lib/ant-jdepend.jar
[pathconvert] /apache_ant/lib/ant-jmf.jar
[pathconvert] /apache_ant/lib/ant-jsch.jar
[pathconvert] /apache_ant/lib/ant-junit.jar
[pathconvert] /apache_ant/lib/ant-launcher.jar
[pathconvert] /apache_ant/lib/ant-netrexx.jar
[pathconvert] /apache_ant/lib/ant-nodeps.jar
[pathconvert] /apache_ant/lib/ant-starteam.jar
[pathconvert] /apache_ant/lib/ant-stylebook.jar
[pathconvert] /apache_ant/lib/ant-swing.jar
[pathconvert] /apache_ant/lib/ant-trax.jar
[pathconvert] /apache_ant/lib/ant-vaj.jar
[pathconvert] /apache_ant/lib/ant-weblogic.jar
[pathconvert] /apache_ant/lib/ant-xalan1.jar
[pathconvert] /apache_ant/lib/ant-xslp.jar
[pathconvert] /apache_ant/lib/ant.jar
[pathconvert] /apache_ant/lib/xercesImpl.jar
[pathconvert] /apache_ant/lib/xml-apis.jar
Setting project property: jars.from./apache_ant/lib.string -> 
/apache_ant/lib/ant-antlr.jar
/apache_ant/lib/ant-apache-bcel.jar
/apache_ant/lib/ant-apache-bsf.jar
/apache_ant/lib/ant-apache-log4j.jar
/apache_ant/lib/ant-apache-oro.jar
/apache_ant/lib/ant-apache-regexp.jar
/apache_ant/lib/ant-apache-resolver.jar
/apache_ant/lib/ant-bootstrap.jar
/apache_ant/lib/ant-commons-logging.jar
/apache_ant/lib/ant-commons-net.jar
/apache_ant/lib/ant-icontract.jar
/apache_ant/lib/ant-jai.jar
/apache_ant/lib/ant-javamail.jar
/apache_ant/lib/ant-jdepend.jar
/apache_ant/lib/ant-jmf.jar
/apache_ant/lib/ant-jsch.jar
/apache_ant/lib/ant-junit.jar
/apache_ant/lib/ant-launcher.jar
/apache_ant/lib/ant-netrexx.jar
/apache_ant/lib/ant-nodeps.jar
/apache_ant/lib/ant-starteam.jar
/apache_ant/lib/ant-stylebook.jar
/apache_ant/lib/ant-swing.jar
/apache_ant/lib/ant-trax.jar
/apache_ant/lib/ant-vaj.jar
/apache_ant/lib/ant-weblogic.jar
/apache_ant/lib/ant-xalan1.jar
/apache_ant/lib/ant-xslp.jar
/apache_ant/lib/ant.jar
/apache_ant/lib/xercesImpl.jar
/apache_ant/lib/xml-apis.jar
     [echo] /apache_ant/lib/ant-antlr.jar
     [echo] /apache_ant/lib/ant-apache-bcel.jar
     [echo] /apache_ant/lib/ant-apache-bsf.jar
     [echo] /apache_ant/lib/ant-apache-log4j.jar
     [echo] /apache_ant/lib/ant-apache-oro.jar
     [echo] /apache_ant/lib/ant-apache-regexp.jar
     [echo] /apache_ant/lib/ant-apache-resolver.jar
     [echo] /apache_ant/lib/ant-bootstrap.jar
     [echo] /apache_ant/lib/ant-commons-logging.jar
     [echo] /apache_ant/lib/ant-commons-net.jar
     [echo] /apache_ant/lib/ant-icontract.jar
     [echo] /apache_ant/lib/ant-jai.jar
     [echo] /apache_ant/lib/ant-javamail.jar
     [echo] /apache_ant/lib/ant-jdepend.jar
     [echo] /apache_ant/lib/ant-jmf.jar
     [echo] /apache_ant/lib/ant-jsch.jar
     [echo] /apache_ant/lib/ant-junit.jar
     [echo] /apache_ant/lib/ant-launcher.jar
     [echo] /apache_ant/lib/ant-netrexx.jar
     [echo] /apache_ant/lib/ant-nodeps.jar
     [echo] /apache_ant/lib/ant-starteam.jar
     [echo] /apache_ant/lib/ant-stylebook.jar
     [echo] /apache_ant/lib/ant-swing.jar
     [echo] /apache_ant/lib/ant-trax.jar
     [echo] /apache_ant/lib/ant-vaj.jar
     [echo] /apache_ant/lib/ant-weblogic.jar
     [echo] /apache_ant/lib/ant-xalan1.jar
     [echo] /apache_ant/lib/ant-xslp.jar
     [echo] /apache_ant/lib/ant.jar
     [echo] /apache_ant/lib/xercesImpl.jar
     [echo] /apache_ant/lib/xml-apis.jar
Could not load a dependent class 
(com/sun/media/jai/codec/FileSeekableStream) for type image
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type 
sshexec
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type scp
Adding reference: jars.from.@{p}

BUILD FAILED
java.lang.NoSuchMethodError: 
org.mozilla.javascript.Context.getDebuggableEngine()Lorg/mozilla/javascript/debug/DebuggableEngine;
        at org.apache.bsf.engines.javascript.JavaScriptEngine.eval(Unknown 
Source)
        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.java:128)
        at 
org.apache.tools.ant.taskdefs.optional.Script.execute(Script.java:60)
        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.helper.ProjectHelper2.parse(ProjectHelper2.java:142)
        at 
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:91)
        at org.apache.tools.ant.Main.runBuild(Main.java:653)
        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 second
java.lang.NoSuchMethodError: 
org.mozilla.javascript.Context.getDebuggableEngine()Lorg/mozilla/javascript/debug/DebuggableEngine;
        at org.apache.bsf.engines.javascript.JavaScriptEngine.eval(Unknown 
Source)
        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.java:128)
        at 
org.apache.tools.ant.taskdefs.optional.Script.execute(Script.java:60)
        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.helper.ProjectHelper2.parse(ProjectHelper2.java:142)
        at 
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:91)
        at org.apache.tools.ant.Main.runBuild(Main.java:653)
        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)
org.mozilla.javascript.Context.getDebuggableEngine()Lorg/mozilla/javascript/debug/DebuggableEngine;

============END=======================================================

Regards
Mangesh Moghe



From:
"Ludwig, Michael" <Michael.Ludwig@delphi-mb.de>
To:
"Ant Users List" <user@ant.apache.org>
Date:
11/15/2010 07:04 PM
Subject:
RE: Executing javascript ant task with jdk 1.6



> I tried your solution but still the same error is coming. I removed
> bsf.jar and js.jar from classpath and put "rt.jar" from JDK6 in
> classpath as this jar contains "org.mozilla.javascript" package and
> tried to test but still same error .

No need to put rt.jar on the classpath - it is there by default.

Can you post the output from the following script?

<project>
<!-- <echoproperties prefix="java"/> -->
<echoproperties prefix="ant"/>
<macrodef name="printpath">
<attribute name="p"/>
<sequential>
<fileset dir="@{p}" includes="**/*.jar" id="jars.from.@{p}"/>
<pathconvert refid="jars.from.@{p}" pathsep="${line.separator}"
          property="jars.from.@{p}.string"/>
<echo>${jars.from.@{p}.string}</echo>
</sequential>
</macrodef>
<printpath p="${user.home}/.ant/lib"/>
<printpath p="${ant.library.dir}"/>
<script language="javascript">
println("moin");
</script>
</project>

Michael

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



=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message