Uploaded image for project: 'XWiki Commons'
  1. XWiki Commons
  2. XCOMMONS-2188

NPE when interacting with the Infinispan Statistics component via JMX

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 12.10
    • Fix Version/s: 13.3-rc-1, 12.10.7
    • Component/s: Cache
    • Labels:
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      A NullPointerException is thrown when trying to access the numberOfEntries property or any other one of the Statistics component via JMX.

      Steps to reproduce (taken from ADMINTOOL-76):

      {{groovy}}
      import java.lang.management.ManagementFactory;
      import javax.management.MBeanServer;
      import javax.management.ObjectName;
      
      def MBeanServer server = ManagementFactory.getPlatformMBeanServer()
      def query = new ObjectName("org.xwiki.infinispan:component=Statistics,*")
      def names = server.queryNames(query, null)
      names.each {
        def mbean = new GroovyMBean(server, it)
        def name = it.getKeyProperty('name')
        println "* ${name}: size: ${mbean.getProperty("numberOfEntries")}"
      }
      {{/groovy}}
      

      Result: a NPE is thrown

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              slauriere slauriere
              Reporter:
              slauriere slauriere
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response: