[jboss-jira] [JBoss JIRA] (WFCORE-2021) "ls /socket-binding-group=*" should print proper error message

Chao Wang (JIRA) issues at jboss.org
Mon Nov 21 04:54:00 EST 2016


    [ https://issues.jboss.org/browse/WFCORE-2021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13325413#comment-13325413 ] 

Chao Wang commented on WFCORE-2021:
-----------------------------------

IllegalArgumentException is due to resource result conversion "resourceResult.asPropertyList();" fails in [LsHandler.java|https://github.com/wildfly/wildfly-core/blob/master/cli/src/main/java/org/jboss/as/cli/handlers/LsHandler.java]
result below can not and should not be convert to list: 
{noformat}
{
    "outcome" => "success",
    "result" => {
        "step-1" => {
            "outcome" => "success",
            "result" => [
                "local-destination-outbound-socket-binding",
                "remote-destination-outbound-socket-binding",
                "socket-binding"
            ]
        },
        "step-2" => {
            "outcome" => "success",
            "result" => [{
                "address" => [("socket-binding-group" => "standard-sockets")],
                "outcome" => "success",
                "result" => {
                    "default-interface" => "public",
                    "name" => "standard-sockets",
                    "port-offset" => expression "${jboss.socket.binding.port-offset:0}",
                    "local-destination-outbound-socket-binding" => undefined,
                    "remote-destination-outbound-socket-binding" => {"mail-smtp" => undefined},
                    "socket-binding" => {
                        "management-http" => undefined,
                        "management-https" => undefined,
                        "ajp" => undefined,
                        "http" => undefined,
                        "https" => undefined,
                        "txn-recovery-environment" => undefined,
                        "txn-status-manager" => undefined
                    }
                }
            }]
        }
    }
}
{noformat}

The error message can be more informative by providing command parameter.

But it's not like failure description of command: ls /subsystem=* . which fails due to _registry_ is null in [ReadChildrenTypesHandler.java|https://github.com/wildfly/wildfly-core/blob/master/controller/src/main/java/org/jboss/as/controller/operations/global/ReadChildrenTypesHandler.java] since there is no "concrete" resource inside that address.

> "ls /socket-binding-group=*" should print proper error message
> --------------------------------------------------------------
>
>                 Key: WFCORE-2021
>                 URL: https://issues.jboss.org/browse/WFCORE-2021
>             Project: WildFly Core
>          Issue Type: Bug
>          Components: CLI
>    Affects Versions: 3.0.0.Alpha12
>            Reporter: Chao Wang
>            Assignee: Chao Wang
>
> "ls /socket-binding-group=*" should print proper error message. Similar operation "ls /subsystem=*" print good error message.
> {noformat}
> [standalone at localhost:9990 /] ls /subsystem=*
> {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => "WFLYCTL0030: No resource definition is registered for address [(\"subsystem\" => \"*\")]"}}
> [standalone at localhost:9990 /] ls /socket-binding-group=*
> Exception for ls /socket-binding-group=*: java.lang.IllegalArgumentException
> [standalone at localhost:9990 /]
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list