I have written a beanshell sampler that opens a file and outputs some variables. However, I got the following error.
Error invoking bsh method: eval Sourced file: inline evaluation of: ``f = new FileOutputStream("C:\\xxxxx.csv", true); ;'' : Object constructor
I found out that it was failing because I did not have the correct permission for directory in which the file was supposed to be written. Change the location and it worked fine!