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

NPE when non-existent attribute name is used for list-add operation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.1.0.DR9
    • 7.1.0.DR8
    • Management
    • None
    • Hide
      1. unzip EAP
      2. ./bin/standalone.sh
      3. ./bin/jboss-cli.sh -c
      4. e.g.: /subsystem=undertow/server=default-server/https-listener=https:list-add(name=non-existent)
      5. see NPE log in server.log
      Show
      unzip EAP ./bin/standalone.sh ./bin/jboss-cli.sh -c e.g.: /subsystem=undertow/server=default-server/https-listener=https:list-add(name=non-existent) see NPE log in server.log

      When I use non-existent attribute name for 'list-add' operation, I get following NPE in server.log:

      12:44:24,150 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 10) WFLYCTL0013: Operation ("list-add") failed - address: ([
          ("subsystem" => "undertow"),
          ("server" => "default-server"),
          ("https-listener" => "https")
      ]): java.lang.NullPointerException
      	at org.jboss.as.controller.operations.global.AbstractCollectionHandler.execute(AbstractCollectionHandler.java:92)
      	at org.jboss.as.controller.operations.global.ListOperations$ListAddHandler.execute(ListOperations.java:108)
      	at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:921)
      	at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:664)
      	at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:383)
      	at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1364)
      	at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:416)
      	at org.jboss.as.controller.ModelControllerImpl.lambda$execute$1(ModelControllerImpl.java:237)
      	at org.wildfly.security.auth.client.PeerIdentity.runAsAll(PeerIdentity.java:431)
      	at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:206)
      	at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:237)
      	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:217)
      	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.access$400(ModelControllerClientOperationHandler.java:137)
      	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:161)
      	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:157)
      	at org.wildfly.security.auth.client.PeerIdentity.runAsAll(PeerIdentity.java:464)
      	at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:225)
      	at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:185)
      	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:157)
      	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)
      

      Yeah - I understand that it is my fault that I provided bad command. But still, server should not respond with NPE. Ideally it should told me that provided list attribute does not exist for particular element and should finish operation with error.

              chaowan@redhat.com Chao Wang
              jstourac@redhat.com Jan Stourac
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: