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

JConsole get NPE if TMP directory doesn't exist

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 5.0
    • tools
    • x86
    • windows_xp

      FULL PRODUCT VERSION :
      java version "1.5.0_10"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)
      Java HotSpot(TM) Client VM (build 1.5.0_10-b03, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      If you set the TMP environment variable to point to a non existing directory, jconsole will throw a NPE whenever it needs to show available VMs.
      Tested with both 1.5.0_10 and 1.5.0_06

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      On windows
      set TMP=c:\doesNotExist
      jconsole

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      An error message would be nice, or at least being able to show the Local/Remote vm dialog.
      ACTUAL -
      The dialog is never shown, instead you get a stackTrace

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
              at sun.jvmstat.perfdata.monitor.protocol.local.LocalVmManager.activeVms(LocalVmManager.java:127)
              at sun.jvmstat.perfdata.monitor.protocol.local.MonitoredHostProvider.activeVms(MonitoredHostProvider.java:133)
              at sun.tools.jconsole.ConnectDialog$ManagedVmTableModel.getManagedVirtualMachines(ConnectDialog.java:528)
              at sun.tools.jconsole.ConnectDialog$ManagedVmTableModel.refresh(ConnectDialog.java:511)
              at sun.tools.jconsole.ConnectDialog$ManagedVmTableModel.<init>(ConnectDialog.java:502)
              at sun.tools.jconsole.ConnectDialog.<init>(ConnectDialog.java:139)
              at sun.tools.jconsole.JConsole.showConnectDialog(JConsole.java:571)
              at sun.tools.jconsole.JConsole.access$100(JConsole.java:34)
              at sun.tools.jconsole.JConsole$4.run(JConsole.java:702)
              at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
              at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

      REPRODUCIBILITY :
      This bug can be reproduced always.

            lmalvent Luis-Miguel Alventosa (Inactive)
            lmalvent Luis-Miguel Alventosa (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: