Passionate Engineer
Passionate Engineer

Reputation: 10412

Duplicate resource Wildfly

I'm getting below error in Wildfly 8.2:

05:17:12,202 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.2.Final
05:17:12,285 INFO  [org.jboss.as] (MSC service thread 1-6) JBAS015899: WildFly 8.2.0.Final "Tweek" starting
05:17:13,199 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 12) JBAS014613: Operation ("add") failed - address: ([
    ("subsystem" => "datasources"),
    ("data-source" => "ExampleDS")
]) - failure description: "JBAS014803: Duplicate resource [
    (\"subsystem\" => \"datasources\"),
    (\"data-source\" => \"ExampleDS\")
]"

How can I remove duplicate?

Upvotes: 18

Views: 55540

Answers (8)

Normall
Normall

Reputation: 1

Deleting the "" section from standalone.xml file did the trick for me. However, it was added by IntelliJ and I', not sure how to delete that when I stop the server in IntelliJ.

Upvotes: 0

boozy
boozy

Reputation: 323

Thanks to @i2ijeya, I could solve thr problem. In my case, the XML block of deployments was in standalone/configuration/standalone-full.xml path.

Upvotes: 0

bimal srivastava
bimal srivastava

Reputation: 41

I ran into the same issue. wildfly was also creating .failed files in standalone/configuration folder. To fix this,

  • i removed all the .failed files.

  • cleaned up the contents from deployments, tmp and data folders.

  • started the server without any war/ear deployed. It was able to start clean.

  • stopped the jboss and added the war/ear and started again

now it works fine. Looks like this is a known issue in WildFly https://issues.jboss.org/browse/WFCORE-495

Hope this helps..

If this does not help. Next action to perform would be: - Open the standalone.xml or standalone-full.xml (depending on which one is being used)

  • find deployment-scanner tag. Most certainly it will have two or more entries.

  • keep the entry mentioned below and remove all others:

deployment-scanner path="deployments" relative-to="jboss.server.base.dir" ....

  • clear all the .failed files as well as tmp and data folders.

  • try now to start jboss wildfly (you can add the war/ear again from eclipse jboss plugin).

Upvotes: 4

Pankaj Kalra
Pankaj Kalra

Reputation: 81

I also face this same issue, this is bug in JBOSS 8 version for this i follow the below steps to resolve this

  1. remove *.failed files from deployments folder

  2. comments below lines in standalone.xml file

    <extension module="org.wildfly.extension.undertow"/>

and this complete subsystem tag

<subsystem xmlns="urn:jboss:domain:undertow:1.2">
</subsystem>
  1. restart JBoss

  2. again remove *.failed files from deployement folder

  3. uncomment step 2 means uncomment this tag

    <subsystem xmlns="urn:jboss:domain:undertow:1.2">

and

`<extension module="org.wildfly.extension.undertow"/>`

this line from standalone.xtml.

If you found removed this subsystem tag and above line from standalone.xml then copies these from standalone-full.xhtml.

  1. restart the jboss and now this duplicate resource issue is resolved :)

Upvotes: -1

ℛɑƒ&#230;Ŀᴿᴹᴿ
ℛɑƒ&#230;Ŀᴿᴹᴿ

Reputation: 5326

Maybe some .jar was corrupted inside your maven local repository.

Delete all in %UserProfile%\.m2\repository directory, build and try again.

Upvotes: 0

i2ijeya
i2ijeya

Reputation: 16400

Under standalone/configuration/standalone-full.xml remove the duplicate deployment value.

Remove the below if mywar.war is the duplicate one.

<deployments>
    <deployment name="mywar.war" runtime-name="mywar.war">
        <content sha1="d642ffaa51228ab567439653a0923c69b7972cf5"/>
    </deployment>
</deployments>

Upvotes: 37

Brahim Hasni
Brahim Hasni

Reputation: 11

You can use 2 method in this kind of error :

  • in standalone.xml and remove the duplicate resource or in localhost:19990/console/App.html, you can too remove the duplicate resource

Upvotes: 1

DeepNightTwo
DeepNightTwo

Reputation: 4951

This is a bug about jboss. Please refer to https://bugzilla.redhat.com/show_bug.cgi?id=1169239 for details.

To resolve the problem, try to find and remove the * < app >.war.failed* file.

Upvotes: 18

Related Questions