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

  1. !ENTRY org.eclipse.ui.workbench 4 0 2012-05-25 18:44:21.306
  2. !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
  3. !STACK 0
  4. 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
  5. at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:3586)
  6. at org.eclipse.ui.internal.WorkbenchPage.internalActivate(WorkbenchPage.java:691)
  7. at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:663)
  8. at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1170)
  9. at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1147)
  10. at org.eclipse.ui.internal.WorkbenchPage$20.run(WorkbenchPage.java:3921)
  11. at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
  12. at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3918)
  13. at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3894)
  14. at org.gluster.storage.management.console.views.GlusterViewsManager.showViewsForCluster(GlusterViewsManager.java:82)
  15. at org.gluster.storage.management.console.views.GlusterViewsManager.updateViews(GlusterViewsManager.java:53)
  16. at org.gluster.storage.management.console.views.NavigationView.selectionChanged(NavigationView.java:142)
  17. at org.eclipse.ui.internal.AbstractSelectionService.fireSelection(AbstractSelectionService.java:156)
  18. at org.eclipse.ui.internal.AbstractSelectionService.setActivePart(AbstractSelectionService.java:282)
  19. at org.eclipse.ui.internal.WorkbenchPagePartList.fireActivePartChanged(WorkbenchPagePartList.java:60)
  20. at org.eclipse.ui.internal.PartList.setActivePart(PartList.java:136)
  21. at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:3636)
  22. at org.eclipse.ui.internal.WorkbenchPage.internalActivate(WorkbenchPage.java:691)
  23. at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:663)
  24. at org.eclipse.ui.internal.WorkbenchPage.makeActive(WorkbenchPage.java:1324)
  25. at org.eclipse.ui.internal.WorkbenchPage.updateActivePart(WorkbenchPage.java:1304)
  26. at org.eclipse.ui.internal.WorkbenchPage.updateVisibility(WorkbenchPage.java:3779)
  27. at org.eclipse.ui.internal.WorkbenchPage.onActivate(WorkbenchPage.java:2715)
  28. at org.eclipse.ui.internal.WorkbenchWindow$27.run(WorkbenchWindow.java:3023)
  29. at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
  30. at org.eclipse.ui.internal.WorkbenchWindow.setActivePage(WorkbenchWindow.java:3004)
  31. at org.eclipse.ui.internal.WorkbenchWindow.busyOpenPage(WorkbenchWindow.java:799)
  32. at org.eclipse.ui.internal.Workbench$23.runWithException(Workbench.java:1224)
  33. at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
  34. at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
  35. at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
  36. at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3563)
  37. at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3212)
  38. at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
  39. at org.eclipse.ui.internal.Workbench$33.runWithException(Workbench.java:1595)
  40. at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
  41. at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
  42. at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
  43. at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3563)
  44. at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3212)
  45. at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
  46. at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
  47. at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
  48. at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
  49. at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
  50. at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
  51. at org.gluster.storage.management.console.Application.start(Application.java:100)
  52. at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
  53. at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
  54. at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
  55. at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
  56. at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
  57. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  58. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  59. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  60. at java.lang.reflect.Method.invoke(Method.java:597)
  61. at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
  62. at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
  63. at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
  64. 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:

  1. Display.getDefault().asyncExec(new Runnable() {
  2. @Override
  3. public void run() {
  4. while (Display.getDefault().readAndDispatch()) {
  5. //wait for events to finish before continue
  6. }
  7. // your code for focus here
  8. // e.g. table.forceFocus()
  9. }
  10. });

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

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

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

这段也是一样可以的

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. One simple health check for oracle with sql

    There are some sqls which is used for check the oracle database's health condition. ------numbers of ...

  2. php导出excel数据

    提供两种导出excel方法 1 最简单的导出excel header('Content-Type: application/vnd.ms-excel'); //设置文件类型   也可以将 vnd.ms ...

  3. Python文件处理(1)

    读取文件 解决方案: 最简单的就是一次性读取所有的内容放在一个大字符串中 all_the_text=open('thefile.txt').read() all_the_data=open('abin ...

  4. 第二代map-reduce架构YARN解析

    需求 我们在考虑hadoop map-reduce框架的时候,最重要需包括: 1. reliability 可靠性,主要是jobtracker,resource manager可靠性 2. avail ...

  5. Spring3 MVC 拦截器拦截不到的问题

    拦截器: com.zk.interceptors.MyInterceptor 实现了 HandlerInterceptor接口,可以拦截@RequestMapping注解的类和方法 第一种方式 < ...

  6. PHP学习之-面向对象

    PHP学习之-面向对象 1.什么是对象 "世界万物皆对象",一切可以被抽象出来的东西都是对象.像花,草.看不到的"概念"都是对象. 2.对象的基本组成 a.属性 ...

  7. Swift编程语言学习1.4——数值型字面量、数值类型转换

    数值型字面量 整数字面量能够被写作: 一个十进制数,没有前缀 一个二进制数,前缀是0b 一个八进制数,前缀是0o 一个十六进制数,前缀是0x 以下的全部整数字面量的十进制值都是17: let deci ...

  8. 树莓派学习笔记——使用文件IO操作GPIO SysFs方式

    0 前言     本文描写叙述假设通过文件IO sysfs方式控制树莓派 GPIO端口.通过sysfs方式控制GPIO,先訪问/sys/class/gpio文件夹,向export文件写入GPIO编号, ...

  9. Eclipse在点击运行后不能自动保存的解决

    今天在eclipse上写程序调试时,发现当我点击运行按键之后,并不能在运行前帮我自动保存,也就是说每次修改代码之后, 运行的还是前一次运行之前的代码,并不是修改之后的代码,因此通过在网上搜索解决方案之 ...

  10. ios捕获异常并发送图片,便于解决bug

    在开发过程中,我们有时候会留下Bug,用户在使用我们的app 的时候,有时会出现闪退,这时候我们能够让用户给我们发送邮件,以让我们开发者更加高速的地位到Bug的所在.以最快的时间解决.同一时候也提高用 ...