Question

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?

Was it helpful?

Solution

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?

OTHER TIPS

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

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

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.

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.

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).

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

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top