Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-5993

read-attribute on non existing logger under /deployment throws NPE

    XMLWordPrintable

Details

    • Bug
    • Status: Verified (View Workflow)
    • Minor
    • Resolution: Done
    • 7.1.0.DR4
    • 7.1.0.DR5
    • Logging
    • None

    Description

      [standalone@localhost:9990 /] /deployment=testwebapplication.war/subsystem=logging/configuration=default/logger=unknown:read-attribute(name=level
      {
          "outcome" => "failed",
          "result" => undefined,
          "failure-description" => "WFLYCTL0158: Operation handler failed: java.lang.NullPointerException",
          "rolled-back" => true
      }
      

      Output:

      17:11:30,742 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("read-attribute") failed - address: ([
          ("deployment" => "testwebapplication.war"),
          ("subsystem" => "logging"),
          ("configuration" => "default"),
          ("logger" => "unknown")
      ]): java.lang.NullPointerException
              at org.jboss.as.logging.deployments.resources.LoggerResourceDefinition$1.updateModel(LoggerResourceDefinition.java:77)
              at org.jboss.as.logging.deployments.resources.LoggerResourceDefinition$LoggerConfigurationReadStepHandler.updateModel(LoggerResourceDefinition.java:105)
              at org.jboss.as.logging.deployments.resources.LoggingConfigurationReadStepHandler.execute(LoggingConfigurationReadStepHandler.java:51)
              at org.jboss.as.controller.operations.global.ReadAttributeHandler.doExecuteInternal(ReadAttributeHandler.java:174)
              at org.jboss.as.controller.operations.global.ReadAttributeHandler.doExecute(ReadAttributeHandler.java:133)
              at org.jboss.as.controller.operations.global.GlobalOperationHandlers$AbstractMultiTargetHandler.execute(GlobalOperationHandlers.java:230)
              at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:951)
              at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:694)
              at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:389)
              at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1363)
              at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:410)
              at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:232)
              at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:213)
              at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.access$300(ModelControllerClientOperationHandler.java:136)
              at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:157)
              at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:153)
              at java.security.AccessController.doPrivileged(Native Method)
              at javax.security.auth.Subject.doAs(Subject.java:422)
              at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:149)
              at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:153)
              at org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$1.doExecute(ManagementRequestContextImpl.java:70)
              at org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$AsyncTaskRunner.run(ManagementRequestContextImpl.java:160)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:745)
              at org.jboss.threads.JBossThread.run(JBossThread.java:320)
      

      it should print some better error messsage, like:

      [standalone@localhost:9990 /] /subsystem=logging/logger=unknown:read-attribute(name=level
      {
          "outcome" => "failed",
          "failure-description" => "WFLYCTL0216: Management resource '[
          (\"subsystem\" => \"logging\"),
          (\"logger\" => \"unknown\")
      ]' not found",
          "rolled-back" => true
      }
      

      Attachments

        Issue Links

          Activity

            People

              jperkins-rhn James Perkins
              msimka@redhat.com Martin Simka
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: