grinder.jvm.classpath and globbing

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

grinder.jvm.classpath and globbing

Darren Ball

I am trying to do the following:

grinder.jvm.classpath = /home/grinder/uber/*


I get the following in my grinder.properties for my test (on the console machine):

Worker process command line: java '-javaagent:/opt/grinder/lib/grinder-dcr-agent-3.11.jar' -classpath '/home/grinder/uber/*:/opt/grinder/lib/grinder.jar' net.grinder.engine.process.WorkerProcessEntryPoint

And this is not picking up the globbed path classpath.


I add this to the agent startup like the following, and it works fine:

java -classpath "/home/grinder/uber/*":/opt/grinder/lib/grinder.jar  net.grinder.Grinder

I believe I had this previously working.  It seems the grinder.properties values are being quote in single quotes...

-


------------------------------------------------------------------------------

_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: grinder.jvm.classpath and globbing

Darren Ball
Anyone have any idea regarding this issue?


On Fri, Sep 18, 2015 at 12:53 PM, Darren Ball <[hidden email]> wrote:

I am trying to do the following:

grinder.jvm.classpath = /home/grinder/uber/*


I get the following in my grinder.properties for my test (on the console machine):

Worker process command line: java '-javaagent:/opt/grinder/lib/grinder-dcr-agent-3.11.jar' -classpath '/home/grinder/uber/*:/opt/grinder/lib/grinder.jar' net.grinder.engine.process.WorkerProcessEntryPoint

And this is not picking up the globbed path classpath.


I add this to the agent startup like the following, and it works fine:

java -classpath "/home/grinder/uber/*":/opt/grinder/lib/grinder.jar  net.grinder.Grinder

I believe I had this previously working.  It seems the grinder.properties values are being quote in single quotes...

-



------------------------------------------------------------------------------

_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: grinder.jvm.classpath and globbing

Philip Aston-2
Well what do you know. I'm a longtime Java user but was ignorant of this
feature -
http://stackoverflow.com/questions/1237093/how-to-use-a-wildcard-in-the-classpath-to-add-multiple-jars

However, I suspect it only works when you launch Java from the shell,
not when you launch it from another Java process (which is what happens
when the worker process is stared by the agent).

The worker process will inherit the classpath from the agent by default
though - you might try leaving out the grinder.jvm.classpath property
entirely.

- Phil


On 21/09/15 17:52, Darren Ball wrote:

> Anyone have any idea regarding this issue?
>
>
> On Fri, Sep 18, 2015 at 12:53 PM, Darren Ball <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     I am trying to do the following:
>
>     grinder.jvm.classpath= /home/grinder/uber/*
>
>
>     I get the following in my grinder.properties for my test (on the
>     console machine):
>
>     Worker process command line: java
>     '-javaagent:/opt/grinder/lib/grinder-dcr-agent-3.11.jar'
>     -classpath '/home/grinder/uber/*:/opt/grinder/lib/grinder.jar'
>     net.grinder.engine.process.WorkerProcessEntryPoint
>
>     And this is not picking up the globbed path classpath.
>
>
>     I add this to the agent startup like the following, and it works fine:
>
>     java -classpath
>     "/home/grinder/uber/*":/opt/grinder/lib/grinder.jar
>      net.grinder.Grinder
>
>     I believe I had this previously working.  It seems the
>     grinder.properties values are being quote in single quotes...
>
>     -
>



------------------------------------------------------------------------------
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: grinder.jvm.classpath and globbing

Darren Ball
Hi Philip,
If you are using something like ProcessBuilder, there are standard methods for building the correct classpath... Plenty of examples out there.

A quick search shows something simple:

If this is not suitable a call should be implemented to perform expansion. 

Where in the code are you doing this?

-Darren

On Mon, Sep 21, 2015 at 6:37 PM, Philip Aston <[hidden email]> wrote:
Well what do you know. I'm a longtime Java user but was ignorant of this
feature -
http://stackoverflow.com/questions/1237093/how-to-use-a-wildcard-in-the-classpath-to-add-multiple-jars

However, I suspect it only works when you launch Java from the shell,
not when you launch it from another Java process (which is what happens
when the worker process is stared by the agent).

The worker process will inherit the classpath from the agent by default
though - you might try leaving out the grinder.jvm.classpath property
entirely.

- Phil


On 21/09/15 17:52, Darren Ball wrote:
> Anyone have any idea regarding this issue?
>
>
> On Fri, Sep 18, 2015 at 12:53 PM, Darren Ball <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     I am trying to do the following:
>
>     grinder.jvm.classpath= /home/grinder/uber/*
>
>
>     I get the following in my grinder.properties for my test (on the
>     console machine):
>
>     Worker process command line: java
>     '-javaagent:/opt/grinder/lib/grinder-dcr-agent-3.11.jar'
>     -classpath '/home/grinder/uber/*:/opt/grinder/lib/grinder.jar'
>     net.grinder.engine.process.WorkerProcessEntryPoint
>
>     And this is not picking up the globbed path classpath.
>
>
>     I add this to the agent startup like the following, and it works fine:
>
>     java -classpath
>     "/home/grinder/uber/*":/opt/grinder/lib/grinder.jar
>      net.grinder.Grinder
>
>     I believe I had this previously working.  It seems the
>     grinder.properties values are being quote in single quotes...
>
>     -
>



------------------------------------------------------------------------------
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use


------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: grinder.jvm.classpath and globbing

Philip Aston-2

Here's the code that uses ProcessBuilder:

http://sourceforge.net/p/grinder/code/ci/master/tree/grinder-core/src/main/java/net/grinder/engine/agent/ProcessWorker.java


If PB doesn't already handle it. I will not be adding globbing to the
grinder. Its too platform specific, and something you can do in a
wrapper script.

- Phil


On 23/09/15 19:24, Darren Ball wrote:

> Hi Philip,
> If you are using something like ProcessBuilder, there are standard
> methods for building the correct classpath... Plenty of examples out
> there.
>
> A quick search shows something simple:
> http://stackoverflow.com/questions/16403539/cant-run-program-with-processbuilder-runs-fine-from-command-line
>
> If this is not suitable a call should be implemented to perform
> expansion.
>
> Where in the code are you doing this?
>
> -Darren
>
> On Mon, Sep 21, 2015 at 6:37 PM, Philip Aston <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Well what do you know. I'm a longtime Java user but was ignorant
>     of this
>     feature -
>     http://stackoverflow.com/questions/1237093/how-to-use-a-wildcard-in-the-classpath-to-add-multiple-jars
>
>     However, I suspect it only works when you launch Java from the shell,
>     not when you launch it from another Java process (which is what
>     happens
>     when the worker process is stared by the agent).
>
>     The worker process will inherit the classpath from the agent by
>     default
>     though - you might try leaving out the grinder.jvm.classpath property
>     entirely.
>
>     - Phil
>
>
>     On 21/09/15 17:52, Darren Ball wrote:
>     > Anyone have any idea regarding this issue?
>     >
>     >
>     > On Fri, Sep 18, 2015 at 12:53 PM, Darren Ball
>     <[hidden email] <mailto:[hidden email]>
>     > <mailto:[hidden email] <mailto:[hidden email]>>> wrote:
>     >
>     >     I am trying to do the following:
>     >
>     >     grinder.jvm.classpath= /home/grinder/uber/*
>     >
>     >
>     >     I get the following in my grinder.properties for my test (on the
>     >     console machine):
>     >
>     >     Worker process command line: java
>     >     '-javaagent:/opt/grinder/lib/grinder-dcr-agent-3.11.jar'
>     >     -classpath '/home/grinder/uber/*:/opt/grinder/lib/grinder.jar'
>     >     net.grinder.engine.process.WorkerProcessEntryPoint
>     >
>     >     And this is not picking up the globbed path classpath.
>     >
>     >
>     >     I add this to the agent startup like the following, and it
>     works fine:
>     >
>     >     java -classpath
>     >     "/home/grinder/uber/*":/opt/grinder/lib/grinder.jar
>     >      net.grinder.Grinder
>     >
>     >     I believe I had this previously working.  It seems the
>     >     grinder.properties values are being quote in single quotes...
>     >
>     >     -
>     >
>
>
>



------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
grinder-use mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/grinder-use
Loading...