当我启动Wildfly 10.1.0时,我得到 WFLYCTL0212:重复资源错误。如果我从Eclipse和dos控制台启动服务器,我会收到错误。详细日志消息:
09:55:44,332 INFO [org.jboss.as] (MSC service thread 1-7) WFLYSRV0049: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) starting
09:55:47,511 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found Bread.war in deployment directory. To trigger deployment create a file called Bread.war.dodeploy
09:55:47,512 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found Butter.war in deployment directory. To trigger deployment create a file called Butter.war.dodeploy
09:55:47,512 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found Jelly.war in deployment directory. To trigger deployment create a file called Jelly.war.dodeploy
09:55:47,512 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found Eggs.war in deployment directory. To trigger deployment create a file called Eggs.war.dodeploy
09:55:47,539 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "Jelly.war")]) - failure description: "WFLYCTL0212: Duplicate resource [(\"deployment\" => \"Jelly.war\")]"
09:55:47,543 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
此时我要做的是进入C:\ApplicationServer\wildfly-10.1.0.Final\standalone\deployments
文件夹并删除Jelly.war.failed
文件。我再次启动服务器,此时它正常启动。
Jelly.war和其他应用程序之间的唯一区别是,在Eclipse中,如果我右键单击Servers选项卡中的服务器并单击Add and Remove,它会将Jelly.war显示为服务器上配置的资源。所以问题是:为什么会发生这种错误?如何永久解决?怎么不让它再次发生?