Wildfly (JBoss) startup error: ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation (“add”) failed

Error content:

15:07:50,724 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "MESwell.ear")]) 
- failure description: "WFLYCTL0212: Duplicate resource [(\"deployment\" => \"MESwell.ear\")]"

15:07:50,728 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.

 

Error reporting scenario:

This error occurs when I start it normally for the first time, and then turn it off. When I start it for the second time, it will fail to start. Many answers were searched on the Internet, but they failed. Later, I found this answer:

[wfcore-495] wfly won’t startup due to “wflyctl0212: duplicate resource [(\” deployment \ “= & gt; \” XXX. War \ “)] – red hat issue tracker

Through this answer, I know that it must be related to the nonstandard start-up operation of my second time. The nonstandard start-up led to the existence of the cache started last time. Then I searched wildfly how to clean up the cache.

 

Here is the Solution:

1. Find the package you put under \wildfly-10.1.0.Final\standalone\deployments\, check its startup status, and delete the files generated after the startup failure. (It seems to be fine without cleaning up)

2. Delete all files under \wildfly-10.1.0.Final\standalone\data

3、Go to \wildfly-10.1.0.Final\standalone\configuration and find your standalone.xml

Search for deployment, find a string of tags like the following generated, delete!

4. After executing the appeal operation, check whether the above three steps are not clear and clean

5. Restart your wildfly (JBoss)

Read More: