|
From: Leif M. <le...@ta...> - 2006-07-30 01:20:04
|
Geoffrey,
What platform are you using? Relative paths work great on UNIX. On
Windows
however, the wrapper needs a known user directory. When run in the
console, this
will normally be location from which the application is launched. But
when run as a
service, it will be the windows system directory. This causes problems
with relative
paths.
To work around this, the wrapper sets its user directory to the
location of the
wrapper.exe. This gives the wrapper a known working location from which
it can
always run reliably. It is also possible to change this known location
with the
wrapper.working.dir property.
The UNIX version contains the same feature because of the desire for the
wrapper.conf files to be platform independent. This makes them work the
same
everywhere. Old versions of the UNIX wrapper did not set the working
dir. This
was only done in the shell script. Starting with 3.2.0, the UNIX
version of the
wrapper sets its working dir as well.
This is a little different from the way applications normally work.
But once you
get used to it, it makes everything very simple and more importantly
reliable. If
you use relative paths, it is possible to move a application directory
anywhere on
a system. Most applications rely on fully qualified static paths to
work around
path issues.
Cheers,
Leif
Geoffrey Mitchell wrote:
> We use wrapper with cruisecontrol very successfully. I, however, have
> made some customizations to the wrapper scripts and use a different
> deployment architecture than the suggested one. I have one central
> JSW deployment, and only duplicate the config and startup script for
> each application (I use JSW for both CC and JBoss). I have commented
> out the line in the script that changes the directory to the one that
> the script is in, and have eliminated relative paths and replaced them
> with absolute paths. This works fine for me.
>
> Leif Mortenson wrote:
>> Mark,
>> The wrapper decides on a working directory long before the JVM is ever
>> launched.
>> Could you post your wrapper.conf file? Maybe one of our Cruise Control
>> users or
>> myself can see the problem.
>> I know that several other users are using the wrapper with Cruise
>> Control. I know
>> that some have had problems initially, but the ones I am aware of have
>> all gotten up
>> and running.
>>
>> Cheers,
>> Leif
>>
>> Mark Modrall wrote:
>>
>>> Hi…
>>>
>>> I’ve been trying to use JavaServiceWrapper to get CruiseControl
>>> running on windows xp and so far it’s been reasonably painful. Turns
>>> out most of the problems are due to implicit internal dependencies
>>> inside CC using relative paths and assuming a particular working
>>> directory/file system hierarchy. After figuring that out, I found the
>>>
>>> Wrapper.working.dir=
>>>
>>> config element. That was very helpful but there seems to be something
>>> funky in the way JavaServiceWrapper is implementing it.
>>>
>>> For one thing, CC spits out a cruisecontrol.log file for the sysout
>>> output. Even though the code appears to be running in the cc home
>>> directory (it would fall right over if it wasn’t), when it’s run by
>>> JavaServiceWrapper cruisecontrol.log appears in the directory of
>>> wrapper.exe.
>>>
>>> For another thing, CC has some jmx implementation to do remote
>>> controls for the program. Whatever environment the jmx thread’s using,
>>> it appears to be back in the wrapper.exe directory. The cc jmx
>>> implementation is also using a lot of relative paths and when the web
>>> control page tries to invoke a jmx method, it’s crapping out. The log
>>> file says it’s failing because it’s looking for a subdirectory under
>>> the cc home directory it can’t find.
>>>
>>> So how come wrapper.working.dir can get the main thread running using
>>> the right pwd while the jmx thread’s not?
>>>
>>> Thanks
>>>
>>> -Mark
>>>
>>>
>>
>>
>> -------------------------------------------------------------------------
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share your
>> opinions on IT & business topics through brief surveys -- and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> _______________________________________________
>> Wrapper-user mailing list
>> Wra...@li...
>> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>>
>>
>>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ------------------------------------------------------------------------
>
> _______________________________________________
> Wrapper-user mailing list
> Wra...@li...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
|