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

Exceptions when getting various attributes from a registered MBean

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 10.1.8.Final
    • None

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            dmap001 David Maplesden (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: