gpt4 book ai didi

java - 如何从 tomcat 7 的工作文件夹中删除以前的项目

转载 作者:行者123 更新时间:2023-11-29 07:13:51 25 4
gpt4 key购买 nike

我已经在 tomcat7 中部署了一些项目并将它们从 webapps 以及 work 文件夹中删除但是当尝试部署一些新项目时作为 war 到 webapps 它没有被提取并且所有以前的项目文件夹都存在于工作文件夹中,这会产生一些问题。

所以请告诉我如何从 tomcat7 中完全删除旧项目?

日志文件引用了甚至不存在的文件夹

   SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base D:\netbeans_workspace\Servlets-DWR\build\web does not exist or is not a readable directory


Jul 13, 2012 2:38:07 PM org.apache.catalina.core.StandardContext resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base D:\netbeans_workspace\Servlets-DWR\build\web does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:140)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4894)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5074)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1585)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Jul 13, 2012 2:38:07 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error in resourceStart()
Jul 13, 2012 2:38:07 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error getConfigured
Jul 13, 2012 2:38:07 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/Servlets-DWR] startup failed due to previous errors
Jul 13, 2012 2:38:07 PM org.apache.catalina.deploy.NamingResources cleanUp
WARNING: Failed to retrieve JNDI naming context for container [StandardEngine[Catalina].StandardHost
[localhost].StandardContext[/Servlets-DWR]] so no cleanup was performed for that container
javax.naming.NameNotFoundException: Name [comp/env] is not bound in this Context. Unable to find [co
mp].
at org.apache.naming.NamingContext.lookup(NamingContext.java:820)
at org.apache.naming.NamingContext.lookup(NamingContext.java:168)
at org.apache.catalina.deploy.NamingResources.cleanUp(NamingResources.java:977)
at org.apache.catalina.deploy.NamingResources.stopInternal(NamingResources.java:959)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5483)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1585)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Jul 13, 2012 2:38:07 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor D:\Servers\apache-tomcat-7.0.27\conf\Catalina\localhost\Sli
ngeLeaveNotifier.xml
Jul 13, 2012 2:38:07 PM org.apache.catalina.core.StandardContext resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base D:\netbeans_workspace\SlingeLeaveNotifier\build\we
b does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:140)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4894)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5074)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1585)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Jul 13, 2012 2:38:07 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error in resourceStart()
Jul 13, 2012 2:38:07 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error getConfigured
Jul 13, 2012 2:38:07 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/SlingeLeaveNotifier] startup failed due to previous errors
Jul 13, 2012 2:38:07 PM org.apache.catalina.deploy.NamingResources cleanUp
WARNING: Failed to retrieve JNDI naming context for container [StandardEngine[Catalina].StandardHost
[localhost].StandardContext[/SlingeLeaveNotifier]] so no cleanup was performed for that container
javax.naming.NameNotFoundException: Name [comp/env] is not bound in this Context. Unable to find [co
mp].
at org.apache.naming.NamingContext.lookup(NamingContext.java:820)
at org.apache.naming.NamingContext.lookup(NamingContext.java:168)
at org.apache.catalina.deploy.NamingResources.cleanUp(NamingResources.java:977)
at org.apache.catalina.deploy.NamingResources.stopInternal(NamingResources.java:959)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5483)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1585)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Jul 13, 2012 2:38:07 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Servers\apache-tomcat-7.0.27\webapps\docs
Jul 13, 2012 2:38:07 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Servers\apache-tomcat-7.0.27\webapps\examples
Jul 13, 2012 2:38:07 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Servers\apache-tomcat-7.0.27\webapps\host-manager
Jul 13, 2012 2:38:07 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Servers\apache-tomcat-7.0.27\webapps\manager
Jul 13, 2012 2:38:07 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Servers\apache-tomcat-7.0.27\webapps\ROOT
Jul 13, 2012 2:38:07 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-8080"]
Jul 13, 2012 2:38:07 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-apr-8009"]
Jul 13, 2012 2:38:07 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4251 ms

问候

最佳答案

我今天解决了一个类似的问题:

tomcatHome/conf/Catalina/localhost 中,我有两个应用程序 xml 文件。

在每个文件中声明了一个资源:两个资源同名。

我更改了两个资源之一的名称,一切正常。

关于java - 如何从 tomcat 7 的工作文件夹中删除以前的项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11466926/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com