Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-11884

Exceptions when getting various attributes from a registered MBean

    Details

      Description

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                dmap001 David Maplesden
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: