Pratyusha
Pratyusha

Reputation: 113

"Access is denied" message while deploying spring app in tomcat 6

While trying to deploy my spring app on tomcat 6 I get an error saying

java.util.logging.errormanager:4
java.io.filenotfoundexception: c:\program files\apache software foundation\tomcat 6.0\logs\catalina.2010.02.16.log <Access is denied>
  at java.io.fileoutputstream.openappend <native method>
  at java.io.fileoutputstream.<init><unknown source>
  at java.io.filewriter.<init><unknown source>
  at apache.juli.filehandler.open<filehandler.java:259>
  at apache.juli.filehandler.open<filehandler.java:59>
  at apache.juli.filehandler.open<filehandler.java:50>
  at sun.reflect.nativeconstructoraccessorImpl.newInstance0<native method>
  at sun.reflect.delegatingconstructoraccessorImpl.newInstance<unknown source>
  at sun.reflect.constructor.newInstance<unknown source>
  at java.lang.class.newinstance0<unknown source>
  at org.apache.juli.classloaderlogmanager.readconfiguration<classloaderlogmanager.java:418>
  .....
  .....
  at java.util.logging.logmanager$2.run<unknown source>
  .....
  .....

Is this because Tomcat hasn't been installed properly? Or do I need some permissions to use Tomcat? Or are some important tomcat files missing? Or something else?

Upvotes: 3

Views: 36051

Answers (8)

Hammad Hassan
Hammad Hassan

Reputation: 1222

The simple solution is that you need to run Tomcat with Administrator Permission. And this access denied will never occur.

Upvotes: 0

user2015880
user2015880

Reputation: 1

Solution: I right click on eclipse and gave it administrative rights

Upvotes: 0

manishgupta005
manishgupta005

Reputation: 31

right click on log folder and in security give yourself proper WRITE permission and make sure folders are not in read only mode.

Upvotes: 3

Mark
Mark

Reputation: 891

I solved it by running netBeans (or whichever IDE you are using to run the application) as an administrator. That gives you access permissions.

Upvotes: 5

Kdeveloper
Kdeveloper

Reputation: 13819

After installing Apache Tomcat you must give the OS user who will be running the Tomcat server write/update rights to the directories: temp, logs, work.

Upvotes: 1

Ryan Fernandes
Ryan Fernandes

Reputation: 8526

Looks like you're working on a machine that has some security policies in place that restrict you from installing software yourself. This is very common in most organizations nowadays.

Do the following:

  1. Uninstall tomcat.
  2. Find a folder where you can read/write into (eg. D:\neetu)
  3. Install tomcat in the above folder.

Run tomcat.
It should work now.

Upvotes: 1

kgiannakakis
kgiannakakis

Reputation: 104178

Tomcat has no access rights to the c:\program files\ folders. There are ways to get around this, but the easiest way will be to install Tomcat in another directory, e.g in your user area (C:\Users).

Upvotes: 0

Peter Lang
Peter Lang

Reputation: 55524

Check if the following file exists:

c:\program files\apache software foundation\tomcat 6.0\logs\catalina.2010.02.16.log

Your exception says <Access is denied>, so maybe the file is open in another application or you are missing permissions?

Upvotes: 4

Related Questions