JDK-6896509 : JConsole closes connection because of a java.io.InvalidObjectException
  • Type: Bug
  • Component: client-libs
  • Affected Version: 6
  • Priority: P4
  • Status: Resolved
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2009-10-29
  • Updated: 2024-04-12
  • Resolved: 2013-08-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdResolved
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing)

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

A DESCRIPTION OF THE PROBLEM :
A few seconds after connecting a JVM with JConsole, connection is closed. Running JConsole with -debug option shows, the reason is sun.management.MemoryUsageCompositeData.validateCompositeData throws java.io.InvalidObjectException.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
* Open JConsole with -debug option
* Connect to any local JVM (for example JConsole itself)
* After a few seconds, JConsole displays a "Connection lost" message

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
JConsole should show information about connected JVM.
ACTUAL -
Connection is lost

ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.lang.reflect.UndeclaredThrowableException
	at $Proxy5.getHeapMemoryUsage(Unknown Source)
	at sun.tools.jconsole.SummaryTab.formatSummary(SummaryTab.java:191)
	at sun.tools.jconsole.SummaryTab$1.doInBackground(SummaryTab.java:74)
	at sun.tools.jconsole.SummaryTab$1.doInBackground(SummaryTab.java:72)
	at javax.swing.SwingWorker$1.call(SwingWorker.java:278)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at javax.swing.SwingWorker.run(SwingWorker.java:317)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.InvalidObjectException: Failed to invoke from(CompositeData)
	at com.sun.jmx.mbeanserver.OpenConverter.invalidObjectException(OpenConverter.java:1403)
	at com.sun.jmx.mbeanserver.OpenConverter$CompositeBuilderViaFrom.fromCompositeData(OpenConverter.java:1007)
	at com.sun.jmx.mbeanserver.OpenConverter$CompositeConverter.fromNonNullOpenValue(OpenConverter.java:903)
	at com.sun.jmx.mbeanserver.OpenConverter.fromOpenValue(OpenConverter.java:110)
	at com.sun.jmx.mbeanserver.ConvertingMethod.fromOpenReturnValue(ConvertingMethod.java:117)
	at com.sun.jmx.mbeanserver.MXBeanProxy.invoke(MXBeanProxy.java:149)
	at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:248)
	... 11 more
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.sun.jmx.mbeanserver.OpenConverter$CompositeBuilderViaFrom.fromCompositeData(OpenConverter.java:1004)
	... 16 more
Caused by: java.lang.IllegalArgumentException: Unexpected composite type for MemoryUsage
	at sun.management.MemoryUsageCompositeData.validateCompositeData(MemoryUsageCompositeData.java:107)
	at java.lang.management.MemoryUsage.<init>(MemoryUsage.java:161)
	at java.lang.management.MemoryUsage.from(MemoryUsage.java:282)
	... 21 more

REPRODUCIBILITY :
This bug can be reproduced always.

Comments
EVALUATION This problem is reproducible when running on Turish locale (maybe other non-English locales but not verified). The submitter confirms that this problem doesn't show up on English locale (US regional setting).
29-10-2009