-
Bug
-
Resolution: Done
-
Major
-
None
-
None
Executing the full-replace-deployment operation on a domain deployment works correctly if it's a single operation (even in a composite operation). In a composite operation where an add operation is executed to add the deployment to a server-group(s) after the full-replace-deployment an NPE is thrown because the previous resource is null since it did not exist.
// WFCORE-495 remove and call context.addResource() as below to add new resource with updated PERSISTENT value final ModelNode deploymentModel = context.removeResource(PathAddress.pathAddress(deploymentPath)).getModel();
The context.removeResource() returns null since the deployment was not deployed on the server in the server-group.
From debugging it looks like the full composite operation is passed to each server in a server group. For obvious reasons if the add operation is done before the full-replace-deployment operation the composite operation is successful.
The easy workaround is just to ignore missing deployments in the org.jboss.as.server.deployment.DeploymentFullReplaceHandler OSH and log a debug or trace message indicating it was skipped because the deployment did not previously exist on the server. However this may need to be done at the HC operation routing level.
- is caused by
-
WFCORE-495 WFLY won't startup due to "WFLYCTL0212: Duplicate resource [(\"deployment\" => \"xxx.war\")]"
- Resolved
- is related to
-
JBEAP-5794 Unclear exception when trying to do full-replace-deployment operation with wrong name attribute value
- Verified