Search code examples
javatomcataccess-deniedfilenotfoundexception

"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?


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?