Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 976
Passionate Engineer Avatar asked Jan 31 '15 18:01

Passionate Engineer


4 Answers

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>
like image 89
i2ijeya Avatar answered Nov 17 '22 17:11

i2ijeya


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.

like image 27
DeepNightTwo Avatar answered Nov 17 '22 17:11

DeepNightTwo


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).

like image 4
bimal srivastava Avatar answered Nov 17 '22 15:11

bimal srivastava


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
like image 1
Brahim Hasni Avatar answered Nov 17 '22 15:11

Brahim Hasni