You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Ivan Rancati <iv...@sharpmind.de> on 2007/05/08 13:46:29 UTC

can't find BeanShellSampler.bshrc

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

van@iridium:~$ 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

ivan@iridium:~$ 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: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: can't find BeanShellSampler.bshrc

Posted by sebb <se...@gmail.com>.
The latest version of JMeter source checks the local directory first,
and then the JMeter bin directory, so one can have a local override if
required.

On 09/05/07, Ivan Rancati <iv...@sharpmind.de> wrote:
>
> thanks for the clarification.
>
> In general, I think it's good that the current directory is the one where
> the .jmx file lives; in this case, since the .bshrc file is specified in
> jmeter.properties as opposite to a given test plan, it might be more
> intuitive if its location was a shared one (i.e. jmeter/bin)
>
>
> sebb-2 wrote:
> >
> > JMeter currently only checks the current working directory for the .bshrc
> > files.
> >
> > S
> >
> >
>
> --
> View this message in context: http://www.nabble.com/can%27t-find-BeanShellSampler.bshrc-tf3709111.html#a10394988
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: can't find BeanShellSampler.bshrc

Posted by Ivan Rancati <iv...@sharpmind.de>.
thanks for the clarification. 

In general, I think it's good that the current directory is the one where
the .jmx file lives; in this case, since the .bshrc file is specified in
jmeter.properties as opposite to a given test plan, it might be more
intuitive if its location was a shared one (i.e. jmeter/bin)


sebb-2 wrote:
> 
> JMeter currently only checks the current working directory for the .bshrc
> files.
> 
> S
> 
> 

-- 
View this message in context: http://www.nabble.com/can%27t-find-BeanShellSampler.bshrc-tf3709111.html#a10394988
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: can't find BeanShellSampler.bshrc

Posted by sebb <se...@gmail.com>.
JMeter currently only checks the current working directory for the .bshrc files.

S

On 08/05/07, Ivan Rancati <iv...@sharpmind.de> wrote:
>
> 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
>
> van@iridium:~$ 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
>
> ivan@iridium:~$ 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: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org