aspose file tools*
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
JavaRanch » Java Forums » Products » Tomcat
Bookmark "FileNotFoundException during Ant deploy to Tomcat6" Watch "FileNotFoundException during Ant deploy to Tomcat6" New topic
Author

FileNotFoundException during Ant deploy to Tomcat6

Kevin Foster
Greenhorn

Joined: Jul 11, 2010
Posts: 2
Hi,

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:


java.io.FileNotFoundException: /home/kevin/projects/serverlet/tomcat6/myfirstapp/build (Permission denied)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:137)
at org.apache.catalina.manager.ManagerServlet.copyInternal(ManagerServlet.java:1644)
at org.apache.catalina.manager.ManagerServlet.copy(ManagerServlet.java:1605)
at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:819)
at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:350)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:636)


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.

Thanks
Kevin Foster
Greenhorn

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?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: FileNotFoundException during Ant deploy to Tomcat6