在做RCP的eclipse插件开发时,启动管理软件界面时,总是报如下错误 :

!ENTRY org.eclipse.ui.workbench 4 0 2012-05-25 18:44:21.306
!MESSAGE WARNING: Prevented recursive attempt to activate part org.gluster.storage.management.console.views.ClusterSummaryView while still in the middle of activating part org.gluster.storage.management.console.views.NavigationView
!STACK 0
java.lang.RuntimeException: WARNING: Prevented recursive attempt to activate part org.gluster.storage.management.console.views.ClusterSummaryView while still in the middle of activating part org.gluster.storage.management.console.views.NavigationView
at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:3586)
at org.eclipse.ui.internal.WorkbenchPage.internalActivate(WorkbenchPage.java:691)
at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:663)
at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1170)
at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1147)
at org.eclipse.ui.internal.WorkbenchPage$20.run(WorkbenchPage.java:3921)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3918)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3894)
at org.gluster.storage.management.console.views.GlusterViewsManager.showViewsForCluster(GlusterViewsManager.java:82)
at org.gluster.storage.management.console.views.GlusterViewsManager.updateViews(GlusterViewsManager.java:53)
at org.gluster.storage.management.console.views.NavigationView.selectionChanged(NavigationView.java:142)
at org.eclipse.ui.internal.AbstractSelectionService.fireSelection(AbstractSelectionService.java:156)
at org.eclipse.ui.internal.AbstractSelectionService.setActivePart(AbstractSelectionService.java:282)
at org.eclipse.ui.internal.WorkbenchPagePartList.fireActivePartChanged(WorkbenchPagePartList.java:60)
at org.eclipse.ui.internal.PartList.setActivePart(PartList.java:136)
at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:3636)
at org.eclipse.ui.internal.WorkbenchPage.internalActivate(WorkbenchPage.java:691)
at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:663)
at org.eclipse.ui.internal.WorkbenchPage.makeActive(WorkbenchPage.java:1324)
at org.eclipse.ui.internal.WorkbenchPage.updateActivePart(WorkbenchPage.java:1304)
at org.eclipse.ui.internal.WorkbenchPage.updateVisibility(WorkbenchPage.java:3779)
at org.eclipse.ui.internal.WorkbenchPage.onActivate(WorkbenchPage.java:2715)
at org.eclipse.ui.internal.WorkbenchWindow$27.run(WorkbenchWindow.java:3023)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchWindow.setActivePage(WorkbenchWindow.java:3004)
at org.eclipse.ui.internal.WorkbenchWindow.busyOpenPage(WorkbenchWindow.java:799)
at org.eclipse.ui.internal.Workbench$23.runWithException(Workbench.java:1224)
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:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3563)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3212)
at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
at org.eclipse.ui.internal.Workbench$33.runWithException(Workbench.java:1595)
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:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3563)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3212)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.gluster.storage.management.console.Application.start(Application.java:100)
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:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

之前一直不知道错误原因,在网上查了一下,解决办法有几个 ,

1.New focus event is run while other focus event was executing and therefore not finished yet.

You have to override setFocus() or find a good place and put this inside your code:

Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
while (Display.getDefault().readAndDispatch()) {
//wait for events to finish before continue
}
// your code for focus here
// e.g. table.forceFocus()
}
});

So Display will wait until current focus event is finish, and then will execute new focus event.

根据我的测试,上面的代码中,去掉

while (Display.getDefault().readAndDispatch()) {
//wait for events to finish before continue
}

这段也是一样可以的

2.  I just found that one of my colleagues add a PartListener to the part service. When an activated part was adaptable to the IContentOutlinePage, the listener activates the ContentOutline view, so it get also the focus. This was the reason of the exception.

