java.lang.ClassCastException: org.eclipse.jdt.internal.core.CompilationUnit cannot be cast to org.scalaide.core.internal.jdt.model.ScalaCompilationUnit

Google Groups | Александр Гурьянов | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Newbie questions

    Google Groups | 2 years ago | Александр Гурьянов
    java.lang.ClassCastException: org.eclipse.jdt.internal.core.CompilationUnit cannot be cast to org.scalaide.core.internal.jdt.model.ScalaCompilationUnit

    Root Cause Analysis

    1. java.lang.ClassCastException

      org.eclipse.jdt.internal.core.CompilationUnit cannot be cast to org.scalaide.core.internal.jdt.model.ScalaCompilationUnit

      at org.scalaide.core.internal.ScalaPlugin.unitOfSourceFile$1()
    2. org.scalaide.core
      ScalaPlugin.scalaCompilationUnit
      1. org.scalaide.core.internal.ScalaPlugin.unitOfSourceFile$1(ScalaPlugin.scala:158)
      2. org.scalaide.core.internal.ScalaPlugin.scalaCompilationUnit(ScalaPlugin.scala:165)
      2 frames
    3. org.scalaide.ui
      ScalaSourceViewerConfiguration$$anonfun$getReconciler$1.apply
      1. org.scalaide.ui.internal.editor.ScalaCompilationUnitEditor$class.getInteractiveCompilationUnit(ScalaCompilationUnitEditor.scala:100)
      2. org.scalaide.ui.internal.editor.ScalaSourceFileEditor.getInteractiveCompilationUnit(ScalaSourceFileEditor.scala:62)
      3. org.scalaide.ui.internal.reconciliation.ScalaReconciler.install(ScalaReconciler.scala:95)
      4. org.scalaide.ui.internal.editor.ScalaSourceViewerConfiguration$$anonfun$getReconciler$1.apply(ScalaSourceViewerConfiguration.scala:217)
      5. org.scalaide.ui.internal.editor.ScalaSourceViewerConfiguration$$anonfun$getReconciler$1.apply(ScalaSourceViewerConfiguration.scala:204)
      5 frames
    4. Scala
      Option.map
      1. scala.Option.map(Option.scala:146)
      1 frame
    5. org.scalaide.ui
      ScalaSourceViewerConfiguration.getReconciler
      1. org.scalaide.ui.internal.editor.ScalaSourceViewerConfiguration.getReconciler(ScalaSourceViewerConfiguration.scala:204)
      1 frame
    6. JFace Text
      SourceViewer.configure
      1. org.eclipse.jface.text.source.SourceViewer.configure(SourceViewer.java:460)
      1 frame
    7. Java Development Tools UI
      JavaSourceViewer.configure
      1. org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer.configure(JavaSourceViewer.java:230)
      1 frame
    8. Text Editor Framework
      AbstractDecoratedTextEditor.createPartControl
      1. org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(AbstractTextEditor.java:3427)
      2. org.eclipse.ui.texteditor.StatusTextEditor.createPartControl(StatusTextEditor.java:54)
      3. org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createPartControl(AbstractDecoratedTextEditor.java:447)
      3 frames
    9. Java Development Tools UI
      CompilationUnitEditor.createPartControl
      1. org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.createPartControl(JavaEditor.java:3119)
      2. org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createPartControl(CompilationUnitEditor.java:1505)
      2 frames
    10. org.scalaide.ui
      ScalaSourceFileEditor.createPartControl
      1. org.scalaide.ui.internal.editor.ScalaSourceFileEditor.org$scalaide$ui$internal$editor$ScalaCompilationUnitEditor$$super$createPartControl(ScalaSourceFileEditor.scala:62)
      2. org.scalaide.ui.internal.editor.ScalaCompilationUnitEditor$class.createPartControl(ScalaCompilationUnitEditor.scala:41)
      3. org.scalaide.ui.internal.editor.ScalaSourceFileEditor.createPartControl(ScalaSourceFileEditor.scala:327)
      3 frames
    11. org.eclipse.ui
      CompatibilityPart.create
      1. org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:141)
      2. org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:99)
      3. org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:327)
      3 frames
    12. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:606)
      4 frames
    13. org.eclipse.e4
      ContextInjectionFactory.make
      1. org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
      2. org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:888)
      3. org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:869)
      4. org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:120)
      5. org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:337)
      6. org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:258)
      7. org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162)
      7 frames
    14. Eclipse Workbench
      ReflectionContributionFactory.create
      1. org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:104)
      2. org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:73)
      3. org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:55)
      3 frames
    15. org.eclipse.e4
      ContributedPartRenderer.createWidget
      1. org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:127)
      1 frame
    16. Eclipse Workbench SWT
      PartRenderingEngine$7.run
      1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:983)
      2. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:662)
      3. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:766)
      4. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:737)
      5. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:731)
      5 frames
    17. Eclipse Core
      SafeRunner.run
      1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      1 frame
    18. Eclipse Workbench SWT
      PartRenderingEngine.createGui
      1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:715)
      1 frame
    19. org.eclipse.e4
      LazyStackRenderer.postProcess
      1. org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showTab(StackRenderer.java:1250)
      2. org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.postProcess(LazyStackRenderer.java:100)
      2 frames
    20. Eclipse Workbench SWT
      PartRenderingEngine$7.run
      1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:678)
      2. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:766)
      3. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:737)
      4. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:731)
      4 frames
    21. Eclipse Core
      SafeRunner.run
      1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      1 frame
    22. Eclipse Workbench SWT
      PartRenderingEngine.createGui
      1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:715)
      1 frame
    23. org.eclipse.e4
      SWTPartRenderer.processContents
      1. org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:68)
      1 frame
    24. Eclipse Workbench SWT
      PartRenderingEngine$6.run
      1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:674)
      2. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$6.run(PartRenderingEngine.java:547)
      2 frames
    25. Eclipse Core
      SafeRunner.run
      1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      1 frame
    26. Eclipse Workbench SWT
      PartRenderingEngine.createGui
      1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:531)
      1 frame
    27. org.eclipse.e4
      ElementReferenceRenderer.createWidget
      1. org.eclipse.e4.ui.workbench.renderers.swt.ElementReferenceRenderer.createWidget(ElementReferenceRenderer.java:69)
      1 frame
    28. Eclipse Workbench SWT
      PartRenderingEngine$7.run
      1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:983)
      2. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:662)
      3. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:766)
      4. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:737)
      5. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:731)
      5 frames
    29. Eclipse Core
      SafeRunner.run
      1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      1 frame
    30. Eclipse Workbench SWT
      PartRenderingEngine.createGui
      1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:715)
      1 frame
    31. org.eclipse.e4
      SashRenderer.processContents
      1. org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:68)
      2. org.eclipse.e4.ui.workbench.renderers.swt.SashRenderer.processContents(SashRenderer.java:185)
      2 frames
    32. Eclipse Workbench SWT
      PartRenderingEngine$7.run
      1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:674)
      2. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:766)
      3. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:737)
      4. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:731)
      4 frames
    33. Eclipse Core
      SafeRunner.run
      1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      1 frame
    34. Eclipse Workbench SWT
      PartRenderingEngine.createGui
      1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:715)
      1 frame
    35. org.eclipse.e4
      SashRenderer.processContents
      1. org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:68)
      2. org.eclipse.e4.ui.workbench.renderers.swt.SashRenderer.processContents(SashRenderer.java:185)
      2 frames
    36. Eclipse Workbench SWT
      PartRenderingEngine$7.run
      1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:674)
      2. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:766)
      3. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:737)
      4. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:731)
      4 frames
    37. Eclipse Core
      SafeRunner.run
      1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      1 frame
    38. Eclipse Workbench SWT
      PartRenderingEngine.createGui
      1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:715)
      1 frame
    39. org.eclipse.e4
      SashRenderer.processContents
      1. org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:68)
      2. org.eclipse.e4.ui.workbench.renderers.swt.SashRenderer.processContents(SashRenderer.java:185)
      2 frames
    40. Eclipse Workbench SWT
      PartRenderingEngine$7.run
      1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:674)
      2. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:766)
      3. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:737)
      4. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:731)
      4 frames
    41. Eclipse Core
      SafeRunner.run
      1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      1 frame
    42. Eclipse Workbench SWT
      PartRenderingEngine.createGui
      1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:715)
      1 frame
    43. org.eclipse.e4
      PerspectiveRenderer.processContents
      1. org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:68)
      2. org.eclipse.e4.ui.workbench.renderers.swt.PerspectiveRenderer.processContents(PerspectiveRenderer.java:49)
      2 frames
    44. Eclipse Workbench SWT
      PartRenderingEngine$7.run
      1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:674)
      2. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:766)
      3. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:737)
      4. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:731)
      4 frames
    45. Eclipse Core
      SafeRunner.run
      1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      1 frame
    46. Eclipse Workbench SWT
      PartRenderingEngine.createGui
      1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:715)
      1 frame
    47. org.eclipse.e4
      PerspectiveStackRenderer.postProcess
      1. org.eclipse.e4.ui.workbench.renderers.swt.PerspectiveStackRenderer.showTab(PerspectiveStackRenderer.java:103)
      2. org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.postProcess(LazyStackRenderer.java:100)
      3. org.eclipse.e4.ui.workbench.renderers.swt.PerspectiveStackRenderer.postProcess(PerspectiveStackRenderer.java:77)
      3 frames
    48. Eclipse Workbench SWT
      PartRenderingEngine$7.run
      1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:678)
      2. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:766)
      3. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:737)
      4. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:731)
      4 frames
    49. Eclipse Core
      SafeRunner.run
      1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      1 frame
    50. Eclipse Workbench SWT
      PartRenderingEngine.createGui
      1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:715)
      1 frame
    51. org.eclipse.e4
      SashRenderer.processContents
      1. org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:68)
      2. org.eclipse.e4.ui.workbench.renderers.swt.SashRenderer.processContents(SashRenderer.java:185)
      2 frames
    52. Eclipse Workbench SWT
      PartRenderingEngine$7.run
      1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:674)
      2. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:766)
      3. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:737)
      4. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:731)
      4 frames
    53. Eclipse Core
      SafeRunner.run
      1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      1 frame
    54. Eclipse Workbench SWT
      PartRenderingEngine.createGui
      1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:715)
      1 frame
    55. org.eclipse.e4
      WBWRenderer.processContents
      1. org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:68)
      2. org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer.processContents(WBWRenderer.java:664)
      2 frames
    56. Eclipse Workbench SWT
      PartRenderingEngine$7.run
      1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:674)
      2. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:766)
      3. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:737)
      4. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:731)
      4 frames
    57. Eclipse Core
      SafeRunner.run
      1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      1 frame
    58. Eclipse Workbench SWT
      PartRenderingEngine$9.run
      1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:715)
      2. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1078)
      2 frames
    59. Databinding
      Realm.runWithDefault
      1. org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
      1 frame
    60. Eclipse Workbench SWT
      PartRenderingEngine.run
      1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
      1 frame
    61. Eclipse Workbench
      E4Workbench.createAndRunUI
      1. org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
      1 frame
    62. Eclipse UI
      Workbench$5.run
      1. org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
      1 frame
    63. Databinding
      Realm.runWithDefault
      1. org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
      1 frame
    64. Eclipse UI
      Workbench.createAndRunWorkbench
      1. org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
      1 frame
    65. Eclipse UI
      PlatformUI.createAndRunWorkbench
      1. org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
      1 frame
    66. Eclipse IDE
      IDEApplication.start
      1. org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
      1 frame
    67. Equinox Container
      EclipseAppHandle.run
      1. org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      1 frame
    68. Eclipse OSGi
      EclipseStarter.run
      1. org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
      2. org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
      3. org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
      4. org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
      4 frames
    69. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:606)
      4 frames
    70. Equinox
      Main.main
      1. org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
      2. org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
      3. org.eclipse.equinox.launcher.Main.run(Main.java:1465)
      4. org.eclipse.equinox.launcher.Main.main(Main.java:1438)
      4 frames