jerrychen100d / rabbit-eclipse

Automatically exported from code.google.com/p/rabbit-eclipse
0 stars 1 forks source link

ConcurrentModificationException #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Reopening Eclipse after several days with Rabbit running I was greated by 
an exception directly after the workbench had loaded:

org.osgi.framework.BundleException: Exception in 
rabbit.core.RabbitCore.start() of bundle rabbit.core.
at 
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(Bu
ndleContextImpl.java:806)
at 
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleConte
xtImpl.java:755)
at 
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.j
ava:352)
at 
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle
.java:280)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:408)
at 
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalCl
ass(EclipseLazyStarter.java:111)
at 
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(Classpat
hManager.java:449)
at 
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(Defa
ultClassLoader.java:211)
at 
org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.ja
va:381)
at 
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader
.java:457)
at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:41
0)
at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:39
8)
at 
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultCl
assLoader.java:105)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at 
org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:32
6)
at 
org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.jav
a:231)
at 
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBu
ndle.java:1193)
at 
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutabl
eExtension(RegistryStrategyOSGI.java:160)
at 
org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtensi
on(ExtensionRegistry.java:874)
at 
org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExte
nsion(ConfigurationElement.java:243)
at 
org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutab
leExtension(ConfigurationElementHandle.java:51)
at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugin.java:267)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:52)
at 
org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java
:263)
at 
org.eclipse.ui.internal.EarlyStartupRunnable.getExecutableExtension(EarlySta
rtupRunnable.java:117)
at 
org.eclipse.ui.internal.EarlyStartupRunnable.run(EarlyStartupRunnable.java:6
6)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.Workbench$55.run(Workbench.java:2192)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
at java.util.HashMap$ValueIterator.next(HashMap.java:822)
at 
org.eclipse.core.commands.CommandManager.addExecutionListener(CommandManager
.java:322)
at 
org.eclipse.ui.internal.commands.CommandService.addExecutionListener(Command
Service.java:101)
at 
rabbit.core.internal.trackers.CommandTracker.doEnable(CommandTracker.java:70
)
at 
rabbit.core.internal.trackers.AbstractTracker.setEnabled(AbstractTracker.jav
a:88)
at rabbit.core.RabbitCore.setEnableTrackers(RabbitCore.java:290)
at rabbit.core.RabbitCore.start(RabbitCore.java:231)
at 
org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleConte
xtImpl.java:783)
at java.security.AccessController.doPrivileged(Native Method)
at 
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(Bu
ndleContextImpl.java:774)
... 28 more
Root exception:
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
at java.util.HashMap$ValueIterator.next(HashMap.java:822)
at 
org.eclipse.core.commands.CommandManager.addExecutionListener(CommandManager
.java:322)
at 
org.eclipse.ui.internal.commands.CommandService.addExecutionListener(Command
Service.java:101)
at 
rabbit.core.internal.trackers.CommandTracker.doEnable(CommandTracker.java:70
)
at 
rabbit.core.internal.trackers.AbstractTracker.setEnabled(AbstractTracker.jav
a:88)
at rabbit.core.RabbitCore.setEnableTrackers(RabbitCore.java:290)
at rabbit.core.RabbitCore.start(RabbitCore.java:231)
at 
org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleConte
xtImpl.java:783)
at java.security.AccessController.doPrivileged(Native Method)
at 
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(Bu
ndleContextImpl.java:774)
at 
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleConte
xtImpl.java:755)
at 
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.j
ava:352)
at 
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle
.java:280)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:408)
at 
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalCl
ass(EclipseLazyStarter.java:111)
at 
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(Classpat
hManager.java:449)
at 
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(Defa
ultClassLoader.java:211)
at 
org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.ja
va:381)
at 
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader
.java:457)
at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:41
0)
at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:39
8)
at 
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultCl
assLoader.java:105)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at 
org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:32
6)
at 
org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.jav
a:231)
at 
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBu
ndle.java:1193)
at 
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutabl
eExtension(RegistryStrategyOSGI.java:160)
at 
org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtensi
on(ExtensionRegistry.java:874)
at 
org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExte
nsion(ConfigurationElement.java:243)
at 
org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutab
leExtension(ConfigurationElementHandle.java:51)
at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugin.java:267)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:52)
at 
org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java
:263)
at 
org.eclipse.ui.internal.EarlyStartupRunnable.getExecutableExtension(EarlySta
rtupRunnable.java:117)
at 
org.eclipse.ui.internal.EarlyStartupRunnable.run(EarlyStartupRunnable.java:6
6)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.Workbench$55.run(Workbench.java:2192)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

The bad thing about that issue is that it prevents the shutdown of the 
workbench, so the Eclipse process must be killed:

java.lang.NoClassDefFoundError: 
rabbit/core/internal/trackers/AbstractPartTracker$2
at 
rabbit.core.internal.trackers.AbstractPartTracker.doDisable(AbstractPartTrac
ker.java:150)
at 
rabbit.core.internal.trackers.AbstractTracker.setEnabled(AbstractTracker.jav
a:90)
at rabbit.core.RabbitCore.preShutdown(RabbitCore.java:202)
at org.eclipse.ui.internal.Workbench$8.run(Workbench.java:728)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.runtime.Platform.run(Platform.java:888)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.ui.internal.Workbench.firePreShutdown(Workbench.java:726)
at org.eclipse.ui.internal.Workbench.busyClose(Workbench.java:866)
at org.eclipse.ui.internal.Workbench.access$15(Workbench.java:856)
at org.eclipse.ui.internal.Workbench$23.run(Workbench.java:1100)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.Workbench.close(Workbench.java:1098)
at org.eclipse.ui.internal.Workbench.close(Workbench.java:1070)
at org.eclipse.ui.internal.handlers.QuitHandler.execute(QuitHandler.java:41)
at 
org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:294)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
at 
org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(Parameteriz
edCommand.java:508)
at 
org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerServic
e.java:169)
at 
org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHan
dlerService.java:241)
at 
org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.jav
a:157)
at 
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(Action
ContributionItem.java:584)
at 
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionI
tem.java:501)
at 
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContribu
tionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1176)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3493)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3112)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at 
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at 
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
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:
194)
at 
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(
EclipseAppLauncher.java:110)
at 
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAp
pLauncher.java:79)
at 
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
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:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
at org.eclipse.equinox.launcher.Main.main(Main.java:1287)

Original issue reported on code.google.com by bananewe...@gmail.com on 20 Mar 2010 at 8:46

GoogleCodeExporter commented 9 years ago
Thanks for the details, I will investigate.

Original comment by llaec...@gmail.com on 20 Mar 2010 at 10:09

GoogleCodeExporter commented 9 years ago
I was not able to reproduce the problem, but I've rewritten that piece of code, 
it
shouldn't happen again.

Original comment by llaec...@gmail.com on 17 May 2010 at 5:53