问题 利用jmeter JDBC Request 请求,BeanShell 后置处理程序提取数据库中的值,页面报错:
Error invoking bsh method: eval Sourced file: inline evaluation of: ``//import java.util.Date; String code1 =
报错信息
日志打印结果如下:
2023-12-13 10:10:10,411 INFO o.a.j.u.BeanShellTestElement: ============打印INFO级别的日志===================
2023-12-13 10:10:10,411 INFO o.a.j.u.BeanShellTestElement: ********************在BeanShell设置的局部变量msg_1的值为:BJD-20231213005199
2023-12-13 10:10:10,412 ERROR o.a.j.u.BeanShellInterpreter: Error invoking bsh method: eval Sourced file: inline evaluation of: //import java.util.Date; String code1 = vars.getObject("result").get(0).get("cod . . . '' : Typed variable declaration 2023-12-13 10:10:10,412 WARN o.a.j.e.BeanShellPostProcessor: Problem in BeanShell script: org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval Sourced file: inline evaluation of:
//import java.util.Date; String code1 = vars.getObject(“result”).get(0).get("cod . . . ‘’ : Typed variable declaration
2023-12-13 10:10:10,412 DEBUG o.a.j.c.GenericController: Calling next on: class org.apache.jmeter.control.GenericController
2023-12-13 10:10:10,412 DEBUG o.a.j.t.TestBeanHelper: Preparing class org.apache.jmeter.sampler.DebugSampler
2023-12-13 10:10:10,412 DEBUG o.a.j.t.TestBeanHelper: Setting displayJMeterProperties=false
环境
test环境