When you run Tomcat as a service, you also assign it an account under which it will 
run.  On Win2k, this shows up under the "Log In As" in the Services administration 
tool.  That account must have permission to access the share in question.

As to what drive mapping a service sees, I am not certain.  I would recommend you make 
sure that the service runs under and account with access to the share (for example, 
the LocalSystem account will *not* have access), and use the UNC name for the file 
rather than using the mapped drive letter.

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message ----- 
From: "Cook, Michael" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 05, 2003 12:46 PM
Subject: Tomcat Service and Shared Drives?


> Hello, 
>  
> One of my SOAP applications needs to read in files on the disk. These files
> are located
> on a shared drive (K: in this case mapped to \\myserver\files
> <file://\\myserver\files> ). So, for example, the SOAP
> application may have to access a file called k:\data.txt.
>  
> I have noticed that, whenever I run Tomcat as a service, I get the following
> exception:
>  
> "The system cannot find the file specified."
>  
> I know the file exists and if I move the file to a local drive (c:\files\)
> then everything is
> fine.
>  
> The strange this is, however, if I run Tomcat from the console (batchfile)
> and not as
> a service then everything seems to work fine!?!?
> 
> The bottom line is this. It appears that my application cannot access shared
> drives
> when it is run within a Tomcat service, but it can access shared drives when
> run from
> the console.
>  
> Any ideas?
>  
> Thanks!
>

Reply via email to