在Beanshell里使用source命令加载java源文件的报错:Method Invocation this.interpreter.source
具体报错如下:
BeanShellSampler: Exception executing script. org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval
Sourced file: inline evaluation of: ". . . '' : Method Invocation this.interpreter.source
原因大概是引用的java源文件里有interface的定义,去掉interface的定义则不会报这个错。
解决办法:把interface的定义放到jar包里去再引用jar包。