Bug 1494329 - [GSS](6.4.z) NullPointerException during JMX query on undeployed application
Summary: [GSS](6.4.z) NullPointerException during JMX query on undeployed application
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web, JMX
Version: 6.4.16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: CR1
: EAP 6.4.20
Assignee: Lin Gao
QA Contact: Michael Cada
URL:
Whiteboard:
Depends On:
Blocks: eap6420-payload
TreeView+ depends on / blocked
 
Reported: 2017-09-22 04:19 UTC by shailendra kumar singh
Modified: 2021-06-10 13:05 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-08-19 12:41:10 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
MBean Clients (1.32 KB, text/plain)
2017-09-22 04:19 UTC, shailendra kumar singh
no flags Details
sampleAppV1 (7.74 KB, application/zip)
2017-09-22 04:20 UTC, shailendra kumar singh
no flags Details
sampleAppV2 (7.79 KB, application/zip)
2017-09-22 04:20 UTC, shailendra kumar singh
no flags Details

Description shailendra kumar singh 2017-09-22 04:19:28 UTC
Created attachment 1329339 [details]
MBean Clients

Description of problem:

NullPointerException during JMX query on undeployed application

Below exception is thrown:-
~~~~~~~
00:26:03,439 ERROR [org.jboss.as.controller.management-operation] (pool-1-thread-1) JBAS014612: Operation ("read-attribute") failed - address: ([
    ("deployment" => "jboss-helloworld-1.0.war"),
    ("subsystem" => "web")
]): java.lang.NullPointerException
	at org.jboss.as.web.WebDeploymentDefinition$SessionManagerStatsHandler.executeRuntimeStep(WebDeploymentDefinition.java:107)
	at org.jboss.as.controller.AbstractRuntimeOnlyHandler$1.execute(AbstractRuntimeOnlyHandler.java:89) [jboss-as-controller-7.5.16.Final-redhat-SNAPSHOT.jar:7.5.16.Final-redhat-SNAPSHOT]
	at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:710) [jboss-as-controller-7.5.16.Final-redhat-SNAPSHOT.jar:7.5.16.Final-redhat-SNAPSHOT]
	at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:545) [jboss-as-controller-7.5.16.Final-redhat-SNAPSHOT.jar:7.5.16.Final-redhat-SNAPSHOT]
	at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:338) [jboss-as-controller-7.5.16.Final-redhat-SNAPSHOT.jar:7.5.16.Final-redhat-SNAPSHOT]
	at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:314) [jboss-as-controller-7.5.16.Final-redhat-SNAPSHOT.jar:7.5.16.Final-redhat-SNAPSHOT]
	at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1152) [jboss-as-controller-7.5.16.Final-redhat-SNAPSHOT.jar:7.5.16.Final-redhat-SNAPSHOT]
	at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:335) [jboss-as-controller-7.5.16.Final-redhat-SNAPSHOT.jar:7.5.16.Final-redhat-SNAPSHOT]
	at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:191) [jboss-as-controller-7.5.16.Final-redhat-SNAPSHOT.jar:7.5.16.Final-redhat-SNAPSHOT]
	at org.jboss.as.jmx.model.ModelControllerMBeanHelper.execute(ModelControllerMBeanHelper.java:529)
	at org.jboss.as.jmx.model.ModelControllerMBeanHelper.getAttribute(ModelControllerMBeanHelper.java:306)
	at org.jboss.as.jmx.model.ModelControllerMBeanHelper.getAttribute(ModelControllerMBeanHelper.java:267)
	at org.jboss.as.jmx.model.ModelControllerMBeanServerPlugin.getAttribute(ModelControllerMBeanServerPlugin.java:130)
	at org.jboss.as.jmx.PluggableMBeanServerImpl.getAttribute(PluggableMBeanServerImpl.java:356)
	at org.jboss.as.jmx.BlockingNotificationMBeanServer.getAttribute(BlockingNotificationMBeanServer.java:148)
	at org.jboss.remotingjmx.protocol.v2.ServerProxy$GetAttributeHandler.handle(ServerProxy.java:691)
	at org.jboss.remotingjmx.protocol.v2.ServerCommon$MessageReciever$1$1.run(ServerCommon.java:153)
	at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor$1.run(ServerInterceptorFactory.java:75)
	at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor$1.run(ServerInterceptorFactory.java:70)
~~~~~~~~~~~



Steps to reproduce

1) Start a JBoss EAP 6.4 instance with standalone.sh

2) Run the following CLI commands:
/subsystem=deployment-scanner/scanner=default:write-attribute(name=scan-interval, value=0)
/subsystem=deployment-scanner/scanner=default:write-attribute(name=scan-enabled, value=false)

3) Copy jboss-helloworld-1.0.war to $JBOSS_HOME/standalone/deployments

4) Run the CLI command: /subsystem=deployment-scanner/scanner=default:write-attribute(name=scan-enabled, value=true)

5) Application deploys successfully. Verify with MBeanClient.java, it will succeed.

6) Run the CLI command: /subsystem=deployment-scanner/scanner=default:write-attribute(name=scan-enabled, value=false)

7) Delete the file $JBOSS_HOME/standalone/deployments/jboss-helloworld-1.0.war

8) Copy jboss-helloworld-2.0.war to $JBOSS_HOME/standalone/deployments. Version 2.0 has a dependency on a static module that does not exist

9) Run the CLI command: /subsystem=deployment-scanner/scanner=default:write-attribute(name=scan-enabled, value=true)

10) JBoss begins to undeploy version 1.0, and deploy version 2.0. Deployment of version 2.0 fails due to a missing module dependency. Deployment of version 2.0 rolls back. When deployment of version 2.0 fails, the undeploy of 1.0 tries to roll back. But since the war file was removed, the roll back of 1.0 fails and leaves the deployment in a bad state.

11) MBeanClient.java. It fails and a NullPointerException is generated on the server.


Expected behaviour:-

JBoss should not throw a NullPointerException. It should throw an informational exception such as javax.management.AttributeNotFoundException or similar.

Comment 1 shailendra kumar singh 2017-09-22 04:20:18 UTC
Created attachment 1329340 [details]
sampleAppV1

Comment 2 shailendra kumar singh 2017-09-22 04:20:46 UTC
Created attachment 1329341 [details]
sampleAppV2

Comment 14 Jiří Bílek 2018-04-27 12:00:25 UTC
Regression tests passed
Verified with EAP 6.4.20.CP.CR1


Note You need to log in before you can comment on or make changes to this bug.