Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FileNotFoundException during Ant deploy to Tomcat6

 
Kevin Foster
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic