[jboss-jira] [JBoss JIRA] (WFLY-9450) NPE on jaxrs subsystem of FAILED deployment

Brian Stansberry (JIRA) issues at jboss.org
Tue Oct 17 15:54:00 EDT 2017


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

Brian Stansberry commented on WFLY-9450:
----------------------------------------

DeploymentRestResourcesDefintion needs to check that deploymentService is not null.

[~claudio4j] The EJB3 component issue would be a separate issue. TBH I'm not sure it's really a bug though. HAL should not be trying to recursively read the subsystem child resources for FAILED deployments. A FAILED deployment is basically in a broken state so the runtime services underneath it often are not present. The EJB3 resource is correctly reporting that it can't find the services it needs to respond to the management request.

Perhaps the kernel could find a way to hide the child resources of a deployment if it's not DeploymentStatus.OK, but that's not simple to do. It also -might- break someone if they had figured out some way to usefully read child resources of a failed deployment, e.g. to analyze something. I think that's a corner case though.

> NPE on jaxrs subsystem of FAILED deployment 
> --------------------------------------------
>
>                 Key: WFLY-9450
>                 URL: https://issues.jboss.org/browse/WFLY-9450
>             Project: WildFly
>          Issue Type: Bug
>          Components: REST
>            Reporter: Claudio Miranda
>            Assignee: Alessio Soldano
>
> read deployment resources of a server, where one deployment is in failed status, throws a NPE and doesn't return the list of deployed applications.
> To reproduce, get the kitchensink from quickstarts, change the persistence.xml to point to ExampleDS datasource, deploy and assign to main-server-group. Then disable ExampleDS, restart server-one.
> Run the following command:
> {code}
> /host=master/server=server-one:read-children-resources(child-type=deployment,include-runtime,recursive)
> {code}
> The exception in server.log
> {code}
> 2017-10-17 17:08:02,778 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 32) WFLYCTL0013: Operation ("read-attribute") failed - address: ([
>     ("deployment" => "kitchensink.war"),
>     ("subsystem" => "jaxrs"),
>     ("rest-resource" => "org.jboss.as.quickstarts.kitchensink.rest.MemberResourceRESTService")
> ]): java.lang.NullPointerException
>         at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.getDeployment(UndertowDeploymentService.java:170)
>         at org.jboss.as.jaxrs.DeploymentRestResourcesDefintion$AbstractRestResReadHandler.execute(DeploymentRestResourcesDefintion.java:183)
>         at org.jboss.as.controller.operations.global.ReadAttributeHandler.doExecuteInternal(ReadAttributeHandler.java:172)
>         at org.jboss.as.controller.operations.global.ReadAttributeHandler.doExecute(ReadAttributeHandler.java:135)
>         at org.jboss.as.controller.operations.global.GlobalOperationHandlers$AbstractMultiTargetHandler.execute(GlobalOperationHandlers.java:231)
> {code}
> The CLI results doesn't display the error message
> {code}
> [domain at localhost:9990 /] /host=master/server=server-one:read-children-resources(child-type=deployment,include-runtime,recursive)
> {
>     "outcome" => "success",
>     "result" => undefined,
>     "failure-description" => undefined
> }
> {code}
> There is a similar problem while reading a specific deployment,
> {code}
> /host=master/server=server-one/deployment=kitchensink.war:read-children-resources(child-type=subsystem,recursive)
> {code}
> results in the following error in server.log
> {code}
> 2017-10-17 17:16:09,857 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 32) WFLYCTL0013: Operation ("read-attribute") failed - address: ([
>     ("deployment" => "kitchensink.war"),
>     ("subsystem" => "ejb3"),
>     ("stateless-session-bean" => "MemberRegistration")
> ]) - failure description: "WFLYEJB0370: EJB component for address [
>     (\"deployment\" => \"kitchensink.war\"),
>     (\"subsystem\" => \"ejb3\"),
>     (\"stateless-session-bean\" => \"MemberRegistration\")
> ] is in 
>  state DOWN, must be in state UP"
> {code}



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the jboss-jira mailing list