Open .jmx in eclipse

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Open .jmx in eclipse

Mat Schaffer
I'm trying to set up eclipse so I can open the jMeter test files just  
by clicking on them.  But googling for the info hasn't proved  
fruitful.  So my questions are...

(1) Is there a way I can coax jMeter to run in a cwd other then it's  
own bin directory?  Although the startup script looks like it  
provides the full lib path I run into the following problems that  
look like it's being ignored inside the app:

java.lang.Throwable: Could not access /Users/lib
         at org.apache.jmeter.NewDriver.<clinit>(NewDriver.java:77)
java.lang.Throwable: Could not access /Users/lib/ext
         at org.apache.jmeter.NewDriver.<clinit>(NewDriver.java:77)
java.lang.Throwable: Could not access /Users/lib/junit
         at org.apache.jmeter.NewDriver.<clinit>(NewDriver.java:77)

(2) Is there a way I can tell jMeter to open a test plan on startup  
rather than just opening a new plan?  Just providing the file as an  
argument doesn't seem to do it.

Thanks,
Mat

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Open .jmx in eclipse

sebb-2-2
On 02/01/07, Mat Schaffer <[hidden email]> wrote:

> I'm trying to set up eclipse so I can open the jMeter test files just
> by clicking on them.  But googling for the info hasn't proved
> fruitful.  So my questions are...
>
> (1) Is there a way I can coax jMeter to run in a cwd other then it's
> own bin directory?  Although the startup script looks like it
> provides the full lib path I run into the following problems that
> look like it's being ignored inside the app:
>
> java.lang.Throwable: Could not access /Users/lib
>         at org.apache.jmeter.NewDriver.<clinit>(NewDriver.java:77)
> java.lang.Throwable: Could not access /Users/lib/ext
>         at org.apache.jmeter.NewDriver.<clinit>(NewDriver.java:77)
> java.lang.Throwable: Could not access /Users/lib/junit
>         at org.apache.jmeter.NewDriver.<clinit>(NewDriver.java:77)
>

I assume that you are using some form of Unix-like OS?

Looks like it is not finding the JMeter home directory.

It tries to do this by looking at the property "java.class.path",
which is expected to be

some_path/ApacheJMeter.jar

as set by the -jar xxxx parameter

if the classpath has more entries, then it uses "user.dir".

In both cases the JMeter home directory is taken to be the parent of the above.

It's vital that the jmeter script and JMeter jar are both located in
the bin directory.

> (2) Is there a way I can tell jMeter to open a test plan on startup
> rather than just opening a new plan?  Just providing the file as an
> argument doesn't seem to do it.

-t testplan.jmx

should work.

> Thanks,
> Mat
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Open .jmx in eclipse

Mat Schaffer

On Jan 2, 2007, at 10:33 AM, sebb wrote:

> On 02/01/07, Mat Schaffer <[hidden email]> wrote:
>> I'm trying to set up eclipse so I can open the jMeter test files just
>> by clicking on them.  But googling for the info hasn't proved
>> fruitful.  So my questions are...
>>
>> (1) Is there a way I can coax jMeter to run in a cwd other then it's
>> own bin directory?  Although the startup script looks like it
>> provides the full lib path I run into the following problems that
>> look like it's being ignored inside the app:
>>
>> java.lang.Throwable: Could not access /Users/lib
>>         at org.apache.jmeter.NewDriver.<clinit>(NewDriver.java:77)
>> java.lang.Throwable: Could not access /Users/lib/ext
>>         at org.apache.jmeter.NewDriver.<clinit>(NewDriver.java:77)
>> java.lang.Throwable: Could not access /Users/lib/junit
>>         at org.apache.jmeter.NewDriver.<clinit>(NewDriver.java:77)
>>
>
> I assume that you are using some form of Unix-like OS?

Yep. Mac OS X

