NullPointerException in eclipse in Eclipse itself at PartServiceImpl.internalFixContext

138,264

Solution 1

There is a bug filed for Eclipse:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=385680

You could try restarting Eclipse, it helped the original poster of the issue there.

Solution 2

Better you update your eclipse by clicking it on help >> check for updates, also you can start eclipse by entering command in command prompt eclipse -clean.
Hope this will help you.

Solution 3

I have also encountered this error . Just i opened the new window ie Window -> New Window in eclipse .Then , I closed my old window. This solved my problem.

Solution 4

hi,that maybe the project's problem,

chose the project and setting you eclipse:

project -> clean... 

Solution 5

After exiting eclipse I moved .eclipse (found in the user's home directory) to .eclipse.old (just in case I may have had to undo). The error does not show up any more and my projects are working fine after restarting eclipse.

Caution: I have a simple setup and this may not be the best for environments with advanced settings.

I am posting this as a separate answer as previously listed methods did not work for me.

Share:
138,264

Related videos on Youtube

King_Dark
Author by

King_Dark

I am a newbie for android Programme. I like to learn a error.

Updated on November 06, 2020

Comments

  • King_Dark
    King_Dark over 3 years

    I have a problem about eclipse IDE, I can't open any file in my work space; if I try to open file, eclipse will alert the following error dialog

    "An error has occurred. See error log for more details. java.lang.NullPointerException"
    

    I go to see .log file in .meta at workspace and I see a paragraph in the file like this:

    !ENTRY org.eclipse.jface 4 2 2557-04-09 11:40:49.422
    !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
    !STACK 0
    java.lang.NullPointerException
        at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.internalFixContext(PartServiceImpl.java:380)
        at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:341)
        at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1029)
        at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3047)
        at org.eclipse.ui.internal.WorkbenchPage.access$22(WorkbenchPage.java:2969)
        at org.eclipse.ui.internal.WorkbenchPage$8.run(WorkbenchPage.java:2951)
        at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
        at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2947)
        at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2911)
        at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2902)
        at org.eclipse.ui.ide.IDE.openEditor(IDE.java:655)
        at org.eclipse.ui.ide.IDE.openEditor(IDE.java:614)
        at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:360)
        at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:167)
        at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:249)
        at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:228)
        at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:275)
        at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251)
        at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:376)
        at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:538)
        at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
        at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:866)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
        at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
        at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:864)
        at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1152)
        at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1256)
        at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275)
        at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:269)
        at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:309)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
        at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
        at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
        at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
        at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
        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:353)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
    

    How can I solve this problem - any idea?

    • W I Z A R D
      W I Z A R D about 10 years
      I think it may work try this, Go to C:\Users\YourcomputerName In that .android folder will be there u delete that folder and restart the eclipse.
  • King_Dark
    King_Dark about 10 years
    YES!!! i will try to restart eclipse.After a restart all works already fine thank you.
  • ferreirabraga
    ferreirabraga about 7 years
    A simple restart from menu File-> Restart solved my problem. Tks!
  • Massimo
    Massimo over 2 years
    Thanks! This solution has worked for me!