• Post Reply Bookmark Topic Watch Topic
  • New Topic

Access Denied Error...  RSS feed

 
Somnath Mallick
Ranch Hand
Posts: 483
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,

I am trying to run a servlet which reads an Excel sheet and displays it on a browser. I am using POI jar. But the thing is that when i am loading the Excel sheet:


I get the error message:


This is the first time i am seeing this problem. Please help.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would seem that Tomcat runs with a security manager that prevents it from accessing that file. Are you sure the file (and all the directories above it) allow access to the account used to run Tomcat?
 
vikram Kesav
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just check whether the file in readonly mode.
 
Somnath Mallick
Ranch Hand
Posts: 483
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I checked that the file wasn't Read-Only. But the folders above it were! How do i check that Tomcat is allowed to run that file or not?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which user account is used to run Tomcat? If it's your user account then that's likely not the problem.

Did the problem go away when you changed all the directories from read-only to read/write?
 
Somnath Mallick
Ranch Hand
Posts: 483
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I was using my Tomcat from Eclipse. I had checked an option called "enable security". I unchecked that box and it is working fine!!! Thanks everyone for the help. Mine is Tomcat 6.0.20 with no admin user selected! Well the problem didn't go away when I changed them to non-read-only, they again became read-only when i ran the code again! It happened over and over and again till i unchecked that box!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!