开发者

Can't deploy Tomcat webapp in Netbeans 6.8

开发者 https://www.devze.com 2023-02-02 15:56 出处:网络
When trying to deploy an Tomcat application in Netbeans I get the following message: FAIL - Deployed application at context path /Webapp but context failed to start

When trying to deploy an Tomcat application in Netbeans I get the following message:

FAIL - Deployed application at context path /Webapp but context failed to start
/some/dir/Webapp/nbproject/build-impl.xml:593: The module has not been deployed.

Looking at catalina.out I found this:

SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base /some/dir/Webapp/b开发者_运维技巧uild/web does not exist or is not a readable directory 
    at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142)
    at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4086)
    (...)

But I can do cd /some/dir/Webapp/build/web without a problem!

So far:

  • The deployed(?) application appears listed on Tomcat's manager, but I can't start it.
  • Tried to remove Webapp.xml in /usr/share/tomcat6/conf/Catalina/localhost, but the problem persists.
  • /usr/share/tomcat6/work/Catalina/localhost/Webapp is empty.

I'm using Tomcat 6, Netbeans 6.8, Ubuntu 10.04.

Edit:

  • I have no trouble deploying the application using Tomcat's manager.
  • Tomcat was running under tomcat6 user. Doing su tomcat6 I can't cd /some/dir/Webapp/build/web (permission denied).

So finally I had to change permissions, allowing tomcat user to access the directory.


I'm guessing that you're looking at some permission issues. Tomcat is probably trying to deploy that app directly from it's location on your disk. See what user id tomcat is running under with: ps -aux | grep -i tomcat then su <user id> to that user and see if you can get to the application's directory.

Also you can see if the app will deploy via Tomcat's manager app, which is usually found here: http://localhost:8080/manager/html

0

精彩评论

暂无评论...
验证码 换一张
取 消