[infinispan-issues] [JBoss JIRA] (ISPN-11884) Exceptions when getting various attributes from a registered MBean
David Maplesden (Jira)
issues at jboss.org
Thu May 21 21:33:20 EDT 2020
David Maplesden created ISPN-11884:
--------------------------------------
Summary: Exceptions when getting various attributes from a registered MBean
Key: ISPN-11884
URL: https://issues.redhat.com/browse/ISPN-11884
Project: Infinispan
Issue Type: Bug
Components: JMX, reporting and management
Affects Versions: 10.1.8.Final
Reporter: David Maplesden
When trying to inspect some of the monitoring and reporting statistics exposed by infinispan via JMX we are getting an error retrieving some of the attributes.
The only objects we are getting errors from are of type {{org.infinispan.interceptors.impl.CacheMgmtInterceptor}}
The attributes:
* hitTimes
* missTimes
* storeTimes
* removeTimes
cause {{NullPointerException}} and the attribute
* statisticsEnabled
causes {{java.lang.IllegalArgumentException: wrong number of arguments}}
Debugging the issue it looks to me like the problem is with the way {{ResourceDMBean}} is discovering the getters for these attributes. For the first 4 attributes there are setters but no getter methods, so no method is found and we get the NPE. For the last attribute the code in {{ReflectionUtil.findGetterForFieldUsingReflection()}} just looks for a method with the correct name without checking the number of arguments, so it is finding the {{org.infinispan.interceptors.impl.CacheMgmtInterceptor.getStatisticsEnabled(FlagAffectedCommand)}} method instead of the {{org.infinispan.interceptors.impl.JmxStatsCommandInterceptor.getStatisticsEnabled()}} from the superclass.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
More information about the infinispan-issues
mailing list