Wildfly DuplicateServiceException

﹥>﹥吖頭↗ 提交于 2019-11-30 18:45:41

in your ../wildfly-X.X.X/standalone/configuration/standalone.xml you'll se the following:

<deployments>
    <deployment name="your_file.war" runtime-name="your_file.war">
        <fs-archive path=".../your_file.war"/>
    </deployment>
    ...
</deployments>

This causes the DuplicateServiceException. Just remove it.

It's simple. You was registered Datasource twice - in server config (check standalone.xml) and in Przychodnia-ds.xml. Would you like to prefer only one place.

I think that the problem here is about the dupplication of the datasource entries

Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.data-source.java:jboss/datasources/PostgreSql/Przychodnia is already registered

have a look on this post Advanced JAX-WS Security with Wildfly step by step

try to find standalone.xml located in %WILDFLY_HOME%/standalone/configuration

<subsystem xmlns="urn:jboss:domain:datasources:2.0">
<datasources>
<datasource jta="true" jndi-name="java:jboss/datasources/PostgreSql/Przychodnia" pool-name="ecoleDS" enabled="true" use-ccm="true">
    <connection-url>jdbc:postgresql://localhost:5432/Przychodnia</connection-url>
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <driver>your postgres-connector</driver>
    <security>
        <user-name></user-name>
        <password>****</password>
    </security>
    <validation>
        <validate-on-match>false</validate-on-match>
        <background-validation>false</background-validation>
    </validation>
    <timeout>
        <set-tx-query-timeout>false</set-tx-query-timeout>
        <blocking-timeout-millis>0</blocking-timeout-millis>
        <idle-timeout-minutes>0</idle-timeout-minutes>
        <query-timeout>0</query-timeout>
        <use-try-lock>0</use-try-lock>
        <allocation-retry>0</allocation-retry>
        <allocation-retry-wait-millis>0</allocation-retry-wait-millis>
    </timeout>
    <statement>
        <share-prepared-statements>false</share-prepared-statements>
    </statement>
</datasource>

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!