[Webtest] scriptStep: JavaScriptEngine not found

Philippe Schoch webtest@lists.canoo.com
Thu, 13 Apr 2006 13:31:24 +0200


This is a cryptographically signed message in MIME format.

--------------ms010705050100070103020401
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

I have an exception, that the javascript engine cannot be found at 
'scriptStep'.

[scriptStep] ERROR (org.apache.bsf.BSFManager) - Exception :
[scriptStep] java.lang.ClassNotFoundException: 
org.apache.bsf.engines.javascript.JavaScriptEngine
[scriptStep] at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
[scriptStep] at java.security.AccessController.doPrivileged(Native Method)
[scriptStep] at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
[scriptStep] at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
[scriptStep] at 
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
[scriptStep] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
[scriptStep] at org.apache.bsf.BSFManager.loadScriptingEngine(Unknown 
Source)
[scriptStep] at org.apache.bsf.BSFManager.exec(Unknown Source)
[scriptStep] at 
com.canoo.webtest.boundary.ResetScriptRunner.executeScript(ResetScriptRunner.java:131)
[scriptStep] at 
com.canoo.webtest.extension.ScriptStep.executeByRunner(ScriptStep.java:101)
[scriptStep] at 
com.canoo.webtest.extension.ScriptStep.doExecute(ScriptStep.java:62)
...

This sounds strange to me because my WEBTEST_HOME\lib dir contains 
'bsf-20060305.jar' where 
'org.apache.bsf.engines.javascript.JavaScriptEngine' can be found.
Also the     <import file="${webtest.home}/lib/classpath.xml"/>  
statement doesn't help more (as I actually expected cause other 
classpath elements can be found by webtest).

Can anybody help me what I have to consider running the scriptStep?

Cheers,
Phil

<project name="ProfeOfConcept" basedir=".." default="POC">
   
    <property name="webtest.home" location="C:/Programme/canoo-webtest" />
    <property name="field.hidden.name" value="_test:_idcl" />
    <property name="field.hidden.value" value="_id0" />   
    <import file="${webtest.home}/lib/taskdef.xml"/>   
    <import file="${webtest.home}/lib/classpath.xml"/>

    <target name="POC">
        <webtest name="POC">
            &config;
            <steps>
                <invoke
                    description="get the test.faces page"
                    url="test.faces" />
                <verifyText
                    description="the only text on the page"
                    text="Test" />
                <scriptStep
                    description="emulate command-link onclick-javascript 
code"
                    language="javascript">
                    
document.forms['_test']['_test:_idcl'].value='_test:_id0'; 
document.forms['_test'].submit(); return false;
                </scriptStep>         
              </steps>
        </webtest>
    </target>
</project>


--------------ms010705050100070103020401
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIJWTCC
AwcwggJwoAMCAQICEDGh5KvKbKlle3oHEKH/EI0wDQYJKoZIhvcNAQEEBQAwYjELMAkGA1UE
BhMCWkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMT
I1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA2MDMwNzA5MDEwN1oX
DTA3MDMwNzA5MDEwN1owZzEPMA0GA1UEBBMGU2Nob2NoMREwDwYDVQQqEwhQaGlsaXBwZTEY
MBYGA1UEAxMPUGhpbGlwcGUgU2Nob2NoMScwJQYJKoZIhvcNAQkBFhhwaGlsaXBwZS5zY2hv
Y2hAZXJnb24uY2gwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkGIxu9RmE95KX
kuSmS+EJjtZ1H+ip99dSo94ThGhowhIslE2J6Z03v8tPXtBzHCPM/TQy3yYcRVKDXiVR6n3a
WSL9Q0ltqcgHStXczkM8AXyy9TraYatHHb4AMI9QRHARYM/mI9StijmFJuWF+mCRL38rc+3h
vtnl/f8qEMTbe4ErkiceFlI3lNRfqrevYTag0CWoJYIFcCaPIFkRgOAvq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