Eclipse tomcat error: Document base does not exist or is not a readable directory

后端 未结 20 3487
误落风尘
误落风尘 2020-12-04 10:44
13-dic-2011 17.00.36 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in producti         


        
相关标签:
20条回答
  • 2020-12-04 11:35

    This might be late but for the benefit of the those who might encounter the same problem in the future, I'll share what I experienced.

    I got this problem after I deleted the WebContent folder of the Dynamic Web Project I just created in place of webapp folder which is the standard folder of my company. I found out that, in Project Properties > Deployment Assembly, WebContent folder is still used as the root of the web application (Deploy Path : "/"). Thus, Eclipse doesn't copy the project to .metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps because the root specified in Deployment Assembly does not exist anymore.

    I fixed it by editing that entry then correcting it with the folder I am using in place of the default WebContent (the webapp folder)

    0 讨论(0)
  • 2020-12-04 11:37

    Before adopting any other solution, make sure that the project is open.

    0 讨论(0)
  • 2020-12-04 11:39

    Looking at the exception you get, this looks like a problem with publishing your WEB-App (eg. Eclipse WTP could mess something up). First things that come in my mind:

    Check your Tomcat server settings: go to Servers - double click on your server. Get your 'Server Locations - Server Path' and check if it exists and check the user/group read/write permissions. eg. ls -lh somepath/.medadata/.plugins/.org.eclipse.wst.server.core/tmp0 You must be owner or at least in same group for the folder.

    Clean the eclipse workspace. (Project - clean all)

    Clean/Republish your wep-app (right click on server, clean, publish).

    Check if the application is published, there should be a folder named Preventini in /home/claudio/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ Also check the permissions here again (see above).

    0 讨论(0)
  • 2020-12-04 11:42

    This could happen because "Tomcat\conf\Catalina" folder. Please delete this folder.

    Thanks Kamal

    0 讨论(0)
  • 2020-12-04 11:43

    If using Eclipse STS

    1. open the server view

    2. select the server that you're trying to publish to

    3. right click -> clean

    I had this problem come up a couple of times and this always seemed to fix it. I suppose the other solutions work too but they seem more complicated to me.

    enter image description here

    0 讨论(0)
  • 2020-12-04 11:46

    i have solved this error by adding removing and adding again the jar files from WebContent/WEB-INF/lib folder. and i did the same in properties of project ie(Right click on project->Build Path->configure build Path) by selecting Add External Jar option.

    0 讨论(0)
提交回复
热议问题