You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "Cao, Li" <LC...@amfam.com> on 2011/09/13 20:56:37 UTC

[daemon] Procrun (Prunsrv) classpath wildcard not working on AMD 64

Hi!

I tried to use the classpath wildcard with prunsrv.exe (1.0.7) running
on Windows server but having issues. I am basically trying to use this
format:

--Classpath=foo.jar;lib\*;.\properties

The Java application cannot find the class needed in the lib folder.

It works if I do not use the * wildcard and add the JARs I needed.
 
--Classpath=foo.jar;lib\A.jar;lib\B.jar;.\properties


I am using the "java" option (not JVM.dll). 

Has anyone made this wildcard classpath work with prunsrv AMD64 binary?

Thanks!

Li

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


RE: [daemon] Procrun (Prunsrv) classpath wildcard not working on AMD 64

Posted by "Cao, Li" <LC...@amfam.com>.
I added a comment on JIRA issue daemon-195 about this error message when
stopping using Windows Service Manager. I can stop using "net stop
serviceName" in windows console but that returns an error message as
well as documented in the JIRA issue.

The reason that I want reliable stopping method is that we use software
change management system here to control the start/stop of the service
so this has to be executed by scripts. 

-----Original Message-----
From: Cao, Li 
Sent: Wednesday, September 14, 2011 9:49 AM
To: user@commons.apache.org
Subject: RE: [daemon] Procrun (Prunsrv) classpath wildcard not working
on AMD 64

Some background about the app I am trying to wrap as a service: it is a
server app packaged as a JAR that we purchased. To run it, you launch a
Java class. To stop it, you launch a different Java class (in the same
JAR) in a separate Java process which sends a message through socket to
the app so that the app shut down "gracefully."

The reason I am pursuing the java mode is because if I launch the app
(it is a server type app) in JVM mode, I cannot reliably stop the
service using the stopper (configured either in java or JVM mode). A lot
of times I got this error message:

	Cound not stop the myService service on local Computer.
	Error 1053: The service did not respond to the start or control
request in a timely fashion.

I don't have this issue if I configure procrun to use java mode for both
the app and the stopper.

Now back to the classpath issue, I am using Java 6 which itself can
expand the wildcard in classpath. I know procrun has to support earlier
JVMs, but isn't procrun just passing the classpath argument to the
java.exe in java mode?

Thanks!

Li


-----Original Message-----
From: Mladen Turk [mailto:mturk@apache.org] 
Sent: Wednesday, September 14, 2011 2:21 AM
To: user@commons.apache.org
Subject: Re: [daemon] Procrun (Prunsrv) classpath wildcard not working
on AMD 64

On 09/13/2011 10:35 PM, Cao, Li wrote:
> Hi TM,
>
> Do you mean the wildcard is not supported on any of the platforms
> (32bit, IA64 and AMD64), or just not supported on AMD64? I can see the
> following in the release notes in commons-daemon-1.0.7-bin-windows.zip
> (which contains Prunsrv.exe)
>
> * DAEMON-166: Add classpath .jar expansion. If the classpath
>                element ends with asterisk it will evaluate to all .jar
> files
>                found in the path. (1.0.3)
>

Yes, but that's not supported in 'java' mode.
I'd suggest you reconsider using java mode cause in most
cases it not needed.

Regards
-- 
^TM

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


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


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


RE: [daemon] Procrun (Prunsrv) classpath wildcard not working on AMD 64

Posted by "Cao, Li" <LC...@amfam.com>.
Some background about the app I am trying to wrap as a service: it is a
server app packaged as a JAR that we purchased. To run it, you launch a
Java class. To stop it, you launch a different Java class (in the same
JAR) in a separate Java process which sends a message through socket to
the app so that the app shut down "gracefully."

The reason I am pursuing the java mode is because if I launch the app
(it is a server type app) in JVM mode, I cannot reliably stop the
service using the stopper (configured either in java or JVM mode). A lot
of times I got this error message:

	Cound not stop the myService service on local Computer.
	Error 1053: The service did not respond to the start or control
request in a timely fashion.

I don't have this issue if I configure procrun to use java mode for both
the app and the stopper.

Now back to the classpath issue, I am using Java 6 which itself can
expand the wildcard in classpath. I know procrun has to support earlier
JVMs, but isn't procrun just passing the classpath argument to the
java.exe in java mode?

Thanks!

Li


-----Original Message-----
From: Mladen Turk [mailto:mturk@apache.org] 
Sent: Wednesday, September 14, 2011 2:21 AM
To: user@commons.apache.org
Subject: Re: [daemon] Procrun (Prunsrv) classpath wildcard not working
on AMD 64

On 09/13/2011 10:35 PM, Cao, Li wrote:
> Hi TM,
>
> Do you mean the wildcard is not supported on any of the platforms
> (32bit, IA64 and AMD64), or just not supported on AMD64? I can see the
> following in the release notes in commons-daemon-1.0.7-bin-windows.zip
> (which contains Prunsrv.exe)
>
> * DAEMON-166: Add classpath .jar expansion. If the classpath
>                element ends with asterisk it will evaluate to all .jar
> files
>                found in the path. (1.0.3)
>

Yes, but that's not supported in 'java' mode.
I'd suggest you reconsider using java mode cause in most
cases it not needed.

Regards
-- 
^TM

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


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


Re: [daemon] Procrun (Prunsrv) classpath wildcard not working on AMD 64

Posted by Mladen Turk <mt...@apache.org>.
On 09/13/2011 10:35 PM, Cao, Li wrote:
> Hi TM,
>
> Do you mean the wildcard is not supported on any of the platforms
> (32bit, IA64 and AMD64), or just not supported on AMD64? I can see the
> following in the release notes in commons-daemon-1.0.7-bin-windows.zip
> (which contains Prunsrv.exe)
>
> * DAEMON-166: Add classpath .jar expansion. If the classpath
>                element ends with asterisk it will evaluate to all .jar
> files
>                found in the path. (1.0.3)
>

Yes, but that's not supported in 'java' mode.
I'd suggest you reconsider using java mode cause in most
cases it not needed.

Regards
-- 
^TM

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


RE: [daemon] Procrun (Prunsrv) classpath wildcard not working on AMD 64

Posted by "Cao, Li" <LC...@amfam.com>.
Hi TM,

Do you mean the wildcard is not supported on any of the platforms
(32bit, IA64 and AMD64), or just not supported on AMD64? I can see the
following in the release notes in commons-daemon-1.0.7-bin-windows.zip
(which contains Prunsrv.exe)

* DAEMON-166: Add classpath .jar expansion. If the classpath
              element ends with asterisk it will evaluate to all .jar
files
              found in the path. (1.0.3)

Thanks!

Li

-----Original Message-----
From: Mladen Turk [mailto:mturk@apache.org] 
Sent: Tuesday, September 13, 2011 3:16 PM
To: Commons Users List
Subject: Re: [daemon] Procrun (Prunsrv) classpath wildcard not working
on AMD 64

On 09/13/2011 08:56 PM, Cao, Li wrote:
>
> Has anyone made this wildcard classpath work with prunsrv AMD64
binary?
>

Nope. Its not supported.
Reason?
1. There is no glob() on windows
2. Porting that from say BSD is not trivial
    although possible.
3. Using wildcards is for lazy admins :)


Regards
-- 
^TM

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


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


Re: [daemon] Procrun (Prunsrv) classpath wildcard not working on AMD 64

Posted by Mladen Turk <mt...@apache.org>.
On 09/13/2011 08:56 PM, Cao, Li wrote:
>
> Has anyone made this wildcard classpath work with prunsrv AMD64 binary?
>

Nope. Its not supported.
Reason?
1. There is no glob() on windows
2. Porting that from say BSD is not trivial
    although possible.
3. Using wildcards is for lazy admins :)


Regards
-- 
^TM

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


RE: [daemon] Procrun (Prunsrv) classpath wildcard not working on AMD 64

Posted by "Cao, Li" <LC...@amfam.com>.
Tried but does not work either. Officially if it is implemented as per
java 6 launcher specs. The "*.jar" is not supported.
-----Original Message-----
From: sebb [mailto:sebbaz@gmail.com] 
Sent: Tuesday, September 13, 2011 2:03 PM
To: Commons Users List
Subject: Re: [daemon] Procrun (Prunsrv) classpath wildcard not working
on AMD 64

On 13 September 2011 19:56, Cao, Li <LC...@amfam.com> wrote:
> Hi!
>
> I tried to use the classpath wildcard with prunsrv.exe (1.0.7) running
> on Windows server but having issues. I am basically trying to use this
> format:
>
> --Classpath=foo.jar;lib\*;.\properties

Have you tried the following?

 --Classpath=foo.jar;lib\*.jar;.\properties


>
> The Java application cannot find the class needed in the lib folder.
>
> It works if I do not use the * wildcard and add the JARs I needed.
>
> --Classpath=foo.jar;lib\A.jar;lib\B.jar;.\properties
>
>
> I am using the "java" option (not JVM.dll).
>
> Has anyone made this wildcard classpath work with prunsrv AMD64
binary?
>
> Thanks!
>
> Li
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

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


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


Re: [daemon] Procrun (Prunsrv) classpath wildcard not working on AMD 64

Posted by sebb <se...@gmail.com>.
On 13 September 2011 19:56, Cao, Li <LC...@amfam.com> wrote:
> Hi!
>
> I tried to use the classpath wildcard with prunsrv.exe (1.0.7) running
> on Windows server but having issues. I am basically trying to use this
> format:
>
> --Classpath=foo.jar;lib\*;.\properties

Have you tried the following?

 --Classpath=foo.jar;lib\*.jar;.\properties


>
> The Java application cannot find the class needed in the lib folder.
>
> It works if I do not use the * wildcard and add the JARs I needed.
>
> --Classpath=foo.jar;lib\A.jar;lib\B.jar;.\properties
>
>
> I am using the "java" option (not JVM.dll).
>
> Has anyone made this wildcard classpath work with prunsrv AMD64 binary?
>
> Thanks!
>
> Li
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

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