[jboss-jira] [JBoss JIRA] (WFCORE-500) domain mode: remove a path entry from a server instance fails
Tom Fonteyne (JIRA)
issues at jboss.org
Tue Jan 13 08:12:49 EST 2015
[ https://issues.jboss.org/browse/WFCORE-500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13032113#comment-13032113 ]
Tom Fonteyne commented on WFCORE-500:
-------------------------------------
Debugging showed this:
/host=master/server-config=i1/path=foo.bar:add(path="/tmp")
org.jboss.as.controller.services.path: PathAddHandler.java
public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException {
final ModelNode model = resource.getModel();
PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR));
final String name = address.getLastElement().getValue();
pathAttribute.validateAndSet(operation, model);
RELATIVE_TO.validateAndSet(operation, model);
if (services) {
validateAndSet adds the path to the server, and "services==false" ==> all fine
---------------------------------------------------------------
/host=master/server-config=i1/path=foo.bar:remove
org.jboss.as.controller.services.path: PathRemoveHandler.aja
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
final PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR));
final String name = address.getLastElement().getValue();
final ModelNode model = Resource.Tools.readModel(context.readResource(PathAddress.EMPTY_ADDRESS));
if (model.get(READ_ONLY.getName()).asBoolean(false)) {
throw ControllerMessages.MESSAGES.cannotRemoveReadOnlyPath(name);
}
context.removeResource(PathAddress.EMPTY_ADDRESS);
if (services) {
context.removeResource removed the path, BUT "services==true" ... which ends up looking for the path in the pathEntries of the domain controller and fails to find it... obvious as it was never there.
> domain mode: remove a path entry from a server instance fails
> -------------------------------------------------------------
>
> Key: WFCORE-500
> URL: https://issues.jboss.org/browse/WFCORE-500
> Project: WildFly Core
> Issue Type: Bug
> Components: Domain Management
> Affects Versions: 1.0.0.Alpha15
> Environment: Wildfly master build 2015-01-13
> Reporter: Tom Fonteyne
> Assignee: Brian Stansberry
>
> Adding a "path" to a "server-config" in domain mode (works fine) and then remove it again results in a NullPointerException
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
More information about the jboss-jira
mailing list