Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5001857

JSR003: queryNames throws NPE when an unregisterMBean runs concurrently

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 1.2.2
    • Fix Version/s: 5.0
    • Component/s: core-svc
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b46
    • CPU:
      unknown
    • OS:
      generic
    • Verification:
      Verified

      Description

      That bug has been found by using the cascading service of Java DMK but is JMX specific.
      The second queryNames() call gives a NPE with the following scenario.
      Cascaded MBS is in another JVM, connector is JMXMP.

      Test scenario:

      cascadingService.start()
      connector.createMBean(totoClass, totoName)
      cascadingMBS.queryNames(null, null)
      connector.unregisterMBean(totoName)
      cascadingMBS.queryNames(null, null)

      The stack:

      java.lang.NullPointerException
          at javax.management.ObjectInstance.hashCode(ObjectInstance.java:99)
          at java.util.HashMap.hash(HashMap.java:261)
          at java.util.HashMap.put(HashMap.java:379)
          at java.util.HashSet.add(HashSet.java:192)
          at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.filterListOfObjects(DefaultMBeanServerInterceptor.java:1501)
          at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.queryMBeansImpl(DefaultMBeanServerInterceptor.java:490)
          at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.queryNames(DefaultMBeanServerInterceptor.java:533)
          at com.sun.jmx.mbeanserver.JmxMBeanServer.queryNames(JmxMBeanServer.java:600)
          at javasoft.sqe.jmx.test.cascading.CascadingTest.run(CascadingTest.java:69)
          at javasoft.sqe.jmx.share.TestStarter.<init>(TestStarter.java:40)
          at javasoft.sqe.jmx.share.TestStarter.main(TestStarter.java:98)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dfuchs Daniel Fuchs
              Reporter:
              yjoan Yves Joan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: