|
From: KRASSIMIR B. <kr...@ho...> - 2005-06-30 19:14:25
|
Thanks, Leif.
The workaround of using the original network path worked very well. I am =
still curious though why using drive letter does not. I will keep you =
posted if I find anything that resolves it.
Thanks again,
Krassimir=20
----- Original Message -----=20
From: Leif Mortenson=20
To: wra...@li...=20
Sent: Wednesday, June 29, 2005 6:54 PM
Subject: Re: [Wrapper-user] Java file.exists() return false (when NT =
service and network drive is used)
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 =3D 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
>
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. =
http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dclick
_______________________________________________
Wrapper-user mailing list
Wra...@li...
https://lists.sourceforge.net/lists/listinfo/wrapper-user
|