dcsimg
ANT with bsf + rhino to use javascript
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Andre_Mainz
Posted On:   Wednesday, March 23, 2005 06:01 AM

Hello, I am using webtest from canoo and i want ANT to use javascript and so i installed bsf and rhino, but it is not working. I get always the error: BUILD FAILED java.lang.NoSuchMethodError: org.mozilla.javascript.Context.getDebuggableEngine()Lorg/mozilla/javascript/debug/DebuggableEngine; I installed apache ant 1.6.2, Jakarta BSF 2.3.0 and Mozilla´s rhino 1.5 R4. I also tried different Rhino releases like 1.5R2 1.5R3 1.5R5, but always get the same error message. All jars are on the classpath. I need your help! bye Andre    More>>

Hello,

I am using webtest from canoo and i want ANT to use javascript and so i installed bsf and rhino, but it is not working. I get always the error:



BUILD FAILED

java.lang.NoSuchMethodError: org.mozilla.javascript.Context.getDebuggableEngine()Lorg/mozilla/javascript/debug/DebuggableEngine;



I installed apache ant 1.6.2, Jakarta BSF 2.3.0 and Mozilla´s rhino 1.5 R4. I also tried different Rhino releases like 1.5R2 1.5R3 1.5R5, but always get the same error message.


All jars are on the classpath.



I need your help!



bye

Andre

   <<Less

Re: ANT with bsf + rhino to use javascript

Posted By:   Anonymous  
Posted On:   Tuesday, March 29, 2005 01:34 AM

Most common problem is using the wrong version of the dependend libraries. Check that against Ant´s manual - you must not use the latest lib...


I wouldnt place the jars on the classpath - using the environment variable is not as stable as you think and on the Ant list we advise not using that. We prefer the -lib option or placing Ant extensions in ${user.home}/.ant/lib


Debugging script inside Ant is not easy ... ok, it´s easy but a lot of stupid work: comment the whole script out and comment in line (block) by line (block) :-)


Just a moment - it´s only an idea. Eclipse 3.1 supports debugging of Ant buildfiles - maybe the script part, too.

Re: ANT with bsf + rhino to use javascript

Posted By:   Roseanne_Zhang  
Posted On:   Sunday, March 27, 2005 10:13 AM

Did you do importPackage in your JavaScript in build.xml?


Such as

importPackage(java.lang);
About | Sitemap | Contact