[jboss-jira] [JBoss JIRA] (AS7-5558) More useful error messages when management operations can't be found

Brian Stansberry (JIRA) jira-events at lists.jboss.org
Mon Dec 3 18:31:21 EST 2012


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

Brian Stansberry commented on AS7-5558:
---------------------------------------

For a non-existent resource, it should say

JBAS......: No resource exists at address [
      ("subsystem" => "datasources"),
      ("data-source" => "Postgres-XA-DS")
] 

If the address is valid but the operation name is bogus, the error message should be:

JBAS....: No operation named "enabled" exists at address[
      ("subsystem" => "datasources"),
      ("xa-data-source" => "Postgres-XA-DS")
]

The existing JBAS010850: No handler for operation read-resource at address should be left as is and new messages added. That will prevent any kbase articles that detail the current ambiguous behavior getting confused with those that describe the new precise behavior.

                
> More useful error messages when management operations can't be found
> --------------------------------------------------------------------
>
>                 Key: AS7-5558
>                 URL: https://issues.jboss.org/browse/AS7-5558
>             Project: Application Server 7
>          Issue Type: Enhancement
>          Components: Domain Management
>            Reporter: Brian Stansberry
>             Fix For: 7.2.0.CR1
>
>
> When the ModelController attempts to find the OperationStepHandler for a given operation + address, it needs to handle failure more intelligently. Instead of providing a one-size fits all exception, it should try to determine why the OSH couldn't be found and tailor the exception accordingly. Specifically, clarify whether the problem is the address is invalid or the operation name is invalid, and if it's the address that's invalid, clarify the point in the resource tree where the address goes wrong.
> For example, a user attempting to administer a server that has already been shut down gets this fairly useless exception:
> Error loading VM metrics
> Unexpected HTTP response: 500
> Request
> {
>     "operation" => "composite",
>     "address" => [],
>     "steps" => [
>         {
>             "address" => [
>                 ("host" => "master"),
>                 ("server" => "server-one"),
>                 ("core-service" => "platform-mbean"),
>                 ("type" => "memory")
>             ],
>             "operation" => "read-resource",
>             "include-runtime" => true
>         },
>         {
>             "address" => [
>                 ("host" => "master"),
>                 ("server" => "server-one"),
>                 ("core-service" => "platform-mbean"),
>                 ("type" => "threading")
>             ],
>             "operation" => "read-resource",
>             "include-runtime" => true
>         },
>         {
>             "address" => [
>                 ("host" => "master"),
>                 ("server" => "server-one"),
>                 ("core-service" => "platform-mbean"),
>                 ("type" => "runtime")
>             ],
>             "operation" => "read-resource",
>             "include-runtime" => true
>         },
>         {
>             "address" => [
>                 ("host" => "master"),
>                 ("server" => "server-one"),
>                 ("core-service" => "platform-mbean"),
>                 ("type" => "operating-system")
>             ],
>             "operation" => "read-resource",
>             "include-runtime" => true
>         }
>     ]
> }
> Response
> Internal Server Error
> {
>     "outcome" => "failed",
>     "failure-description" => "JBAS010850: No handler for operation read-resource at address [
>     (\"host\" => \"master\"),
>     (\"server\" => \"server-one\"),
>     (\"core-service\" => \"platform-mbean\"),
>     (\"type\" => \"memory\")
> ]",
>     "rolled-back" => true
> }
> The reality is no resource exists at address /host=master/server=server-one. The failure message should emphasize this fact.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list