在我的机器上本地运行Jmeter脚本时,我不会收到任何错误,但是当我在安装相同java版本的VM上运行相同的脚本时,我将在beanshell采样器中得到以下错误。有人能帮我解决这个问题吗?
在java.lang.Thread.run(未知来源) ?:1.8.0_311 2021-12-05 12:26:10,098错误o.a.j.u.BeanShellInterpreter:错误调用bsh方法: eval源文件:内联计算:import java.util.*; import java.time.*; import java.lang.*; import java.io.*; t . . . '' : TargetError 2021-12-05 12:26:10,098 WARN o.a.j.p.j.s.BeanShellSampler: Exception executing script. org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval Sourced file: inline evaluation of: import java.util.;import java.time.;import java.io.;t。。。'‘:TargetError
发布于 2021-12-05 13:13:12
你的问题没有提供足够的细节来猜测失败的原因。
您需要提供完整的代码以获得支持。
如果代码包含敏感数据,以下是一些调试技巧:
- Groovy is more compatible with Java
- Groovy performance is much better
- [Groovy SDK](https://groovy-lang.org/gdk.html) provides more features on top of normal Java SDK so it's more powerful更多信息:为什么和如何使用它
https://stackoverflow.com/questions/70234354
复制相似问题