Details
-
Bug
-
Resolution: Obsolete
-
Critical
-
None
-
9.0.0.CR1
-
None
Description
Steps to reproduce:
- deploy JDBC driver as a deployment (postgresql93.jar in this case) - /subsystem=datasources/data-source=BatchProcessingDS:add(driver-name=postgresql93.jar, jndi-name="java:jboss/datasources/BatchProcessingDS", connection-url="some-url") - /subsystem=batch/job-repository=jdbc:write-attribute(name=jndi-name,value="java:jboss/datasources/BatchProcessingDS") - /subsystem=batch:write-attribute(name=job-repository-type,value=jdbc) - :reload
The reload fails with:
11:45:44,391 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."postgresql93.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."postgresql93.jar".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "postgresql93.jar" at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:163) 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:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: javax.batch.operations.BatchRuntimeException: JBERET000621: Failed to look up datasource by jndi name java:jboss/datasources/BatchProcessingDS. at org.jberet.repository.JdbcRepository.<init>(JdbcRepository.java:128) at org.jberet.repository.JdbcRepository.create(JdbcRepository.java:109) at org.wildfly.extension.batch.job.repository.JobRepositoryFactory.getJobRepository(JobRepositoryFactory.java:63) at org.wildfly.extension.batch.deployment.BatchEnvironmentProcessor.deploy(BatchEnvironmentProcessor.java:71) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:156) ... 5 more Caused by: javax.naming.NameNotFoundException: datasources/BatchProcessingDS [Root exception is java.lang.IllegalStateException] at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:153) at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:83) at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:207) at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:184) at org.jboss.as.naming.InitialContext$DefaultInitialContext.lookup(InitialContext.java:237) at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:193) at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:189) at javax.naming.InitialContext.lookup(InitialContext.java:417) at javax.naming.InitialContext.lookup(InitialContext.java:417) at javax.naming.InitialContext.doLookup(InitialContext.java:290) at org.jberet.repository.JdbcRepository.<init>(JdbcRepository.java:126) ... 9 more Caused by: java.lang.IllegalStateException at org.jboss.msc.value.InjectedValue.getValue(InjectedValue.java:47) at org.jboss.as.naming.service.BinderService.getValue(BinderService.java:138) at org.jboss.as.naming.service.BinderService.getValue(BinderService.java:46) at org.jboss.msc.service.ServiceControllerImpl.getValue(ServiceControllerImpl.java:1158) at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:131) ... 19 more 11:45:44,396 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "postgresql93.jar")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"postgresql93.jar\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"postgresql93.jar\".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment \"postgresql93.jar\" Caused by: javax.batch.operations.BatchRuntimeException: JBERET000621: Failed to look up datasource by jndi name java:jboss/datasources/BatchProcessingDS. Caused by: javax.naming.NameNotFoundException: datasources/BatchProcessingDS [Root exception is java.lang.IllegalStateException] Caused by: java.lang.IllegalStateException"}} 11:45:44,397 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([ ("subsystem" => "datasources"), ("data-source" => "BatchProcessingDS") ]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => [ "jboss.driver-demander.java:jboss/datasources/BatchProcessingDS is missing [jboss.jdbc-driver.postgresql93_jar]", "jboss.data-source.java:jboss/datasources/BatchProcessingDS is missing [jboss.jdbc-driver.postgresql93_jar]" ]} 11:45:44,398 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([ ("subsystem" => "datasources"), ("data-source" => "BatchProcessingDS") ]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => [ "jboss.driver-demander.java:jboss/datasources/BatchProcessingDS is missing [jboss.jdbc-driver.postgresql93_jar]", "jboss.data-source.java:jboss/datasources/BatchProcessingDS is missing [jboss.jdbc-driver.postgresql93_jar]", "jboss.data-source.java:jboss/datasources/BatchProcessingDS is missing [jboss.jdbc-driver.postgresql93_jar]" ]}
From reading the log, it looks to me like some sort of circular dependency problem: the JDBC driver won't start because there is a dependency on the datasource, but the datasource won't start because it has a dependency on the JDBC driver.
This doesn't seem to happen when the JDBC driver is deployed as a module, only as a deployment.