使用 eclipse时,出现如下问题:org.eclipse.swt.SWTError: No more handles的解决办法

使用 eclipse时,出现如下问题,log如下


!ENTRY org.eclipse.osgi 4 0 2009-07-30 15:49:55.671
!MESSAGE Application error
!STACK 1
org.eclipse.swt.SWTError: No more handles
 at org.eclipse.swt.SWT.error(SWT.java:3803)
 at org.eclipse.swt.graphics.Image.init(Image.java:1582)
 at org.eclipse.swt.graphics.Image.<init>(Image.java:177)
 at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:1367)
 at org.eclipse.swt.widgets.Control.windowProc(Control.java:3842)
 at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:337)
 at org.eclipse.swt.widgets.Display.windowProc(Display.java:4541)
 at org.eclipse.swt.internal.win32.OS.UpdateWindow(Native Method)
 at org.eclipse.swt.widgets.Decorations.setVisible(Decorations.java:1389)
 at org.eclipse.swt.widgets.Shell.setVisible(Shell.java:1764)
 at org.eclipse.swt.widgets.Shell.open(Shell.java:1150)
 at org.eclipse.jface.window.Window.open(Window.java:797)
 at org.eclipse.ui.internal.WorkbenchWindow.open(WorkbenchWindow.java:778)
 at org.eclipse.ui.internal.Workbench$61.runWithException(Workbench.java:3402)
 at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
 at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
 at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133)
 at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3800)
 at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3425)
 at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
 at org.eclipse.ui.internal.Workbench$27.runWithException(Workbench.java:1363)
 at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
 at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
 at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133)
 at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3800)
 at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3425)
 at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2295)
 at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200)
 at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
 at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
 at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:490)
 at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
 at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
 at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
 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:386)
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
 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:549)
 at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
 at org.eclipse.equinox.launcher.Main.run(Main.java:1236)


解决办法:

找到目录 eclipse/workspace/.metadata/.plugins/org.eclipse.ui.workbench 下面的 workbench.xml文件,删除在XML节点
<mruList>
</mruList>

之间的所有内容,然后运行Eclipse,测试是否已经解决。

如果问题还是存在,那么请在workbench.xml文件中查找最后一次(也就是出错之前)运行的程序名称,例如我的是运行的 XXXXX.sql 出现的问题,于是查找
XXXXX.sql 字符串,将有关的部分都删掉,然后在继续运行。
即可。

阅读更多
换一批

没有更多推荐了,返回首页