Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-495

WFLY won't startup due to "WFLYCTL0212: Duplicate resource [(\"deployment\" => \"xxx.war\")]"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.0.0.Alpha16
    • 1.0.0.Alpha15
    • Server
    • None
    • Hide

      Before restart, manually removing first deployment from configuration file (standalone.xml)

      Show
      Before restart, manually removing first deployment from configuration file (standalone.xml)

      WFLY won't startup due to "WFLYCTL0212: Duplicate resource [(\"deployment\" => \"xxx.war\")]"

      If you firstly deploy a .war application by CLI command, then deploy 2nd time same .war application by copying it to /depolyment directory. After server restart, it shows:

      15:26:26,913 INFO  [org.jboss.as] (MSC service thread 1-8) WFLYSRV0049: WildFly Full 9.0.0.Alpha2-SNAPSHOT (WildFly Core 1.0.0.Alpha15) starting
      15:26:27,133 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "xxx.war")]) - failure description: "WFLYCTL0212: Duplicate resource [(\"deployment\" => \"xxx.war\")]"
      15:26:27,136 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
      15:26:27,138 INFO  [org.jboss.as.server] (Thread-2) WFLYSRV0220: Server shutdown has been requested.
      15:26:27,153 INFO  [org.jboss.as] (MSC service thread 1-1) WFLYSRV0050: WildFly Full 9.0.0.Alpha2-SNAPSHOT (WildFly Core 1.0.0.Alpha15) stopped in 4ms
      

      steps to reproduce:

      1. start wildfly and deploy a .war application by CLI.
      2. copy same .war application to /deployment directory
      3. restart wildfly to see the error message.

      This happens because step 2 does a "full-replace-deployment" operation which does not remove content from standalone/data/content/aa/2d0425dd53572294d591b56efdee2680539eaf/content and deployment info from configuration file(standalone.xml). Therefore, you will have xxx.war in standalone/data/content and configuration file(standalone.xml), also a xxx.war and xxx.war.deployed file inside /standalone/deployments. A second time server restart will cause a duplicate resource error.

              chaowan@redhat.com Chao Wang
              chaowan@redhat.com Chao Wang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: