|
From: Hubert F. <Hub...@ab...> - 2007-11-06 07:52:24
|
Hi, If possible try to avoid using the redirector from a service. You won't = get lucky with this. One of your problems is, that services running with localsystem account = cannot access the the redirector (network).=20 -You would have to establisch a "null session share" to the target = machine. That't means absolutely no security. Otherwise=20 you must run the service with a dedicated user account.=20 -Your service has to be dependant on Windows Server service and Workstation= service to wait for the network first. -You have problems mapping the drive while a user is logged in. -You loose that drive as soon as the user logs out. -You'd have to enumerate the user shares to find the relation from mapped = network drive to the share name. If you cannot avoid it, you should use UNC names instead of drive letters. I would do it in another way, if possible. hub >>> "Gesly George" <ges...@gm...> 05.11.2007 22:26 >>> Hi, My Java app (Jar1.MainClass) calls Rumtime.exec() to execute another java app (jar2.MainClass). This works when I run the app from the command line (hence I would assume my Rumtime.exec() is working properly). It successfully execs the new process. But when I wrap the app (inside the java service wrapper, the app ( jar1.MainClass) starts up fine, but the Rumtime.exec() fails. My app gets = a NoClassDefFoundError on the call to the Runtime.exec() - Its not able to find the main class of the process that my App is trying to exec(). What intrigues me if how does wrapping my app in a service differ from running the app from the command line. The service is not failing since it runs my app (jar1.MainClass), but somehow it fails on the exec. I have tried the following: - Since my path includes a network drive, I thought the problem might be related to security - so I run the service as a permissioned user instead = of the default system user. - Since this could be a classpath problem I added the jar to wrapper's classpath in the conf file. I searched the website, but could not find something that would help me solve the problem. It would be great if any of you have a suggestion for this. Thanks Gesly |