This discussion is archived
5 Replies Latest reply: Oct 3, 2012 12:58 PM by Erik (JRockit Engineering) RSS

Error while displaying the Flight recorder

user433328 - oracle Newbie
Currently Being Moderated
After taking the dump when I try to load the recorded file. Following exception is thrown on the screen

java.lang.ClassCastException: com.jrockit.mc.flightrecorder.internal.parser.binary.Reference
     at com.jrockit.mc.flightrecorder.internal.parser.binary.MainParser.read(MainParser.java:124)
     at com.jrockit.mc.flightrecorder.internal.parser.binary.MainParser.read(MainParser.java:49)
     at com.jrockit.mc.flightrecorder.provider.RepositoryBuilder.createRepository(RepositoryBuilder.java:63)
     at com.jrockit.mc.flightrecorder.provider.RepositoryBuilder.build(RepositoryBuilder.java:52)
     at com.jrockit.mc.flightrecorder.internal.JRockitFileProvider.createRepositoryFromFile(JRockitFileProvider.java:26)
     at com.jrockit.mc.flightrecorder.spi.FileProvider.createRepository(FileProvider.java:43)
     at com.jrockit.mc.flightrecorder.FlightRecording.<init>(FlightRecording.java:69)
     at com.jrockit.mc.flightrecorder.ui.FlightRecordingEditor.createRecording(FlightRecordingEditor.java:134)
     at com.jrockit.mc.flightrecorder.ui.FlightRecordingEditor.initialize(FlightRecordingEditor.java:47)
     at com.jrockit.mc.components.ui.design.DesignEditor.init(DesignEditor.java:85)
     at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:828)
     at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:647)
     at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
     at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
     at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
     at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2945)
     at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2850)
     at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2842)
     at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2793)
     at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
     at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2789)
     at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2773)
     at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2756)
     at com.jrockit.mc.flightrecorder.ui.FlightRecordingOpener.open(FlightRecordingOpener.java:148)
     at com.jrockit.mc.flightrecorder.ui.FlightRecordingOpener.openFile(FlightRecordingOpener.java:138)
     at com.jrockit.mc.flightrecorder.ui.FlightRecordingOpener.openIfValidFile(FlightRecordingOpener.java:102)
     at com.jrockit.mc.flightrecorder.ui.FlightRecordingOpener.open(FlightRecordingOpener.java:93)
     at com.jrockit.mc.flightrecorder.controlpanel.ui.jobs.OpenRecordingFileJob$1.run(OpenRecordingFileJob.java:41)
     at com.jrockit.mc.ui.misc.DisplayToolkit$SafeRunnable.run(DisplayToolkit.java:55)
     at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
     at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
     at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4140)
     at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
     at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
     at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
     at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
     at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
     at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
     at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
     at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
     at com.jrockit.mc.rcp.application.Application.start(Application.java:24)
     at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
     at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
     at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
     at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
     at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
     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 org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
     at org.eclipse.equinox.launcher.Main.basicRun(Main.java:578)
     at org.eclipse.equinox.launcher.Main.run(Main.java:1411)
     at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
     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.jrockit.mc.rcp.start.MCMain.run(MCMain.java:106)
     at com.jrockit.mc.rcp.start.MCMain.main(MCMain.java:77)

Edited by: 937492 on May 30, 2012 12:17 AM
  • 1. Re: Error while displaying the Flight recorder
    Klara Ward, Java Mission Control Dev Explorer
    Currently Being Moderated
    Quoting Erik Gahlin from a internal interest list mail:

    "It's a known bug that can be provoked if the JVM emits a lot of events.

    If you are running with a custom jfs file you could try disable events or increase the thresholds."

    Please tell us if you need more help with a workaround for this.

    Klara, Mission Control QA
  • 2. Re: Error while displaying the Flight recorder
    mcook Newbie
    Currently Being Moderated
    We are not using custom jfr settings file, and are encountering this issue as well.

    java.lang.ClassCastException: com.jrockit.mc.flightrecorder.internal.parser.binary.Reference
         at com.jrockit.mc.flightrecorder.internal.parser.binary.MainParser.read(MainParser.java:124)
         at com.jrockit.mc.flightrecorder.internal.parser.binary.MainParser.read(MainParser.java:49)
         at com.jrockit.mc.flightrecorder.provider.RepositoryBuilder.createRepository(RepositoryBuilder.java:63)
         at com.jrockit.mc.flightrecorder.provider.RepositoryBuilder.build(RepositoryBuilder.java:52)
         at com.jrockit.mc.flightrecorder.internal.JRockitFileProvider.createRepositoryFromFile(JRockitFileProvider.java:26)
         at com.jrockit.mc.flightrecorder.spi.FileProvider.createRepository(FileProvider.java:43)
         at com.jrockit.mc.flightrecorder.FlightRecording.<init>(FlightRecording.java:69)
         at com.jrockit.mc.flightrecorder.ui.FlightRecordingEditor.createRecording(FlightRecordingEditor.java:134)
         at com.jrockit.mc.flightrecorder.ui.FlightRecordingEditor.initialize(FlightRecordingEditor.java:47)

    jrcmd 1271 start_flightrecording duration=300s filename=/logs/Recording_OCT_2_2012.jfr settings=full

    Has this known bug been fixed yet?
  • 3. Re: Error while displaying the Flight recorder
    Klara Ward, Java Mission Control Dev Explorer
    Currently Being Moderated
    It has been fixed, but unfortunately not yet released, since we haven't made a new release since we made the fix...
    If you have a support contract, you could request a patch.

    We have also seen it if you have a huge amount of exceptions in your recording, do you know which settings were used when creating the recording.
    If you want to look at the exceptions, disabling them in the recording can of course be a problem :(


    Klara, Mission Control dev team
  • 4. Re: Error while displaying the Flight recorder
    mcook Newbie
    Currently Being Moderated
    The client is using the full.jfs settings which enable everything.

    // Settings file for JRockit Flight Recorder enabling collection of all events


    So as a workaround you are suggesting to create a custom jfs settings file without exceptions being enabled.
  • 5. Re: Error while displaying the Flight recorder
    Erik (JRockit Engineering) Newbie
    Currently Being Moderated
    The full.jfs should never be used, the overhead can be several thousand percent. The settings file should be removed from the distro.

    I recommend you use profile.jfs.

    You will get similar data as if you would start a profiling recording inside Mission Control, about 1% overhead.

    Erik

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points