在Beanshell里使用source命令加载java源文件的报错:Method Invocation this.interpreter.source

原创
2021/04/15 11:56
阅读数 4.9K

用Jmeter在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包。

展开阅读全文
加载中
点击引领话题📣 发布并加入讨论🔥
0 评论
0 收藏
0
分享
返回顶部
顶部