My problem is about JMeter and the BeanShell PostProcessor.
I have developped a Java project with Eclipse and exported that project in a jar. I have put this jar in /lib/ext folder of JMeter.
When I call java -jar C:\Program Files\apache-jmeter-2.9\lib\ext\myJar.jar everything works fine.
Now I want to call the method in my jar inside JMeter. Inside my Beanshell processor I put this code :
import bsh.LoadProperties;
import bsh.SSOTokenHelper;
LoadProperties loadProperties = new LoadProperties();
loadProperties.init();
result = SSOTokenHelper.getSecurityToken();
For information, it's the exact code that I have in my main class. But in the log file of Jmeter I have this message :
jmeter.util.BeanShellInterpreter: Error invoking bsh method: eval Sourced file: inline evaluation of: ``import bsh.LoadProperties; import bsh.SSOTokenHelper; LoadProperties loadProper . . . '' : Method Invocation SSOTokenHelper.getSecurityToken
I don't understand why it's working when I call my jar directly and why it's not working when i do the exact same thing by JMeter.
Thanks for your help.