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

Exceptions when getting various attributes from a registered MBean

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • 10.1.8.Final
    • None

      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.

              Unassigned Unassigned
              dmap001 David Maplesden (Inactive)
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: