[EMAIL PROTECTED] wrote:
-----Original Message-----
From: Remy Maucherat [mailto:[EMAIL PROTECTED]]
Sent: 17. veljača 2003 9:38
To: Tomcat Developers List
Subject: Re: [5.0] Procrun problems / New loader

jean-frederic clere wrote:

Remy Maucherat wrote:


I've switched (temporarily, maybe) away from JavaService to
Procrun.

The problem is that I couldn't get it to work.

In the install script, I'm using the following command:
 ExecWait '"$INSTDIR\bin\tomcatw.exe" //IS//Tomcat5 --DisplayName
"Apache Tomcat @VERSION@" --Description "Apache Tomcat @VERSION@
Server http://jakarta.apache.org/tomcat";  --Install
"$INSTDIR\bin\tomcat.exe" --ImagePath "$INSTDIR\bin\bootstrap.jar"
--StartupClass org.apache.catalina.startup.Bootstrap;main;start
--ShutdownClass org.apache.catalina.startup.Bootstrap;main;stop
--Java

auto --JavaOptions
-Djava.endorsed.dirs="$INSTDIR\common\endorsed"#-
Dcatalina.home="$INSTDIR"

--StdOutputFile "$INSTDIR\logs\stdout.log" --StdErrorFile
"$INSTDIR\logs\stderr.log" --WorkingPath "$INSTDIR"'

Have you try without the @VERSION@?
It's an Ant token, so it gets replaced before invoking NSIS anyway.
The service parameters now gets populated correctly (I looked at the
source code to find out where they were going), but:
- err and out redirection doesn't seem to work (the console stays
blank,

as do the logs, and all output goes into the console)

Those can be used only if you redirect onother process. Try with "-Java
java". Dunno how to redirect the console of the current process. Setting
handles doesn't help. The only thing that can be used is API Hooking,
but that's too much for now.
I was using -Java auto.
I thought it was supposed to be the same.

- procrunw still flashes a console when it's used; I thought it was
supposed not to

It shouldn't. But the problem is that I made the wrong binaries using
devcpp. Try with the lates build.


- WorkingPath doesn't seem to do anything

Not when using JVM. For redirected app it sets the Working Directory
when calling the CreateProcess.
That seems to be a plausible explanation. I had looked at the source, and it seemed to be making the CreateProcess call using the right paramter.

- JavaOptions doesn't either :-(


Here is how it works for me:

procrunw //IS//Tomcat4 --DisplayName "Tomcat 4.1.19" --Description
"Tomcat 4.1.19 LE JDK 1.4 http://jakarta.apache.org"; --ImagePath
"c:\devtools\tomcat\41\bin\bootstrap.jar" --StartupClass
org.apache.catalina.startup.Bootstrap;main;start --ShutdownClass
org.apache.catalina.startup.Bootstrap;main;stop --Java auto
--JavaOptions
-Dcatalina.home=c:\devtools\tomcat\41#-Xmx128M#-Dtomcat.home=c:\devtools
\tomcat\41


Perhaps you exceeded the command line length. Try using the
Procrunw //IS//Tomcat <minimum params> (ServiceName, DisplayName,
ImagePath, and Install).
Then
Procrunw //US//Tomcat <extra params> (update service changing or adding
params.)
Well, I checked with the registry, and everything gets registered ok with one single call. Update also works good.

You can call the //US as many times as you wish.

Also check if some installation params that NSIS process have emedded
spaces. In that case you'll need to quote that params.
--JavaOptions needs the next argument as single string so it need to be
quoted.

"--Dcatalina.home=\"some location\"#etc..."
Yes, I sort of figured that out. I tried hacking the value in the registry without much success.

How and are the params set correctly, can be seen in the registry:
HKLM\\SOFTWARE\\Apache Software Foundation\\Process Runner
1.0\\ServiceName\\Parameters.

The JavaOptions is MULTI_SZ, and you can check the params there.
Yes, I had already found out everything was there.

Remy


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to