The moose likes Tomcat and the fly likes FileNotFoundException during Ant deploy to Tomcat6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "FileNotFoundException during Ant deploy to Tomcat6" Watch "FileNotFoundException during Ant deploy to Tomcat6" New topic

FileNotFoundException during Ant deploy to Tomcat6

Kevin Foster

Joined: Jul 11, 2010
Posts: 2

I'm trying to learn how to develop web applications with Java and I am reading the development process guide on Apache Tomcat site. I've gotten as far as using ant to compile my app but i cant get it to deploy.

When attempting to deploy the following is written to var/log/tomcat6/catalina.out: /home/kevin/projects/serverlet/tomcat6/myfirstapp/build (Permission denied)
at Method)
at org.apache.catalina.manager.ManagerServlet.copyInternal(
at org.apache.catalina.manager.ManagerServlet.copy(
at org.apache.catalina.manager.ManagerServlet.deploy(
at org.apache.catalina.manager.ManagerServlet.doGet(
at javax.servlet.http.HttpServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.Http11Processor.process(
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(

At first I thought it must be that Ant / Java does not have permission to access my build directory but that is not the case, it is readable by everyone. Then I thought maybe I don't have permission to write to tomcat6/webapps (even though that's not what the Exception indicates) so I added myself to the tomcat6 group and made tomcat6/webapps group writeable but this didn't help.

I'm running Java 1.6 on Fedora 13.

Any suggestions would be appreciated.

Kevin Foster

Joined: Jul 11, 2010
Posts: 2
I just ran "chmod -R 775 /home/kevin" and now I can deploy.

I still don't understand what the problem was. My build directory was readable and the deploy target only needs to copy the files from my build directory. Can anyone explain?
I agree. Here's the link:
subject: FileNotFoundException during Ant deploy to Tomcat6
It's not a secret anymore!