> Looks like it is not finding the JMeter home directory.
>
> It tries to do this by looking at the property "java.class.path",
> which is expected to be
>
> some_path/ApacheJMeter.jar
>
> as set by the -jar xxxx parameter
>
> if the classpath has more entries, then it uses "user.dir".
>
> In both cases the JMeter home directory is taken to be the parent  
> of the above.
>
> It's vital that the jmeter script and JMeter jar are both located in
> the bin directory.

They are.  Here's how the script calls it, which seems to match what  
you said.  But I'm not sure how to check if the classpath has more  
entries. (broken with \ up for clarity)

java -server \
   -Xms256m -Xmx256m -XX:NewSize=128m -XX:MaxNewSize=128m \
   -XX:MaxTenuringThreshold=2 -Dsun.rmi.dgc.client.gcInterval=600000
   -Dsun.rmi.dgc.server.gcInterval=600000 -XX:PermSize=64m -
XX:MaxPermSize=64m \
   -jar /opt/jakarta-jmeter-2.2/bin/ApacheJMeter.jar

That's why I thought it was strange and possibly a problem in  
org.apache.jmeter.NewDriver.

>> (2) Is there a way I can tell jMeter to open a test plan on startup
>> rather than just opening a new plan?  Just providing the file as an
>> argument doesn't seem to do it.
>
> -t testplan.jmx
>
> should work.

Like a charm :)  Thanks for the quick reply.
-Mat

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Open .jmx in eclipse

sebb-2-2
On 02/01/07, Mat Schaffer <[hidden email]> wrote:

>
> On Jan 2, 2007, at 10:33 AM, sebb wrote:
>
> > On 02/01/07, Mat Schaffer <[hidden email]> wrote:
> >> I'm trying to set up eclipse so I can open the jMeter test files just
> >> by clicking on them.  But googling for the info hasn't proved
> >> fruitful.  So my questions are...
> >>
> >> (1) Is there a way I can coax jMeter to run in a cwd other then it's
> >> own bin directory?  Although the startup script looks like it
> >> provides the full lib path I run into the following problems that
> >> look like it's being ignored inside the app:
> >>
> >> java.lang.Throwable: Could not access /Users/lib
> >>         at org.apache.jmeter.NewDriver.<clinit>(NewDriver.java:77)
> >> java.lang.Throwable: Could not access /Users/lib/ext
> >>         at org.apache.jmeter.NewDriver.<clinit>(NewDriver.java:77)
> >> java.lang.Throwable: Could not access /Users/lib/junit
> >>         at org.apache.jmeter.NewDriver.<clinit>(NewDriver.java:77)
> >>
> >
> > I assume that you are using some form of Unix-like OS?
>
> Yep. Mac OS X
>
> > Looks like it is not finding the JMeter home directory.
> >
> > It tries to do this by looking at the property "java.class.path",
> > which is expected to be
> >
> > some_path/ApacheJMeter.jar
> >
> > as set by the -jar xxxx parameter
> >
> > if the classpath has more entries, then it uses "user.dir".
> >
> > In both cases the JMeter home directory is taken to be the parent
> > of the above.
> >
> > It's vital that the jmeter script and JMeter jar are both located in
> > the bin directory.
>
> They are.  Here's how the script calls it, which seems to match what
> you said.  But I'm not sure how to check if the classpath has more
> entries. (broken with \ up for clarity)

JMeter does not currently log the values of the properties it uses.

However, you could use the __P() function to extract the value of the
java.class.path property - assuming you can get JMeter started in the
first place.

And you can probably use the user.dir property to get around the error:

    java -Duser.dir=/opt/jakarta-jmeter-2.2/bin/

should probably allow JMeter to start OK.

But it would be useful to know why the current code does not work.

