Merhaba değerli dostlar, VisualVM ile çalışırken bir processi incelemek istediğinizde UndeclaredThrowableException hatası alırsanız muhtemelen bir dil ayarı ile bu işi hızlıca ve çok basit bir şekilde çözebilirsiniz. Önce detaylı hata loguna bakalım.

java.lang.IllegalArgumentException: Unexpected composite type for ThreadInfo
	at sun.management.ThreadInfoCompositeData.validateCompositeData(ThreadInfoCompositeData.java:372)
	at sun.management.ThreadInfoCompositeData.getInstance(ThreadInfoCompositeData.java:68)
	at java.lang.management.ThreadInfo.<init>(ThreadInfo.java:263)
	at java.lang.management.ThreadInfo.from(ThreadInfo.java:794)
Caused: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
	at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
	at com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory$CompositeBuilderViaFrom.fromCompositeData(DefaultMXBeanMappingFactory.java:1018)
Caused: java.io.InvalidObjectException: Failed to invoke from(CompositeData)
	at com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory.invalidObjectException(DefaultMXBeanMappingFactory.java:1457)
	at com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory$CompositeBuilderViaFrom.fromCompositeData(DefaultMXBeanMappingFactory.java:1021)
	at com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory$CompositeMapping.fromNonNullOpenValue(DefaultMXBeanMappingFactory.java:919)
	at com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory$NonNullMXBeanMapping.fromOpenValue(DefaultMXBeanMappingFactory.java:133)
	at com.sun.jmx.mbeanserver.ConvertingMethod.fromOpenReturnValue(ConvertingMethod.java:131)
	at com.sun.jmx.mbeanserver.MXBeanProxy.invoke(MXBeanProxy.java:168)
	at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:258)
Caused: java.lang.reflect.UndeclaredThrowableException
	at com.sun.proxy.$Proxy14.getThreadInfo(Unknown Source)
	at org.graalvm.visualvm.jmx.impl.JmxSupport.isReadOnlyConnection(JmxSupport.java:128)
	at org.graalvm.visualvm.jmx.impl.JmxModelImpl.isTakeThreadDumpSupported(JmxModelImpl.java:308)
	at org.graalvm.visualvm.application.views.threads.ApplicationThreadsViewProvider.resolveThreads(ApplicationThreadsViewProvider.java:86)
	at org.graalvm.visualvm.application.views.threads.ApplicationThreadsViewProvider.supportsViewFor(ApplicationThreadsViewProvider.java:50)
	at org.graalvm.visualvm.application.views.threads.ApplicationThreadsViewProvider.supportsViewFor(ApplicationThreadsViewProvider.java:45)
	at org.graalvm.visualvm.core.ui.DataSourceViewsManager.getViews(DataSourceViewsManager.java:136)
	at org.graalvm.visualvm.core.ui.DataSourceWindowManager.openWindowAndAddView(DataSourceWindowManager.java:259)
	at org.graalvm.visualvm.core.ui.DataSourceWindowManager.access$000(DataSourceWindowManager.java:51)
	at org.graalvm.visualvm.core.ui.DataSourceWindowManager$2.run(DataSourceWindowManager.java:118)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)

Şimdi de çözümü yazmak istiyorum. İncelemek istediğiniz uygulamayı ayağa kaldırırken VM option olarak şunu ekleyip restart ederseniz sorununuz çözülecektir.

-Duser.language=en

Bol Java’ lı günler dileğiyle.

Categories:

No responses yet

Bir cevap yazın

E-posta hesabınız yayımlanmayacak.