• Post Reply Bookmark Topic Watch Topic
  • New Topic

Web App can't read properties file  RSS feed

 
Maksim Ustinov
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a web add and properties file. The properties file stored on C:\SomeFolder drive. I'm using regular InputStream to read that file and then return values. Everything works fine when the file is on the local machine. When the file is moved to the mapped network drive (N: ) for some reason you have to call that file twice to make it to work. What can cause that? Is there any other method to read file?
Thanks
 
Paul Clapham
Sheriff
Posts: 22374
42
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Evidently your server is running on Windows. Is it running as a service? Because typically Windows services don't have the mapped drives which you have when you sign on as a user.
 
Maksim Ustinov
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. It is windows 2003 server. I have two projects on the server: one enterprise web proj and another is web servise that does some stuff whet web project calles it. So those two projects use that prop. file. That's why I have to have it in "c:\somefolder". Apparently there is no network drive. The file is on second partition on that server.

So when I run those two projects on my local comp. everythink works fine but when I put them on server then it has problem reading prop. file. It can read it but only after several retries.

Is it possible that os has some weird permissions?

By the way, I don't have any control over that server except just network folder for my prop. file and app server (glassfish running as a service) control panel.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!