Showing posts with label Jmeter. Show all posts
Showing posts with label Jmeter. Show all posts

Tuesday, September 23, 2014

Jmeter plugins for Apache Jmeter

I came across Jmeter-plugins project today and tried it out. It has a nice set of addons to support/complement existing functionality of Jmeter.

Monday, March 10, 2014

Fixing BSFException: unable to load language: java

I was using JMeter to execute BeanShell scripts that I have written and came across this exception. I had to waste sometime to find out what was the exact issue. Although I copied the BSF jar to the JMeter lib directory, it was not sufficient. When I added the bsh-bsf-2.0b4.jar, the script started running successfully. 

I thought someone else might find this tip useful, therefore blogging it.

Thursday, March 6, 2014

Fixing java.lang.ClassNotFoundException: org.apache.bsf.engines.java.JavaEngine

When using JMeter’s Java request sampler, I started seeing the below error.
2014/03/06 09:46:39 ERROR - org.apache.bsf.BSFManager: Exception : java.lang.ClassNotFoundException: org.apache.bsf.engines.java.JavaEngine
 at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
 at org.apache.bsf.BSFManager.loadScriptingEngine(BSFManager.java:693)
 at org.apache.jmeter.util.BSFTestElement.processFileOrScript(BSFTestElement.java:98)
 at org.apache.jmeter.visualizers.BSFListener.sampleOccurred(BSFListener.java:51)
 at org.apache.jmeter.threads.ListenerNotifier.notifyListeners(ListenerNotifier.java:84)
 at org.apache.jmeter.threads.JMeterThread.notifyListeners(JMeterThread.java:783)
 at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:443)
        at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)

Following steps will resolve this issue.

1. Remove existing bsf jar from the jmeter/lib directory
heshans@15mbp-08077:~/Dev/tools$ rm apache-jmeter-2.11/lib/bsf-2.4.0.jar

2. Download and extract BSF http://wi.wu-wien.ac.at/rgf/rexx/bsf4rexx/current/BSF4Rexx_install.zip.

3. Copy the following two jars to the jmeter/lib directory.
heshans@15mbp-08077:~/Dev/tools$ cp bsf4rexx/bsf-rexx-engine.jar apache-jmeter-2.11/lib/ 
heshans@15mbp-08077:~/Dev/tools$ cp bsf4rexx/bsf- apache-jmeter-2.11/lib/