> java -server \
>   -Xms256m -Xmx256m -XX:NewSize=128m -XX:MaxNewSize=128m \
>   -XX:MaxTenuringThreshold=2 -Dsun.rmi.dgc.client.gcInterval=600000
>   -Dsun.rmi.dgc.server.gcInterval=600000 -XX:PermSize=64m -
> XX:MaxPermSize=64m \
>   -jar /opt/jakarta-jmeter-2.2/bin/ApacheJMeter.jar

Looks OK.

> That's why I thought it was strange and possibly a problem in
> org.apache.jmeter.NewDriver.

Odd indeed ...

> >> (2) Is there a way I can tell jMeter to open a test plan on startup
> >> rather than just opening a new plan?  Just providing the file as an
> >> argument doesn't seem to do it.
> >
> > -t testplan.jmx
> >
> > should work.
>
> Like a charm :)  Thanks for the quick reply.
> -Mat
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Open .jmx in eclipse

Mat Schaffer

On Jan 2, 2007, at 11:56 AM, sebb wrote:

> JMeter does not currently log the values of the properties it uses.
>
> However, you could use the __P() function to extract the value of the
> java.class.path property - assuming you can get JMeter started in the
> first place.
>
> And you can probably use the user.dir property to get around the  
> error:
>
>    java -Duser.dir=/opt/jakarta-jmeter-2.2/bin/
>
> should probably allow JMeter to start OK.

Yep, that did the trick.

> But it would be useful to know why the current code does not work.
>
>> java -server \
>>   -Xms256m -Xmx256m -XX:NewSize=128m -XX:MaxNewSize=128m \
>>   -XX:MaxTenuringThreshold=2 -Dsun.rmi.dgc.client.gcInterval=600000
>>   -Dsun.rmi.dgc.server.gcInterval=600000 -XX:PermSize=64m -
>> XX:MaxPermSize=64m \
>>   -jar /opt/jakarta-jmeter-2.2/bin/ApacheJMeter.jar
>
> Looks OK.
>
>> That's why I thought it was strange and possibly a problem in
>> org.apache.jmeter.NewDriver.
>
> Odd indeed ...

Would you like me to post a bug report, or should I leave it to  
someone more familiar with the project?  I just started using jMeter  
last week, so I'm still at n00b status  :)
-Mat

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Open .jmx in eclipse

sebb-2-2
On 02/01/07, Mat Schaffer <[hidden email]> wrote:

>
> On Jan 2, 2007, at 11:56 AM, sebb wrote:
> > JMeter does not currently log the values of the properties it uses.
> >
> > However, you could use the __P() function to extract the value of the
> > java.class.path property - assuming you can get JMeter started in the
> > first place.
> >
> > And you can probably use the user.dir property to get around the
> > error:
> >
> >    java -Duser.dir=/opt/jakarta-jmeter-2.2/bin/
> >
> > should probably allow JMeter to start OK.
>
> Yep, that did the trick.
>
> > But it would be useful to know why the current code does not work.
> >
> >> java -server \
> >>   -Xms256m -Xmx256m -XX:NewSize=128m -XX:MaxNewSize=128m \
> >>   -XX:MaxTenuringThreshold=2 -Dsun.rmi.dgc.client.gcInterval=600000
> >>   -Dsun.rmi.dgc.server.gcInterval=600000 -XX:PermSize=64m -
> >> XX:MaxPermSize=64m \
> >>   -jar /opt/jakarta-jmeter-2.2/bin/ApacheJMeter.jar
> >
> > Looks OK.
> >
> >> That's why I thought it was strange and possibly a problem in
> >> org.apache.jmeter.NewDriver.
> >
> > Odd indeed ...
>
> Would you like me to post a bug report, or should I leave it to
> someone more familiar with the project?  I just started using jMeter
> last week, so I'm still at n00b status  :)

As far as I know, no-one else has seen the problem, so you are the
only one that can help solve it ...

I can create an updated version of JMeter that includes some extra
debug code - if you would be willing to run this, and then send me the
jmeter.log privately, that would be very helpful.

S.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]