Error invoking bsh method on FileOutputStream

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!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s