|
From: Leif M. <le...@ta...> - 2005-06-30 01:54:37
|
I have had problems on some Windows versions with this as well, but have
never been able to figure out exactly what is causing the problems. It
works on some machines but not others.
I have seen cases where starting the service on system starup will not
work, but starting it when the account that the service is running as is
is also logged in works fine. I haven't seen any clues that this is a
Wrapper specific problem, there may be something that the Wrapper
needs to be doing on initialization that I am not aware of however.
A workaround that I found was to use Universal paths rather than the
mapped drives. So use the original \\computer\path rather than the
mapped drive. That has worked reliably for me. You still need to
be running as a user with network access, who has permission to
access the specific remote resource.
Cheers,
Leif
Krassimir Boyanov wrote:
> Hi,
>
> I have Java application, using the Wrapper and installed as a NT
> service, which have to save a file on a mapped network drive (for
> example U:). Before saving a file it checks for the existence of the
> directory path - see below:
>
> File rootDir = new File("U:/");
> if (!rootDir.exists())
> {
> logger.error("Root directory does not exist! ");
> }
>
> The problem is that the exists() method returns false. I do not
> observe the same issue if I run the same code under command prompt
> (without using the wrapper and the NT service), i.e. the same method
> exists() returns true.
>
> The service is setup to run under the same account as the network
> drive is mapped.
>
> Please advice on how to resolve this problem. Your help is highly
> appreciated.
>
> Krassimir
>
|