2013-05-13 248 views
1

当我尝试在JMeter的执行下面的代码:JMeter的:错误调用BSH方法:EVAL

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

我收到以下错误:

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 

我不知道这意味着什么。

回答

0

你的代码是错误的:

prev . . . ''

它应该是Java代码与JDK1.4兼容

你必须选择使用JSR223 +时髦但无论如何,你的代码是错误的

0

不知道但我想你把BeanShell处理器放在错误的地方。您的BeanSheel处理器必须位于HTTP请求下,而不在同一级别。