Hi
I have found a strange issue with Javascript
I need to to do some string manipulation for a test, and I choosed to do in
Javascript.
Then I have found that there is no way to make Javascript working in my
installation.
I went down to a simple plan with only a BSF sampler and a debug sampler.
In the BSF sampler, I select "Jscript"
The scripts reduced down to a mere ";"
BTW, any other language fails with the same error except Beanshell.
The result I got are like following:
====================
Thread Name: Thread Group 1-1
Sample Start: 2012-03-08 23:29:21 CET
Load time: 1
Latency: 0
Size in bytes: 0
Headers size in bytes: 0
Body size in bytes: 0
Sample Count: 1
Error Count: 1
Response code: 500
Response message: org.apache.bsf.BSFException: unable to load language: jscript
Response headers:
SampleResult fields:
ContentType:
DataEncoding: null
====================
In the log file, I got the following:
2012/03/08 23:50:11 INFO - jmeter.threads.JMeterThread: Thread started: Thread
Group 1-1
2012/03/08 23:50:11 ERROR - org.apache.bsf.BSFManager: Exception : java.lang.ClassNotFoundException:
org.apache.bsf.engines.activescript.ActiveScriptEngine
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.apache.bsf.BSFManager.loadScriptingEngine(BSFManager.java:693)
at
org.apache.jmeter.protocol.java.sampler.BSFSampler.sample(BSFSampler.java:92)
at
org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:416)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:271)
at java.lang.Thread.run(Unknown Source)
2012/03/08 23:50:11 WARN - jmeter.protocol.java.sampler.BSFSampler: BSF error org.apache.bsf.BSFException: unable to load language:
jscript
at org.apache.bsf.BSFManager.loadScriptingEngine(BSFManager.java:718)
at
org.apache.jmeter.protocol.java.sampler.BSFSampler.sample(BSFSampler.java:92)
at
org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:416)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:271)
at java.lang.Thread.run(Unknown Source)
2012/03/08 23:50:11 INFO - jmeter.threads.JMeterThread: Thread finished:
Thread Group 1-1
===============
Installation data
Jmeter 2.6 r1237317
Java version "1.6.0_29", Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
Windows 7
It is a plain Jmeter 2.6 installation. I copied the extracted file, I only added
"JMeterPlugins.jar"
===============
The documentation says that Javascript is working by default.
My idea is that some thing is missing in the Jars.
Between the others, I checked in .\lib:
bsf-2.4.0.jar. bsf-api-3.1.jar, bsh-2.0b5.jar, js-1.7R2.jar
As I final note, I did the same test with 2.5 and had no problem.
Do I miss some step in the installation? Is there anything I can check?
Any suggestion welcome
Thank you and best regards
Sergio
--
Ing. Sergio Boso
Mail:
Web:
PEC:
Cell:
Linkedin:
Skype:
In caso di erronea ricezione da parte di persona diversa, siete pregati di eliminare il messaggio e i suoi allegati in modo
definitivo dai vostri archivi e di volercelo comunicare immediatamente restituendoci il messaggio via e-mail al seguente
[email protected] <mailto:[email protected]>
L'interessato può, inoltre, esercitare tutti i diritti di accesso sui propri dati previsti dal decreto 196/2003, tra i quali i
diritti di rettifica, aggiornamento e cancellazione, inviando un messaggio all'indirizzo:[email protected]
<mailto:[email protected]>