[jboss-jira] [JBoss JIRA] (WFLY-3512) Removing a data-source that is used by a deployment breaks the deployment
Jeff Mesnil (JIRA)
issues at jboss.org
Tue Jun 17 05:40:24 EDT 2014
[ https://issues.jboss.org/browse/WFLY-3512?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jeff Mesnil updated WFLY-3512:
------------------------------
Summary: Removing a data-source that is used by a deployment breaks the deployment (was: Removing a data-source that is used by a web application )
> Removing a data-source that is used by a deployment breaks the deployment
> -------------------------------------------------------------------------
>
> Key: WFLY-3512
> URL: https://issues.jboss.org/browse/WFLY-3512
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: JCA
> Affects Versions: 8.1.0.Final
> Reporter: Jeff Mesnil
> Assignee: Jesper Pedersen
>
> Use case: a Web app which depends on a data-source resource configured in the datasources subsystem (and *not* in the deployment)
> I used the bmp quickstart and move the datasource-definition from the -ds.xml file to the standalone-full.xml configuration file.
> 1. Start the server
> {noformat}
> 11:31:38,279 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-9) WFLYJCA0001: Bound data source [java:jboss/datasources/BMTQuickstartDS]
> {noformat}
> 1. Deploy the web app
> {noformat}
> 11:32:33,664 INFO [org.jboss.as.server.deployment] (MSC service thread 1-16) WFLYSRV0027: Starting deployment of "wildfly-bmt.war" (runtime-name: "wildfly-bmt.war")
> ...
> 11:32:35,976 INFO [org.wildfly.extension.undertow] (MSC service thread 1-4) WFLYUT0021: Registered web context: /wildfly-bmt
> 11:32:36,020 INFO [org.jboss.as.server] (management-handler-thread - 1) WFLYSRV0010: Deployed "wildfly-bmt.war" (runtime-name : "wildfly-bmt.war")
> {noformat}
> 2. check the web app works
> 3. Remove the data-source from the CLI
> {noformat}
> [standalone at localhost:9990 /] /subsystem=datasources/data-source=bmt-quickstart:remove
> {
> "outcome" => "failed",
> "failure-description" => "WFLYCTL0171: Removing services has lead to unsatisfied dependencies:
> Service jboss.naming.context.java.jboss.datasources.BMTQuickstartDS was depended upon by service jboss.persistenceunit.\"wildfly-bmt.war#primary\".__FIRST_PHASE__",
> "rolled-back" => true
> }
> {noformat}
> => the operation failed.
> but the web context has been unregistered by the server:
> {noformat}
> 11:33:33,345 INFO [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0022: Unregistered web context: /wildfly-bmt
> 11:33:33,354 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 71) WFLYJPA0011: Stopping Persistence Unit (phase 2 of 2) Service 'wildfly-bmt.war#primary'
> 11:33:33,355 INFO [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 71) HHH000227: Running hbm2ddl schema export
> 11:33:33,356 INFO [stdout] (ServerService Thread Pool -- 71) Hibernate: drop table BMT_KVPair if exists
> 11:33:33,358 INFO [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 71) HHH000230: Schema export complete
> 11:33:33,360 INFO [org.jboss.weld.deployer] (MSC service thread 1-5) WFLYWELD0010: Stopping weld service for deployment wildfly-bmt.war
> 11:33:33,378 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 71) WFLYJPA0011: Stopping Persistence Unit (phase 1 of 2) Service 'wildfly-bmt.war#primary'
> 11:33:33,379 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-11) WFLYJCA0010: Unbound data source [java:jboss/datasources/BMTQuickstartDS]
> 11:33:33,383 INFO [org.jboss.as.controller] (management-handler-thread - 1) WFLYCTL0183: Service status report
> WFLYCTL0184: New missing/unsatisfied dependencies:
> service jboss.naming.context.java.jboss.datasources.BMTQuickstartDS (missing) dependents: [service jboss.persistenceunit."wildfly-bmt.war#primary".__FIRST_PHASE__]
> {noformat}
> and the web app no longer works (it returns a 404 error).
> At this point, the data-source resource is still present but its corresponding JNDI binding is not. If I try to redeploy the web app it fails:
> {noformat}
> 11:35:48,736 INFO [org.jboss.as.repository] (management-handler-thread - 1) WFLYDR0001: Content added at location /Users/jmesnil/Developer/wildfly/dist/target/wildfly-9.0.0.Alpha1-SNAPSHOT/standalone/data/content/ff/2df0dc4b7d9d1e04a88448deba520c2b714b8b/content
> 11:35:48,748 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0028: Stopped deployment wildfly-bmt.war (runtime-name: wildfly-bmt.war) in 9ms
> 11:35:48,749 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0027: Starting deployment of "wildfly-bmt.war" (runtime-name: "wildfly-bmt.war")
> 11:35:48,775 INFO [org.jboss.as.jpa] (MSC service thread 1-6) WFLYJPA0002: Read persistence.xml for primary
> 11:35:48,786 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0028: Stopped deployment wildfly-bmt.war (runtime-name: wildfly-bmt.war) in 36ms
> 11:35:48,787 INFO [org.jboss.as.server.deployment] (MSC service thread 1-16) WFLYSRV0027: Starting deployment of "wildfly-bmt.war" (runtime-name: "wildfly-bmt.war")
> 11:35:48,815 INFO [org.jboss.as.jpa] (MSC service thread 1-13) WFLYJPA0002: Read persistence.xml for primary
> 11:35:48,829 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("redeploy") failed - address: ([("deployment" => "wildfly-bmt.war")]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"wildfly-bmt.war#primary\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jboss.datasources.BMTQuickstartDS]"]}
> 11:35:48,830 ERROR [org.jboss.as.server] (management-handler-thread - 1) WFLYSRV0011: Redeploy of deployment "wildfly-bmt.war" was rolled back with the following failure message: {"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"wildfly-bmt.war#primary\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jboss.datasources.BMTQuickstartDS]"]}
> 11:35:48,835 INFO [org.jboss.as.server.deployment] (MSC service thread 1-11) WFLYSRV0028: Stopped deployment wildfly-bmt.war (runtime-name: wildfly-bmt.war) in 4ms
> 11:35:48,836 INFO [org.jboss.as.controller] (management-handler-thread - 1) WFLYCTL0183: Service status report
> WFLYCTL0184: New missing/unsatisfied dependencies:
> service jboss.persistenceunit."wildfly-bmt.war#primary".__FIRST_PHASE__ (missing) dependents: [service jboss.deployment.unit."wildfly-bmt.war".POST_MODULE]
> 11:35:48,836 INFO [org.jboss.as.repository] (management-handler-thread - 1) WFLYDR0002: Content removed from location /Users/jmesnil/Developer/wildfly/dist/target/wildfly-9.0.0.Alpha1-SNAPSHOT/standalone/data/content/ff/2df0dc4b7d9d1e04a88448deba520c2b714b8b/content
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
More information about the jboss-jira
mailing list