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

Fix for 6951661 broke VisualVM ability to find and connect to local VMs

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      generic, x86
    • OS:
      generic, windows_xp

      Description

      VisualVM in JDK7 starting from b97 does not display any local VMs.

      Short summary:

      It seems that at least con.sun.tools.visualvm.jvmstat.JvmstatModeImpl needs to be recompiled, because it refers to an obsolete method signature.

      Since b97 method sun.jvmstat.monitor.Monitor.getVariability() returns object of type sun.jvmstat.monitor.Variability instead of sun.management.counter.Variability.

      Detailed analysis:

      The following message appears in ~/.visualvm/6u14/var/log/messages.log:

      SEVERE [org.openide.util.RequestProcessor]
      java.lang.NoSuchMethodError: sun.jvmstat.monitor.Monitor.getVariability()Lsun/management/counter/Variability;
              at com.sun.tools.visualvm.jvmstat.JvmstatModelImpl.findByName(JvmstatModelImpl.java:99)
              at com.sun.tools.visualvm.jvm.JRockitJvmProvider.createModelFor(JRockitJvmProvider.java:49)
              at com.sun.tools.visualvm.jvm.JRockitJvmProvider.createModelFor(JRockitJvmProvider.java:42)
              at com.sun.tools.visualvm.core.model.ModelFactory.getModel(ModelFactory.java:111)
              at com.sun.tools.visualvm.application.jvm.JvmFactory.getJVMFor(JvmFactory.java:65)
              at com.sun.tools.visualvm.application.ApplicationSupport.createCurrentApplication(ApplicationSupport.java:56)
              at com.sun.tools.visualvm.application.Application.<clinit>(Application.java:45)
              at com.sun.tools.visualvm.application.ApplicationSupport$1$1.run(ApplicationSupport.java:65)
              at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
      [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
      SEVERE [org.openide.util.RequestProcessor]
      java.lang.NoClassDefFoundError: Could not initialize class com.sun.tools.visualvm.application.Application
              at com.sun.tools.visualvm.jvmstat.application.JvmstatApplicationProvider.processNewApplicationsByPids(JvmstatApplicationProvider.java:171)
              at com.sun.tools.visualvm.jvmstat.application.JvmstatApplicationProvider.processNewHost(JvmstatApplicationProvider.java:126)
              at com.sun.tools.visualvm.jvmstat.application.JvmstatApplicationProvider.access$000(JvmstatApplicationProvider.java:69)
              at com.sun.tools.visualvm.jvmstat.application.JvmstatApplicationProvider$1.run(JvmstatApplicationProvider.java:96)
              at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
      [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)

      b97 contains a fix for CR 6951661, which removed the following import from sun/jvmstat/monitor/Monitor.java:

      -import sun.management.counter.Variability;

      So now javac resolves Variability to the class in the same package.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                thurka Tomáš Hůrka
                Reporter:
                kshiroko Kirill Shirokov (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: