jbossas / jboss-as-maven-plugin

Maven plugin to deploy applications to JBoss AS 7 (moved to https://github.com/wildfly/wildfly-maven-plugin)
74 stars 69 forks source link

Impossible to remove a failed deployment #29

Closed silver06 closed 11 years ago

silver06 commented 11 years ago

Hi,

When using the jboss-as-maven-plugin in either v7.1.1.Final or v7.3.Final, when a deployment has some issues (in my case a listener referenced in web.xml that doesn't exist in the classpath), it becomes impossible to remove this component from the admin console (I'm using the managed domain operating mode) This component appears as enabled and is installed on my targeted server-group The only way is to call the goal undeploy from this plugin.

Log when the deployment occurs (module is unregistered):

[Server:test-server-one-group1] 14:15:04,271 INFO [org.jboss.as.server](host-controller-connection-threads - 4) JBAS015870: Deploy of deployment "mywebapp.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.web.deployment.default-host./mywebapp" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./mywebapp: JBAS018040: Failed to start context"},"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.deployment.unit.\"mywebapp.war\".jboss.security.jacc Missing[JBAS014861: ]"]} [Server:test-server-one-group1] 14:15:04,273 INFO [org.jboss.as.osgi](MSC service thread 1-5) JBAS011908: Unregister module: Module "deployment.mywebapp.war:main" from Service Module Loader [Server:test-server-one-group1] 14:15:04,302 INFO [org.jboss.as.server.deployment](MSC service thread 1-7) JBAS015877: Stopped deployment mywebapp.war in 32ms

Log when I try to undeploy the module from the admin console (module is said 'not found'):

Failed to remove mywebapp.war from main-server-group.

Unexpected HTTP response: 500

Request { "address" => [ ("server-group" => "main-server-group"), ("deployment" => "mywebapp.war") ], "operation" => "remove" }

Response

Internal Server Error { "outcome" => "failed", "result" => undefined, "failure-description" => "JBAS010839: Operation failed or was rolled back on all servers.", "rolled-back" => true, "server-groups" => {"main-server-group" => {"host" => {"int03master" => {"test-server-one-group1" => {"response" => { "outcome" => "failed", "result" => undefined, "failure-description" => "JBAS014807: Management resource '[(\"deployment\" => \"mywebapp.war\")]' not found", "response-headers" => {"process-state" => "restart-required"}, "rolled-back" => true }}}}}} }

Do you know what could be done to be able to remove it from the admin console ? For me either the plugin should remove the component from the server-group or at least disable it

jamezp commented 11 years ago

Created a JIRA issue for this https://issues.jboss.org/browse/JBASMP-35. Closing this one in favor of using JIRA. If there is any way you could supply an example application that would be great. I've struggled in the past to get deployments that fail :-)