Eric Hills
2013-06-05 18:05:43 UTC
Eric Hills [https://community.jboss.org/people/onecoder] created the discussion
"JBAS014803: Duplicate resource"
To view the discussion, visit: https://community.jboss.org/message/821573#821573
--------------------------------------------------------------
I am converting from JBoss 5 to AS 7.1 we have multiple datasources that use the same pool but with a different user and JNDI name. I get the duplicate error. Does anyone know how to deploy. I have included a segment of my standalone.xml. If anyone has thoughts it would be very helpful. I have not found anything in my search other than changing the pool-name. Also I will need to have 6 total entries similar to this they may all use the same db instance but will have a different JNDI name and different users and passwords.
<datasource jndi-name="java:/jdbc/xyz-xxx-reports" pool-name="OracleDS" enabled="true" jta="true" use-java-context="true" use-ccm="true">Â Â Â Â
   <connection-url>
    jdbc:oracle:thin:@server:1526:webuat
  </connection-url>   Â
  <driver>
   oracle
  </driver>
  <security>
   <user-name>report_user</user-name>
   <password></password>
  </security>
  <new-connection-sql>select * from dual</new-connection-sql>
  <validation>
   <check-valid-connection-sql>select * from dual</check-valid-connection-sql>
   <background-validation>true</background-validation>
   <background-validation-millis>10000</background-validation-millis>
   </validation>
   <timeout>
   <allocation-retry>1</allocation-retry>
   </timeout>
  </datasource>
   <datasource jndi-name="java:/jdbc/abc-analysis" pool-name="OracleDS" enabled="true" jta="true" use-java-context="true" use-ccm="true">         Â
      <connection-url>
       jdbc:oracle:thin:@server:1526:webdev
      </connection-url>
      <driver-class>
       oracle
      </driver-class>
      <security>
       <user-name>history_user</user-name>
       <password></password>
      </security>
      <new-connection-sql>select * from dual</new-connection-sql>
  <validation>
   <check-valid-connection-sql>select * from dual</check-valid-connection-sql>
   <background-validation>true</background-validation>
   <background-validation-millis>10000</background-validation-millis>
   </validation>
   <timeout>
   <allocation-retry>1</allocation-retry>
   </timeout>    Â
   </datasource>
actual boot log message:
10:05:51,760 ERROR [org.jboss.as.controller.management-operation] Operation ("add") failed - address: ([
   ("subsystem" => "datasources"),
   ("data-source" => "OracleDS")
]) - failure description: "JBAS014803: Duplicate resource [
   (\"subsystem\" => \"datasources\"),
   (\"data-source\" => \"OracleDS\")
]"
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/821573#821573]
Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2077]
"JBAS014803: Duplicate resource"
To view the discussion, visit: https://community.jboss.org/message/821573#821573
--------------------------------------------------------------
I am converting from JBoss 5 to AS 7.1 we have multiple datasources that use the same pool but with a different user and JNDI name. I get the duplicate error. Does anyone know how to deploy. I have included a segment of my standalone.xml. If anyone has thoughts it would be very helpful. I have not found anything in my search other than changing the pool-name. Also I will need to have 6 total entries similar to this they may all use the same db instance but will have a different JNDI name and different users and passwords.
<datasource jndi-name="java:/jdbc/xyz-xxx-reports" pool-name="OracleDS" enabled="true" jta="true" use-java-context="true" use-ccm="true">Â Â Â Â
   <connection-url>
    jdbc:oracle:thin:@server:1526:webuat
  </connection-url>   Â
  <driver>
   oracle
  </driver>
  <security>
   <user-name>report_user</user-name>
   <password></password>
  </security>
  <new-connection-sql>select * from dual</new-connection-sql>
  <validation>
   <check-valid-connection-sql>select * from dual</check-valid-connection-sql>
   <background-validation>true</background-validation>
   <background-validation-millis>10000</background-validation-millis>
   </validation>
   <timeout>
   <allocation-retry>1</allocation-retry>
   </timeout>
  </datasource>
   <datasource jndi-name="java:/jdbc/abc-analysis" pool-name="OracleDS" enabled="true" jta="true" use-java-context="true" use-ccm="true">         Â
      <connection-url>
       jdbc:oracle:thin:@server:1526:webdev
      </connection-url>
      <driver-class>
       oracle
      </driver-class>
      <security>
       <user-name>history_user</user-name>
       <password></password>
      </security>
      <new-connection-sql>select * from dual</new-connection-sql>
  <validation>
   <check-valid-connection-sql>select * from dual</check-valid-connection-sql>
   <background-validation>true</background-validation>
   <background-validation-millis>10000</background-validation-millis>
   </validation>
   <timeout>
   <allocation-retry>1</allocation-retry>
   </timeout>    Â
   </datasource>
actual boot log message:
10:05:51,760 ERROR [org.jboss.as.controller.management-operation] Operation ("add") failed - address: ([
   ("subsystem" => "datasources"),
   ("data-source" => "OracleDS")
]) - failure description: "JBAS014803: Duplicate resource [
   (\"subsystem\" => \"datasources\"),
   (\"data-source\" => \"OracleDS\")
]"
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/821573#821573]
Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2077]