Hi,
I get a Error invoking bsh method error when I invoke a BeanShell script. The whole error is : Assertion failure message: org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval Sourced file: inline evaluation of: ``import java.io.File; import java.io.FileInputStream; import java.io.FileNotFound . . . ''. the script runs fine on the BeanShell interpreter. import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.math.BigInteger; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; print("where am i?"); MessageDigest digest = MessageDigest.getInstance("MD5"); File f = new File("c:\\Program Files\\jakarta-jmeter-2.3.4\\bin\\ubd191_a28_1.xml"); InputStream is = new FileInputStream(f); byte[] buffer = new byte[8192]; int read = 0; try { while( (read = is.read(buffer)) > 0) { digest.update(buffer, 0, read); } byte[] md5sum = digest.digest(); BigInteger bigInt = new BigInteger(1, md5sum); String output = bigInt.toString(16); print("MD5 for 191 the first time is " + output); } catch(IOException e) { throw new RuntimeException("Unable to process file for MD5", e); } finally { try { is.close(); } catch(IOException e) { throw new RuntimeException("Unable to close input stream for MD5 calculation", e); } } File f1 = new File("c:\\Program Files\\jakarta-jmeter-2.3.4\\bin\\ubd191_a28_1.xml"); InputStream is = new FileInputStream(f1); byte[] buffer1 = new byte[8192]; int read = 0; try { while( (read = is.read(buffer1)) > 0) { digest.update(buffer1, 0, read); } byte[] md5sum1 = digest.digest(); BigInteger bigInt1 = new BigInteger(1, md5sum1); String output1 = bigInt1.toString(16); print("MD5 for 191 the second time is:" + output1); } catch(IOException e) { throw new RuntimeException("Unable to process file for MD5", e); } finally { try { is.close(); } catch(IOException e) { throw new RuntimeException("Unable to close input stream for MD5 calculation", e); } } Failure=!(vars.get("output1").equals(vars.get("output2")));