-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in recorder.bsf #42
Comments
Hi @jgupta, The exception references an undefined class name StringUtils, so there are dependencies that are not satisfied. Ensure you downloaded the JMeter binaries through http://jmeter.apache.org/download_jmeter.cgi rather than using a packaging management system as specified in https://github.com/moodlehq/moodle-performance-comparison/blob/master/README.md#requirements I'm leaving the ticket opened until you confirm that that was the problem. |
Thanks for replying. I did installed jmeter from that link. We used exactly following URL http://www.dsgnwrld.com/am//jmeter/binaries/apache-jmeter-2.11.zip |
Thanks for the report @jgupta I've just confirmed that there is an issue with the latest JMeter version (2.11) I see that commons-lang-2.6.jar, which contains the StringUtils version we are using is not included in JMeter 2.11; quickly switching recorder.bsf and recorderfunctions.bsf to use org.apache.commons.lang3.StringUtils instead of org.apache.commons.lang.StringUtils fixes the problem for me, but we need to be sure about it before integrating the patch. Until we test and integrate a solution for this, please use the JMeter 2.9 version, which includes commons-lang-2.6.jar. You can download it from the JMeter archives: http://archive.apache.org/dist/jmeter/binaries/ -> apache-jmeter-2.9.tgz |
… as the current StringUtils has been deprecated
Thank you. It works well with jmeter 2.9. |
Info about why it was removed: http://jmeter.apache.org/changes_history.html#Incompatible%20changes (last point) |
I've been comparing both APIs and it seems that there are no significant differences, only that lang3 is for Java 5 onwards:
http://tomjefferys.blogspot.com.au/2012/01/stringutils-so-thought-itd-be-good-to.html Merging changes in master, 25 and 26 |
Also we are only using StringUtils.rightPad() so it is safe to switch |
… as the current StringUtils has been deprecated
… as the current StringUtils has been deprecated
Using JMeter 2.9 r1437961 with a test plan generated by Moodle 2.7 does work for me, but it generates this error (pretty much continuously): "jmeter.visualizers.BeanShellListener: Problem in BeanShell script org.apache.jorphan.util.JMeterException: Error invoking bsh method". Using JMeter 2.11 produces the same results. java version "1.7.0_65" |
Hello onno, Can you please check jmeter dependencies are correctly installed. |
Same error as @onno-schuit , both with JMeter 2.9 and 2.11 (java version "1.7.0_45").
So no idea what the error is exactly. |
Hello Dimitri, Have you downloaded the binaries from http://jmeter.apache.org/download_jmeter.cgi rather than using a package management system. |
Same error as what others have reported "jmeter.visualizers.BeanShellListener: Problem in BeanShell script org.apache.jorphan.util.JMeterException: Error invoking bsh method: source Sourced file". I've tried JMeter 2.12 and 2.9. Running JDK 1.8.0.31 |
Thanks for reporting this @tHeSmUrF Will check this ... |
Hi @onno-schuit @alendit @tHeSmUrF, The previous error this issue was solving was pretty clear, a change from lang to lang3, this seems to be a different issue. I couldn't replicate the problem, I've tried using:
Just a few questions?
Resuming, do you always experience the same issue or only under specific conditions? TIA |
Hi all, Thanks |
Hi again, |
Hi, I'm closing this as far as the original problem reported here was fixed long, long ago. @bodypheo , I'm no sure that changing I've seen that you're using Jmeter 5.x... I'd suggest you to try with older versions (we are actively using Jmeter 2.9 (and 2.11) in our infrastructure. Maybe that's enough to get the Moodle plan (and results) running ok. I'd recommend you to continue @ #71 where another problem with recent JMeter version has been reported. There is a link to the old JMeter binaries there. Now, as said, closing this, ciao :-) |
@stronk7 Thank you very much for your insights, I will take a look at what you suggest. |
Using Centos 6.4 64-bit
java version 1.7.0_45
apache-jmeter-2.11
-------------ERROR LOG--------------
2014/01/13 00:54:49 INFO - jmeter.threads.JMeterThread: Thread started: Moodle Test 2-3
2014/01/13 00:54:49 INFO - jmeter.threads.ThreadGroup: Started thread group number 2
2014/01/13 00:54:49 INFO - jmeter.engine.StandardJMeterEngine: All thread groups have been started
2014/01/13 00:54:50 ERROR - jmeter.util.BeanShellInterpreter: Error invoking bsh method: source Sourced file: recorder.bsf : Typed variable declaration : Typed variable declaration : Attempt to resolve method: rightPad() on undefined variable or class name: StringUtils
2014/01/13 00:54:50 WARN - jmeter.visualizers.BeanShellListener: Problem in BeanShell script org.apache.jorphan.util.JMeterException: Error invoking bsh method: source Sourced file: recorder.bsf : Typed variable declaration : Typed variable declaration : Attempt to resolve method: rightPad() on undefined variable or class name: StringUtils
2014/01/13 00:54:50 INFO - jmeter.threads.JMeterThread: Thread started: Moodle Test 2-4
2014/01/13 00:54:50 ERROR - jmeter.util.BeanShellInterpreter: Error invoking bsh method: source Sourced file: recorder.bsf : Typed variable declaration : Typed variable declaration : Attempt to resolve method: rightPad() on undefined variable or class name: StringUtils
2014/01/13 00:54:50 WARN - jmeter.visualizers.BeanShellListener: Problem in BeanShell script org.apache.jorphan.util.JMeterException: Error invoking bsh method: source Sourced file: recorder.bsf : Typed variable declaration : Typed variable declaration : Attempt to resolve method: rightPad() on undefined variable or class name: StringUtils
2014/01/13 00:54:50 INFO - jmeter.threads.JMeterThread: Thread started: Moodle Test 2-5
2014/01/13 00:54:50 ERROR - jmeter.util.BeanShellInterpreter: Error invoking bsh method: source Sourced file: recorder.bsf : Typed variable declaration : Typed variable declaration : Attempt to resolve method: rightPad() on undefined variable or class name: StringUtils
2014/01/13 00:54:50 WARN - jmeter.visualizers.BeanShellListener: Problem in BeanShell script org.apache.jorphan.util.JMeterException: Error invoking bsh method: source Sourced file: recorder.bsf : Typed variable declaration : Typed variable declaration : Attempt to resolve method: rightPad() on undefined variable or class name: StringUtils
2014/01/13 00:54:50 INFO - jmeter.threads.JMeterThread: Thread started: Moodle Test 2-6
The text was updated successfully, but these errors were encountered: