]
Gabriele Garuglieri commented on WFLY-3104:
-------------------------------------------
One more hint, the problem looks to be caused by jta=true. Setting it to false works in
all the circumstances.
Really i do not need that attribute and i created a ds with cli letting it to default,
after that both read-resource and console showed it as true and the ds could be enabled
and disabled without problems.
Then someone tried to create a similar ds via console setting jta as true like the
previous ds, stumbling on this problem.
datasource created with console cannot be enabled
-------------------------------------------------
Key: WFLY-3104
URL:
https://issues.jboss.org/browse/WFLY-3104
Project: WildFly
Issue Type: Bug
Security Level: Public(Everyone can see)
Environment: Wildfly 8.0.0 Final
Reporter: Gabriele Garuglieri
Consider the following cli file:
{noformat}
/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, \
)
{noformat}
This is reflected into standalone-full.xml as:
{code:xml}
<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>
{code}
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:
{noformat}
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
{noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: