1. 程式人生 > >eclipse面板空白,只展示頂部一行選單,介面報NullPointerException

eclipse面板空白,只展示頂部一行選單,介面報NullPointerException

eclipse面板空白,只展示頂部一行選單,介面報NullPointerException

檢視eclipse日誌:

workspace\.metadata\.log

顯示錯誤:

!ENTRY org.eclipse.equinox.event 4 0 2018-08-13 15:42:50.677
!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/ElementContainer/selectedElement/SET] {ChangedElement=org.eclips

[email protected]1ed12d10 (elementId: org.eclipse.ui.ide.perspectivestack, tags: [], contributorURI: null) (widget: Composite {}, renderer: org[email protected]4c140b12, toBeRendered: true, onTop: false, visible: true, containerData: 7500, accessibilityPhrase: null), Widget=Composite {}, AttName=selectedElement, NewValue=org.e
[email protected]
7d82ca56 (elementId: org.eclipse.debug.ui.DebugPerspective, tags: [persp.actionSet:org.eclipse.mylyn.doc.actionSet, persp.actionSet:org.eclipse.mylyn.tasks.ui.navigation, persp.actionSet:org.eclipse.ui.cheatsheets.actionSet, persp.actionSet:org.eclipse.rse.core.search.searchActionSet, persp.actionSet:org.eclipse.search.searchActionSet, persp.actionSet:org.eclipse.ui.edit.text.actionSet.annotationNavigation, persp.actionSet:org.eclipse.ui.edit.text.actionSet.navigation, persp.actionSet:org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo, persp.actionSet:org.eclipse.ui.externaltools.ExternalToolsSet, persp.actionSet:org.eclipse.ui.actionSet.keyBindings, persp.actionSet:org.eclipse.ui.actionSet.openFiles, persp.actionSet:org.eclipse.debug.ui.launchActionSet, persp.actionSet:org.eclipse.debug.ui.debugActionSet, persp.viewSC:org.eclipse.debug.ui.DebugView, persp.viewSC:org.eclipse.debug.ui.VariableView, persp.viewSC:org.eclipse.debug.ui.BreakpointView, persp.viewSC:org.eclipse.debug.ui.ExpressionView, persp.viewSC:org.eclipse.ui.views.ContentOutline, persp.viewSC:org.eclipse.ui.console.ConsoleView, persp.viewSC:org.eclipse.ui.views.TaskList, persp.viewSC:org.eclipse.ant.ui.views.AntView, persp.viewSC:org.eclipse.datatools.sqltools.result.resultView, persp.perspSC:org.eclipse.datatools.sqltools.sqleditor.perspectives.EditorPerspective, persp.actionSet:org.eclipse.ui.NavigateActionSet, persp.actionSet:org.eclipse.debug.ui.breakpointActionSet, persp.viewSC:org.eclipse.pde.runtime.LogView, persp.showIn:org.eclipse.egit.ui.RepositoriesView, persp.actionSet:org.eclipse.jdt.debug.ui.JDTDebugActionSet, persp.viewSC:org.eclipse.jdt.debug.ui.DisplayView, persp.perspSC:org.eclipse.jdt.ui.JavaPerspective, persp.perspSC:org.eclipse.jdt.ui.JavaBrowsingPerspective, persp.actionSet:org.eclipse.jdt.ui.JavaActionSet, persp.showIn:org.eclipse.jdt.ui.PackageExplorer, persp.viewSC:org.eclipse.tm.terminal.view.ui.TerminalsView, persp.showIn:org.eclipse.tm.terminal.view.ui.TerminalsView, persp.perspSC:org.eclipse.wst.jsdt.ui.JavaPerspective, persp.showIn:org.eclipse.wst.jsdt.ui.PackageExplorer, persp.perspSC:org.eclipse.wst.xml.ui.perspective], contributorURI: null) (widget: Composite {}, renderer:
[email protected]
bfd7da, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: Debug, iconURI: platform:/plugin/org.eclipse.debug.ui/$nl$/icons/full/eview16/debug_persp.png, tooltip: null, context: PerspectiveImpl (org.eclipse.debug.ui.DebugPerspective) Context, variables: []), EventType=SET, OldValue=org.e[email protected]5ea0a7a9 (elementId: org.eclipse.team.svn.ui.repository.RepositoryPerspective, tags: [persp.actionSet:org.eclipse.mylyn.doc.actionSet, persp.actionSet:org.eclipse.mylyn.tasks.ui.navigation, persp.actionSet:org.eclipse.ui.cheatsheets.actionSet, persp.actionSet:org.eclipse.rse.core.search.searchActionSet, persp.actionSet:org.eclipse.search.searchActionSet, persp.actionSet:org.eclipse.ui.edit.text.actionSet.annotationNavigation, persp.actionSet:org.eclipse.ui.edit.text.actionSet.navigation, persp.actionSet:org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo, persp.actionSet:org.eclipse.ui.externaltools.ExternalToolsSet, persp.actionSet:org.eclipse.ui.actionSet.keyBindings, persp.actionSet:org.eclipse.ui.actionSet.openFiles, persp.newWizSC:org.eclipse.team.svn.ui.wizard.NewRepositoryLocationWizard, persp.viewSC:org.eclipse.team.svn.ui.repository.RepositoriesView, persp.viewSC:org.eclipse.team.svn.ui.repository.browser.RepositoryBrowser, persp.viewSC:org.eclipse.team.ui.GenericHistoryView, persp.viewSC:org.eclipse.team.svn.ui.properties.PropertiesView, persp.perspSC:org.eclipse.team.svn.ui.repository.RepositoryPerspective, persp.perspSC:org.eclipse.jdt.ui.JavaPerspective, persp.perspSC:org.eclipse.ui.resourcePerspective, persp.perspSC:org.eclipse.team.ui.TeamSynchronizingPerspective, persp.showIn:org.eclipse.tm.terminal.view.ui.TerminalsView], contributorURI: null) (widget: null, renderer: null, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: SVN Repository Exploring, iconURI: platform:/plugin/org.eclipse.team.svn.ui/icons/views/svn.gif, tooltip: null, context: null, variables: null)} to handler [email protected]c7
!STACK 0
java.lang.NullPointerException
    at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showElementRecursive(LazyStackRenderer.java:238)
    at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showElementRecursive(LazyStackRenderer.java:290)
    at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showElementRecursive(LazyStackRenderer.java:290)
    at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showElementRecursive(LazyStackRenderer.java:290)
    at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showElementRecursive(LazyStackRenderer.java:290)
    at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showTab(LazyStackRenderer.java:162)
    at org.eclipse.e4.ui.workbench.renderers.swt.PerspectiveStackRenderer.showTab(PerspectiveStackRenderer.java:88)
    at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer$1.handleEvent(LazyStackRenderer.java:72)
    at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40)
    at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:186)
    at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145)
    at org.eclipse.swt.widgets.Display.syncExec(Display.java:4761)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211)
    at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36)
    at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
    at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
    at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
    at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
    at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
    at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
    at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:85)
    at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:59)
    at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
    at org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveStackImpl.setSelectedElement(PerspectiveStackImpl.java:135)
    at org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveStackImpl.setSelectedElement(PerspectiveStackImpl.java:1)
    at org.eclipse.e4.ui.workbench.addons.perspectiveswitcher.PerspectiveSwitcher$12.widgetSelected(PerspectiveSwitcher.java:590)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4180)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3769)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:694)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:606)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1515)

解決辦法:

刪除檔案 workspace/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi