如何修复这个问题:FAIL – 应用程序已经存在于路径 /second

huangapple go评论75阅读模式
英文:

How do I fix this : FAIL - Application already exists at path /second

问题

我遇到了一个问题,我不知道如何修复它。这是我第一次遇到这个问题。我尝试过在context.xml中更改路径,但第一次可以运行,然后再次出现了相同的问题。

以下是错误信息:

在部署到Apache Tomcat或TomEE时
    配置模式:否
    调试模式:否
    强制重新部署:是
就地部署于C:\Users\chafy\Documents\NetBeansProjects\firstapp\target\firstapp-1.0-SNAPSHOT
部署正在进行中...
deploy?config=file%3A%2FC%3A%2FUsers%2Fchafy%2FAppData%2FLocal%2FTemp%2Fcontext5856041917942518665.xml&path=/secondapp
失败 - 应用程序已经存在于路径[/secondapp]中
英文:

I'm having a problem that I don't know how to fix it. This the first time I have this problem. I tried to change the path in context.xml but it works the first time and remake the same problem.

Here the error :

Deploying on Apache Tomcat or TomEE
    profile mode: false
    debug mode: false
    force redeploy: true
In-place deployment at C:\Users\chafy\Documents\NetBeansProjects\firstapp\target\firstapp-1.0-SNAPCHOT
Deployment is in progress...
deploy?config=file%3A%2FC%3A%2FUsers%2Fchafy%2FAppData%2FLocal%2FTemp%2Fcontext5856041917942518665.xml&path=/secondapp
ECHEC - l'application existe déjà dans le chemin [/secondapp]

答案1

得分: 2

> 使用 war 文件 'test.war' 部署应用到上下文 '/hello' 到服务器 'http://localhost:8080/manager/'。
应用部署失败:FAIL - 无法删除 [D:\Program Files\Apache\Tomcat 9.0\webapps\hello]。该文件的持续存在可能会引起问题。
FAIL - 应用在路径 /hello 处已存在。

Tomcat 会锁定文件或目录位置。在大多数情况下,这发生在第一次成功部署之后,随后的部署将被阻止。

解决方法
可以通过在 Tomcat 上下文中添加

> <Context antiResourceLocking="true">

来修复这个问题。antiResourceLocking 默认为 false。更多细节可以阅读 http://tomcat.apache.org/tomcat-9.0-doc/config/context.html

英文:

> Deploying application with war file 'test.war' to context '/hello' to server 'http://localhost:8080/manager/'
Application failed to deploy: FAIL - Unable to delete [D:\Program Files\Apache\Tomcat 9.0\webapps\hello]. The continued presence of this file may cause problems.
FAIL - Application already exists at path /hello

Tomcat locks files or directory location. In most cases, this happens after the first successful deployment and subsequent ones will be blocked.

Resolution
This can be fixed by adding

> <Context antiResourceLocking="true">

to tomcat context. The antiResourceLocking is by default set to false. More details can be read at http://tomcat.apache.org/tomcat-9.0-doc/config/context.html

答案2

得分: 0

帮助了我
antiResourceLocking="true"
mvn cargo:redeploy

英文:

helped for me
antiResourceLocking=&quot;true&quot;
mvn cargo:redeploy

huangapple
  • 本文由 发表于 2020年7月25日 19:18:32
  • 转载请务必保留本文链接:https://go.coder-hub.com/63087693.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定