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

NullPointerException when invoking JMX operation with debug logging enabled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 6.0.0.Alpha3
    • 6.0.0.Alpha2
    • None
    • None
    • Hide

      Enable debug logging on an Infinispan instance, connect to that instance using the CLI client, and try to select a cache.

      Show
      Enable debug logging on an Infinispan instance, connect to that instance using the CLI client, and try to select a cache.
    • Hide

      Turn off debug logging for ResourceDMBean in logback.xml:

      <logger name="org.infinispan.jmx.ResourceDMBean" level="INFO"/>

      Show
      Turn off debug logging for ResourceDMBean in logback.xml: <logger name="org.infinispan.jmx.ResourceDMBean" level="INFO"/>

    Description

      When the CLI client runs the "cache ___defaultcache" command to select a cache, the first things that happens is that the "createSessionId" call is invoked via JMX on the server.

      When the command is run for the first time, there is no previously selected cache. Therefore, the "active cache" parameter for the "createSessionId" command is null.

      On the server side, in ResourceDMBean.invoke(), there is a debug log message that would log the class of the arguments received using args[i].getClass(). As args[i] is null for the "active cache" parameter, the call fails with a NullPointerException.

      As a result, it is not possible to select a cache with the CLI client when debug logging is enabled in ResourceDMBean.

      I have created a very small pull request for this on GitHub.

      Attachments

        Activity

          People

            mircea.markus Mircea Markus (Inactive)
            fstab_jira Fabian Stäber (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: