[jboss-jira] [JBoss JIRA] (WFLY-4671) Cannot start JDBC storage for Batch subsystem with the Driver in a deployment

Jan Martiska (JIRA) issues at jboss.org
Mon May 25 07:06:19 EDT 2015


Jan Martiska created WFLY-4671:
----------------------------------

             Summary: Cannot start JDBC storage for Batch subsystem with the Driver in a deployment
                 Key: WFLY-4671
                 URL: https://issues.jboss.org/browse/WFLY-4671
             Project: WildFly
          Issue Type: Bug
          Components: Batch
    Affects Versions: 9.0.0.CR1
            Reporter: Jan Martiska
            Assignee: James Perkins
            Priority: Critical


Steps to reproduce:
{noformat}
- 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
{noformat}

The reload fails with:
{noformat}
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]"
]}
{noformat}


>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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the jboss-jira mailing list