RCP开发中错误:java.lang.RuntimeException: WARNING: Prevented recursive attempt to activate part...的更多相关文章

  1. Android开发中java.lang.RuntimeException: Unable to start activity ComponentInfo{xxx}

    Android开发中java.lang.RuntimeException: Unable to start activity ComponentInfo{xxx}: java.lang.NullPoi ...

  2. sqoop导出hive数据到mysql错误: Caused by: java.lang.RuntimeException: Can't parse input data

    Sqoop Export数据到本地数据库时出现错误,命令如下: sqoop export \ --connect 'jdbc:mysql://202.193.60.117/dataweb?useUni ...

  3. MapReduce错误之Error: java.lang.RuntimeException: java.lang.NoSuchMethodException的解决方法

    今天跑MapReduce项目的时候遇到了这个问题,日志如下所示: // :: DEBUG ipc.ProtobufRpcEngine: Call: getDiagnostics took 19ms E ...

  4. 用idea+maven编译打包spark project core错误:java.lang.RuntimeException: Unable to load a Suite class

    Discovery starting. *** RUN ABORTED *** java.lang.RuntimeException: Unable to load a Suite class tha ...

  5. eclipse 4 rcp: java.lang.RuntimeException: No application id has been found.

    错误详情: java.lang.RuntimeException: No application id has been found. at org.eclipse.equinox.internal. ...

  6. [JAVA][RCP]Clean project之后报错:java.lang.RuntimeException: No application id has been found.

    Clean了一下Project,然后就报了如下错误 !ENTRY com.release.nattable.well_analysis 2 0 2015-11-20 17:04:44.609 !MES ...

  7. 使用CXF 2.7.5出现的java.lang.RuntimeException: Cannot create a secure XMLInputFactory错误解决

    昨天启动工程测试webservice服务,结果发现服务一调用就报java.lang.RuntimeException: Cannot create a secure XMLInputFactory j ...

  8. java.lang.RuntimeException: java.lang.NullPointerException...的错误

    先FQ,让电脑能登上谷歌,然后重新安装,应该就好了,我的是这样解决的.如果下次安装又报:java.lang.RuntimeException: java.lang.NullPointerExcepti ...

  9. 我的Android进阶之旅------>Android中MediaRecorder.stop()报错 java.lang.RuntimeException: stop failed.【转】

    本文转载自:http://blog.csdn.net/ouyang_peng/article/details/48048975 今天在调用MediaRecorder.stop(),报错了,java.l ...

随机推荐

  1. hdu1104 Remainder bfs找算式是否有解……

    须要注意的是,进行模运算剪枝-- #include<iostream> #include<queue> #include<cstdlib> #include< ...

  2. asp.net2.0安全性(1)--用户角色篇(类)--转载来自车老师

    Membership.MembershipUser和Roles类 用户与角色管理在asp.net2.0中是通过Membership和Roles两个类来实现的. Membership:用户成员账号管理, ...

  3. UC网盘被关停 将与阿里淘盘合并?(案例说明云盘的成本才是重点,技术不是问题;与巨头竞争是重点)

    UC网盘被关停 将与阿里淘盘合并? 二八2016-03-18 08:05:36阿里巴巴 网盘 产品阅读(0)评论(12) UC网盘项目组日前发布公告称将停止网盘存储服务,原因为配合国家对云盘传播淫秽色 ...

  4. uva 1390 - Interconnect(期望+哈希+记忆化)

    option=com_onlinejudge&Itemid=8&page=show_problem&category=514&problem=4136&mosm ...

  5. Swift - 跑酷游戏开发(SpriteKit游戏开发)

    一,下面演示了如何开发一个跑酷游戏,实现的功能如下: 1,平台工厂会不断地生成平台,并且向左移动.当平台移出游戏场景时就可将其移除. 2,生成的平台宽度随机,高度随机.同时短平台踩踏的时候会下落. 3 ...

  6. Python中字符串的方法及注释

    先整理到这里:用的时候便于查询.相当于自己的资料库吧. capitalize()   把字符串的第一个字符改为大写 casefold()   把整个字符串的所有字符改为小写 center(width) ...

  7. JSP的学习(5)——语法知识三之include指令

    本篇继续来对JSP语法中的JSP指令进行学习,在<JSP的学习(3)——语法知识二之page指令>中,已经介绍了JSP指令的书写格式和page指令的详细信息,所以在这一篇中我们会对JSP指 ...

  8. Android使用SharedPreferences保存数组

    核心原理: 对象序列化 步骤 1.要保存的对象实现序列化Serializable 2.将序列化的对象保存String(本文的做法是保存为byte数组在转为16进制的String类型保存起来) 3.将保 ...

  9. VMware vSphere服务器虚拟化实验六 vCenter Server 添加储存

                                                                          VMware vSphere服务器虚拟化实验六 vCente ...

  10. [精读]Spationtemporal Saliency Detection Using Textural Contrast and Its Applications

    Spationtemporal Saliency Detection Using Textural Contrast and Its Applications Last Edit 2013/12/3 ...