Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-4140

Incorrect resource passed into ExtensionRegistry.remove by ExtensionAddHandler rollback handling

XMLWordPrintable

      ExtensionAddHandler rollback handling passes the extension resource to ExtensionRegistry.remove when the API wants the root resource. This results in this failure:

      2018-09-27 17:21:19,300 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0190: Step handler org.jboss.as.controller.extension.ExtensionAddHandler@4bdb1e35 for operation add at address [("extension" => "org.jboss.as.test.extension")] failed handling operation rollback -- java.lang.NullPointerException: java.lang.NullPointerException
      	at org.jboss.as.controller.extension.ExtensionRegistry.hasSubsystemsRegistered(ExtensionRegistry.java:372)
      	at org.jboss.as.controller.extension.ExtensionRegistry.removeExtension(ExtensionRegistry.java:342)
      	at org.jboss.as.controller.extension.ExtensionAddHandler$1.handleRollback(ExtensionAddHandler.java:97)
      	at org.jboss.as.controller.AbstractOperationContext$RollbackDelegatingResultHandler.handleResult(AbstractOperationContext.java:1561)
      	at org.jboss.as.controller.AbstractOperationContext$Step.invokeResultHandler(AbstractOperationContext.java:1533)
      	at org.jboss.as.controller.AbstractOperationContext$Step.handleResult(AbstractOperationContext.java:1515)
      	at org.jboss.as.controller.AbstractOperationContext$Step.finalizeInternal(AbstractOperationContext.java:1472)
      	at org.jboss.as.controller.AbstractOperationContext$Step.finalizeStep(AbstractOperationContext.java:1455)
      	at org.jboss.as.controller.AbstractOperationContext$Step.access$400(AbstractOperationContext.java:1319)
      	at org.jboss.as.controller.AbstractOperationContext.executeResultHandlerPhase(AbstractOperationContext.java:876)
      	at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:756)
      	at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:467)
      	at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1411)
      	at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:423)
      

      Also, ExtensionResource should not return null from getChildren. Fixing that would eliminate the NPE but the rollback handling wouldn't work properly with the wrong object being passed in.

              bstansbe@redhat.com Brian Stansberry
              bstansbe@redhat.com Brian Stansberry
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: