I am playing around with BeanShell and I can't figure why I get a
FileNotFoundException every time I open or run a test plan which has a
BeanShellScript
I'm using jmeter 2.2 with sun jdk 1.5.0_10 on Linux (Kubuntu)
This is what I see in jmeter.log (debug level logging)
2007/05/08 13:16:00 WARN - jmeter.protocol.java.sampler.BeanShellSampler:
Could not initialise interpreter java.io.FileNotFoundException:
BeanShellSampler.bshrc
at
org.apache.jmeter.util.BeanShellInterpreter.init(BeanShellInterpreter.java:122)
at
org.apache.jmeter.protocol.java.sampler.BeanShellSampler.<init>(BeanShellSampler.java:59)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
...
...
this is where my 2.2 JMeter installation is, so it looks like the
BeanShellSampler file is present. With my user account, I can cat the .bshrc
files, so I don't think it's a file permission issue
[EMAIL PROTECTED]:~$ ls -l /opt/jmeter/bin/
total 136
-rw-r--r-- 1 root root 9962 2006-06-13 22:02 ApacheJMeter.jar
-rw-r--r-- 1 root dev 634 2005-03-18 16:27 BeanShellAssertion.bshrc
-rw-r--r-- 1 root dev 795 2005-03-18 16:27 BeanShellFunction.bshrc
-rw-r--r-- 1 root dev 1126 2005-11-21 21:26 BeanShellSampler.bshrc
this is the reference to the .bshrc file in the default 2.2
jmeter.properties
[EMAIL PROTECTED]:~$ grep "BeanShellSampler.bshrc" /opt/jmeter/bin/*
/opt/jmeter/bin/jmeter.properties:beanshell.sampler.init=BeanShellSampler.bshrc
The BeanShell script itself (which I type in the sampler) works correctly.
The workaround I have found to avoid the FileNotFoundException is to specify
the full path to the .bshrc file in jmeter.properties, i.e.
beanshell.sampler.init=/opt/jmeter/bin/BeanShellSampler.bshrc
but that does not sound right, JMeter should be able to reference files
which are in its own bin directory.
Or should I set something different?
thanks
Ivan
--
View this message in context:
http://www.nabble.com/can%27t-find-BeanShellSampler.bshrc-tf3709111.html#a10374284
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]