2
votes

When i try to execute the following code in jmeter:

import org.json.JSONArray; 
import org.json.JSONObject;
String jsonString = prev . . . ''  

I get the following error:

ERROR - jmeter.util.BeanShellInterpreter: Error invoking bsh method: eval   Sourced file: inline evaluation of:
import org.json.JSONArray; import org.json.JSONObject; String jsonString = prev
 : Typed variable declaration : Object constructor 

script org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval Sourced file: inline evaluation of:
    import org.json.JSONArray;
    import org.json.JSONObject; 

    String jsonString = prev . . . '' :
    Typed variable declaration :
     Object constructor  

I have no idea what it means.

2
Can you please show your whole code. - user9428418
What do you want to achieve? It's not clear from the question... - SBylemans

2 Answers

1
votes

Not sure but I guess you put the BeanShell Processor in wrong place. Your BeanSheel Processor must be under the HTTP Request, not at the same level.

0
votes

Your code is wrong:

prev . . . ''

It should be java code compatible with jdk1.4

You have option to use Jsr223 + groovy but anyway your code is wrong