]
RH Bugzilla Integration commented on WFLY-8458:
-----------------------------------------------
Radovan STANCEL <rstancel(a)redhat.com> changed the Status of [bug
NPE when MBean does not have no-arg constructor
-----------------------------------------------
Key: WFLY-8458
URL:
https://issues.jboss.org/browse/WFLY-8458
Project: WildFly
Issue Type: Bug
Components: JMX, Server
Affects Versions: 11.0.0.Alpha1
Reporter: Chao Wang
Assignee: Chao Wang
Fix For: 11.0.0.Beta1
NPE when MBean does not have no-arg constructor, it should log an error message
indicating the issue rather than NPE
{code}
15:05:48,605 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001:
Failed to start service
jboss.deployment.unit."jboss-helloworld-dynamicmbean-helloworld-mbean-service.sar".INSTALL:
org.jboss.msc.service.StartException in service
jboss.deployment.unit."jboss-helloworld-dynamicmbean-helloworld-mbean-service.sar".INSTALL:
WFLYSRV0153: Failed to process phase INSTALL of deployment
"jboss-helloworld-dynamicmbean-helloworld-mbean-service.sar"
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:172)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
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)
Caused by: java.lang.IllegalArgumentException: WFLYSAR0004: Class not instantiated
at org.jboss.as.service.ReflectionUtils.newInstance(ReflectionUtils.java:133)
at
org.jboss.as.service.ParsedServiceDeploymentProcessor.newInstance(ParsedServiceDeploymentProcessor.java:283)
at
org.jboss.as.service.ParsedServiceDeploymentProcessor.addServices(ParsedServiceDeploymentProcessor.java:129)
at
org.jboss.as.service.ParsedServiceDeploymentProcessor.deploy(ParsedServiceDeploymentProcessor.java:118)
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:165)
... 5 more
Caused by: java.lang.NullPointerException
at org.jboss.as.service.ReflectionUtils.newInstance(ReflectionUtils.java:131)
... 9 more
{code}