Tag Archives: JMeter beanshellsampler error

How to Solve JMeter beanshellsampler error

1. Error calling BSH method: Eval

Error content: error – JMeter util. BeanShellInterpreter: Error invoking bsh method: eval In file: inline evaluation of: “import

The test in eclipse is normal, and the same code is put into JMeter to prompt errors

The first reason is that the data type cannot be specified in the map method, and the same is true in the list

After modifying the code, it will execute successfully

Reason 2: imported package error

Specific errors need to be analyzed and solved according to the returned error code.

2. The request returns an error message error invoking BSH method:

How to Solve:

1. Find the location of the Java source file and class file, eclipse -> Alt + enter can open the file path address

2. Configure the information in beanshellsampler collector and add addclasspaths import file without adding class file name. Fill in the path, as shown in the following figure: