-
Bug
-
Resolution: Done
-
Major
-
8.0.0.Final
-
None
Consider the following cli file:
/subsystem=datasources/data-source=fai-bfsa:add( \ driver-name=PostgresJDBCDriver, \ driver-class="org.postgresql.Driver", \ jndi-name=java:jboss/jdbc/fai-bfsa, \ connection-url=jdbc:postgresql://tpg0001:5432/xfgb01, \ max-pool-size=20, \ min-pool-size=10, \ new-connection-sql="select 1", \ check-valid-connection-sql="select 1", \ user-name=uuuuu, \ password=uuuuu, \ background-validation=false, \ validate-on-match=false, \ enabled=false, \ jta=true, \ use-ccm=true, \ share-prepared-statements=false, \ )
This is reflected into standalone-full.xml as:
<datasource jta="true" jndi-name="java:jboss/jdbc/fai-bfsa" pool-name="fai-bfsa" enabled="false" use-ccm="true"> <connection-url>jdbc:postgresql://tpg0001:5432/xfgb01</connection-url> <driver-class>org.postgresql.Driver</driver-class> <driver>PostgresJDBCDriver</driver> <new-connection-sql>select 1</new-connection-sql> <pool> <min-pool-size>10</min-pool-size> <max-pool-size>20</max-pool-size> </pool> <security> <user-name>uuuuu</user-name> <password>uuuuu</password> </security> <validation> <check-valid-connection-sql>select 1</check-valid-connection-sql> <validate-on-match>false</validate-on-match> <background-validation>false</background-validation> </validation> <statement> <share-prepared-statements>false</share-prepared-statements> </statement> </datasource>
I can now enable and disable that datasource both via cli or console without problem.
If i create the same datasource via console, with the very same attributes, producing the very same standalone-full.xml (i have diffed them), i cannot enable it nether via cli nor console because i get the following error:
14:33:00,230 ERROR [org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService$AS7DataSourceDeployer] (MSC service thread 1-3) Error during the deployment of java:jboss/jdbc/fai-bfsa: java.lang.IllegalStateException at org.jboss.msc.value.InjectedValue.getValue(InjectedValue.java:47) at org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService$AS7DataSourceDeployer.getTransactionIntegration(AbstractDataSourceService.java:409) at org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService$AS7DataSourceDeployer.createMcf(AbstractDataSourceService.java:461) at org.jboss.jca.deployers.common.AbstractDsDeployer.deployDataSource(AbstractDsDeployer.java:430) at org.jboss.jca.deployers.common.AbstractDsDeployer.createObjectsAndInjectValue(AbstractDsDeployer.java:283) at org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService$AS7DataSourceDeployer.deploy(AbstractDataSourceService.java:310) at org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService.start(AbstractDataSourceService.java:124) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51] at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51] 14:33:00,236 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.data-source.java:jboss/jdbc/fai-bfsa: org.jboss.msc.service.StartException in service jboss.data-source.java:jboss/jdbc/fai-bfsa: JBAS010433: Error during the deployment of fai-bfsa at org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService.start(AbstractDataSourceService.java:131) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.0.Final.jar:1.2.0.Final] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.0.Final.jar:1.2.0.Final] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51] at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51] Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS010432: Unable to start the ds because it generated more than one cf at org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService.start(AbstractDataSourceService.java:126) ... 5 more 14:33:00,242 INFO [org.jboss.as.controller] (XNIO-4 task-2) JBAS014774: Servicestatus report JBAS014775: New missing/unsatisfied dependencies: service jboss.data-source.reference-factory.fai-bfsa (missing) dependents:[service jboss.naming.context.java.jboss.jdbc.fai-bfsa] service jboss.data-source-config.fai-bfsa (missing) dependents: [service jboss.data-source.java:jboss/jdbc/fai-bfsa] JBAS014777: Services which failed to start: service jboss.data-source.java:jboss/jdbc/fai-bfsa