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

ThreadInfoCompositeData.toCompositeData fails to map ThreadInfo to CompositeData

    XMLWordPrintable

    Details

      Backports

        Description

        JDK-8212197 doesn't completely fix the regression introduced by JDK-8198253. NetBeans uses the internal API `sun.management.ThreadInfoCompositeData.toCompositeData(ThreadInfo)` which throws OpenDataException.

        java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.netbeans.modules.sampler.SamplesOutputStream.toCompositeData(SamplesOutputStream.java:178)
        at org.netbeans.modules.sampler.SamplesOutputStream.access$400(SamplesOutputStream.java:44)
        at org.netbeans.modules.sampler.SamplesOutputStream$Sample.writeToStream(SamplesOutputStream.java:285)
        at org.netbeans.modules.sampler.SamplesOutputStream$Sample.access$300(SamplesOutputStream.java:253)
        at org.netbeans.modules.sampler.SamplesOutputStream.close(SamplesOutputStream.java:202)
        at org.netbeans.modules.sampler.Sampler.stopSampling(Sampler.java:231)
        at org.netbeans.modules.sampler.Sampler.stop(Sampler.java:207)
        at org.netbeans.core.ui.sampler.SelfSamplerAction$1.doInBackground(SelfSamplerAction.java:90)
        at java.desktop/javax.swing.SwingWorker$1.call(SwingWorker.java:304)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.desktop/javax.swing.SwingWorker.run(SwingWorker.java:343)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:835)xx
        Caused by: java.lang.IllegalArgumentException: Argument compositeType cannot be null.
        at java.management/javax.management.openmbean.CompositeDataSupport.<init>(CompositeDataSupport.java:206)
        at java.management/javax.management.openmbean.CompositeDataSupport.<init>(CompositeDataSupport.java:118)
        at java.management/sun.management.ThreadInfoCompositeData.getCompositeData(ThreadInfoCompositeData.java:130)
        at java.management/sun.management.ThreadInfoCompositeData.toCompositeData(ThreadInfoCompositeData.java:72)
        ... 18 more

        See also latest comments on https://issues.apache.org/jira/browse/NETBEANS-1359?focusedCommentId=16658301&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16658301


          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  mchung Mandy Chung
                  Reporter:
                  mchung Mandy Chung
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: