java.lang.ClassCastException: org.eclipse.jdt.internal.core.ClassFile cannot be cast to org.eclipse.jdt.core.ICompilationUnit

GitHub | vazexqi | 6 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

    Failure in InlineMethodTests#testBinaryInlineAll

    GitHub | 6 years ago | vazexqi
    java.lang.ClassCastException: org.eclipse.jdt.internal.core.ClassFile cannot be cast to org.eclipse.jdt.core.ICompilationUnit

    Root Cause Analysis

    1. java.lang.ClassCastException

      org.eclipse.jdt.internal.core.ClassFile cannot be cast to org.eclipse.jdt.core.ICompilationUnit

      at org.eclipse.jdt.internal.corext.refactoring.code.InlineMethodRefactoring.getCompilationUnit()
    2. Java Development Tools UI
      InlineMethodRefactoring.getSimpleRefactoringDescriptor
      1. org.eclipse.jdt.internal.corext.refactoring.code.InlineMethodRefactoring.getCompilationUnit(InlineMethodRefactoring.java:448)
      2. org.eclipse.jdt.internal.corext.refactoring.code.WatchedJavaRefactoring.getJavaProjectName(WatchedJavaRefactoring.java:67)
      3. org.eclipse.jdt.internal.corext.refactoring.code.InlineMethodRefactoring.getSimpleRefactoringDescriptor(InlineMethodRefactoring.java:416)
      3 frames
    3. org.eclipse.jdt
      InlineMethodTests.testBinaryInlineAll
      1. org.eclipse.jdt.ui.tests.refactoring.AbstractSelectionTestCase.checkRefactoringDescriptorCreation(AbstractSelectionTestCase.java:183)
      2. org.eclipse.jdt.ui.tests.refactoring.AbstractSelectionTestCase.performTest(AbstractSelectionTestCase.java:141)
      3. org.eclipse.jdt.ui.tests.refactoring.InlineMethodTests.testBinaryInlineAll(InlineMethodTests.java:906)
      3 frames
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    5. JUnit
      TestSetup.run
      1. junit.framework.TestCase.runTest(TestCase.java:168)
      2. junit.framework.TestCase.runBare(TestCase.java:134)
      3. junit.framework.TestResult$1.protect(TestResult.java:110)
      4. junit.framework.TestResult.runProtected(TestResult.java:128)
      5. junit.framework.TestResult.run(TestResult.java:113)
      6. junit.framework.TestCase.run(TestCase.java:124)
      7. junit.framework.TestSuite.runTest(TestSuite.java:232)
      8. junit.framework.TestSuite.run(TestSuite.java:227)
      9. junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
      10. junit.extensions.TestSetup$1.protect(TestSetup.java:23)
      11. junit.framework.TestResult.runProtected(TestResult.java:128)
      12. junit.extensions.TestSetup.run(TestSetup.java:27)
      12 frames
    6. JUnit3 Runner
      RemoteTestRunner.run
      1. org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
      2. org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
      4. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
      5. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
      5 frames
    7. PDE JUnit Plug-in Test
      UITestApplication$1.run
      1. org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:62)
      2. org.eclipse.pde.internal.junit.runtime.UITestApplication$1.run(UITestApplication.java:116)
      2 frames
    8. RWT
      Display.readAndDispatch
      1. org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
      2. org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
      3. org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3586)
      4. org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3279)
      4 frames
    9. Eclipse UI
      Workbench$7.run
      1. org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629)
      2. org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
      3. org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)
      4. org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
      4 frames
    10. Databinding
      Realm.runWithDefault
      1. org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
      1 frame
    11. Eclipse UI
      Workbench.createAndRunWorkbench
      1. org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663)
      1 frame
    12. Eclipse UI
      PlatformUI.createAndRunWorkbench
      1. org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
      1 frame
    13. Eclipse IDE
      IDEApplication.start
      1. org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
      1 frame
    14. PDE JUnit Plug-in Test
      UITestApplication.start
      1. org.eclipse.pde.internal.junit.runtime.UITestApplication.start(UITestApplication.java:47)
      1 frame
    15. Equinox Container
      EclipseAppHandle.run
      1. org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      1 frame
    16. Eclipse OSGi
      EclipseStarter.run
      1. org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
      2. org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
      3. org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
      4. org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
      4 frames
    17. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    18. Equinox
      Main.main
      1. org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
      2. org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
      3. org.eclipse.equinox.launcher.Main.run(Main.java:1407)
      4. org.eclipse.equinox.launcher.Main.main(Main.java:1383)
      4 frames