Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 511599 - Eclipse fails on startup due to AssertionFailedException in JavaCore.start
Summary: Eclipse fails on startup due to AssertionFailedException in JavaCore.start
Status: CLOSED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.7   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-02 14:14 EST by Sergey Prigogin CLA
Modified: 2020-01-31 03:27 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Prigogin CLA 2017-02-02 14:14:54 EST
eclipse.buildId=4.7.0.I20170130-0600

!ENTRY org.eclipse.ui.navigator 4 0 2017-02-02 13:54:44.625
!MESSAGE Plug-in org.eclipse.jdt.ui was unable to load class org.eclipse.jdt.internal.ui.navigator.JavaNavigatorContentProvider.
!STACK 1
org.eclipse.core.runtime.CoreException: Plug-in org.eclipse.jdt.ui was unable to load class org.eclipse.jdt.internal.ui.navigator.JavaNavigatorContentProvider.
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:176)
	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
	at org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptor.createContentProvider(NavigatorContentDescriptor.java:372)
	at org.eclipse.ui.internal.navigator.extensions.NavigatorContentExtension$1.run(NavigatorContentExtension.java:113)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.navigator.extensions.NavigatorContentExtension.internalGetContentProvider(NavigatorContentExtension.java:108)
	at org.eclipse.ui.internal.navigator.NavigatorContentService.extractContentProviders(NavigatorContentService.java:1114)
	at org.eclipse.ui.internal.navigator.NavigatorContentService.updateService(NavigatorContentService.java:359)
	at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider.inputChanged(NavigatorContentServiceContentProvider.java:110)
	at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:282)
	at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1689)
	at org.eclipse.ui.navigator.CommonNavigator.createPartControl(CommonNavigator.java:206)
	at org.eclipse.ui.navigator.resources.ProjectExplorer.createPartControl(ProjectExplorer.java:88)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:149)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityView.createPartControl(CompatibilityView.java:147)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:344)
	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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:966)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:931)
	at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:151)
	at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:375)
	at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:294)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:105)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:74)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:56)
	at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:129)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:975)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:651)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$1.run(PartRenderingEngine.java:536)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:520)
	at org.eclipse.e4.ui.workbench.renderers.swt.ElementReferenceRenderer.createWidget(ElementReferenceRenderer.java:70)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:975)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:651)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:757)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:728)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:722)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:706)
	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showTab(StackRenderer.java:1286)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.postProcess(LazyStackRenderer.java:97)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:669)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:757)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:728)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:722)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:706)
	at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:74)
	at org.eclipse.e4.ui.workbench.renderers.swt.SashRenderer.processContents(SashRenderer.java:137)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:665)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:757)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:728)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:722)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:706)
	at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:74)
	at org.eclipse.e4.ui.workbench.renderers.swt.PerspectiveRenderer.processContents(PerspectiveRenderer.java:49)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:665)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:757)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:728)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:722)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:706)
	at org.eclipse.e4.ui.workbench.renderers.swt.PerspectiveStackRenderer.showTab(PerspectiveStackRenderer.java:79)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.postProcess(LazyStackRenderer.java:97)
	at org.eclipse.e4.ui.workbench.renderers.swt.PerspectiveStackRenderer.postProcess(PerspectiveStackRenderer.java:61)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:669)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:757)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:728)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:722)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:706)
	at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:74)
	at org.eclipse.e4.ui.workbench.renderers.swt.SashRenderer.processContents(SashRenderer.java:137)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:665)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:757)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:728)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:722)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:706)
	at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:74)
	at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer.processContents(WBWRenderer.java:706)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:665)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:757)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:728)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:722)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:706)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1059)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:684)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
	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:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	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:653)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
Caused by: java.lang.ClassNotFoundException: An error occurred while automatically activating bundle org.eclipse.jdt.ui (249).
	at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:112)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:328)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:359)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:437)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:386)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:378)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
	at org.eclipse.ui.internal.navigator.filters.CommonFilterDescriptor$1.run(CommonFilterDescriptor.java:139)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.navigator.filters.CommonFilterDescriptor.createFilter(CommonFilterDescriptor.java:119)
	at org.eclipse.ui.internal.navigator.NavigatorFilterService.getViewerFilter(NavigatorFilterService.java:177)
	at org.eclipse.ui.internal.navigator.NavigatorFilterService.getVisibleFilters(NavigatorFilterService.java:146)
	at org.eclipse.ui.navigator.CommonNavigator.createPartControl(CommonNavigator.java:195)
	... 103 more
Caused by: org.osgi.framework.BundleException: Error starting module.
	at org.eclipse.osgi.container.Module.doStart(Module.java:590)
	at org.eclipse.osgi.container.Module.start(Module.java:449)
	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:468)
	at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:103)
	... 122 more
Caused by: java.lang.NoClassDefFoundError: org/eclipse/jdt/core/IBufferFactory
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2673)
	at java.lang.Class.getConstructor0(Class.java:3077)
	at java.lang.Class.newInstance(Class.java:413)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.loadBundleActivator(BundleContextImpl.java:758)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:711)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:933)
	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:309)
	at org.eclipse.osgi.container.Module.doStart(Module.java:581)
	... 125 more
Caused by: java.lang.ClassNotFoundException: An error occurred while automatically activating bundle org.eclipse.jdt.core (238).
	at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:112)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:328)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:359)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:437)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:386)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:378)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at org.eclipse.pde.internal.core.PDECore.start(PDECore.java:264)
	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:774)
	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:767)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:724)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:933)
	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:309)
	at org.eclipse.osgi.container.Module.doStart(Module.java:581)
	at org.eclipse.osgi.container.Module.start(Module.java:449)
	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:468)
	at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:103)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:328)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:359)
	at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:433)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:386)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:378)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at org.eclipse.pde.internal.ui.PDEPlugin.getPreferenceManager(PDEPlugin.java:66)
	at org.eclipse.pde.internal.ui.shared.target.TargetStatus.initializeTargetStatus(TargetStatus.java:189)
	at org.eclipse.pde.internal.ui.PDEPlugin.start(PDEPlugin.java:198)
	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:774)
	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:767)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:724)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:933)
	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:309)
	at org.eclipse.osgi.container.Module.doStart(Module.java:581)
	at org.eclipse.osgi.container.Module.start(Module.java:449)
	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:468)
	at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:103)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:328)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:359)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:437)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:386)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:378)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
	at org.eclipse.ui.internal.services.WorkbenchServiceRegistry.getSourceProviders(WorkbenchServiceRegistry.java:175)
	at org.eclipse.ui.internal.services.SourceProviderService.readRegistry(SourceProviderService.java:108)
	at org.eclipse.ui.internal.Workbench$34.runWithException(Workbench.java:2377)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:32)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233)
	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:5410)
	at org.eclipse.ui.internal.StartupThreading.runWithoutExceptions(StartupThreading.java:95)
	at org.eclipse.ui.internal.Workbench.initializeDefaultServices(Workbench.java:2372)
	at org.eclipse.ui.internal.Workbench.init(Workbench.java:1645)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2858)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:671)
	... 17 more
Caused by: org.osgi.framework.BundleException: Exception in org.eclipse.jdt.core.JavaCore.start() of bundle org.eclipse.jdt.core.
	at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:795)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:724)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:933)
	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:309)
	at org.eclipse.osgi.container.Module.doStart(Module.java:581)
	at org.eclipse.osgi.container.Module.start(Module.java:449)
	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:468)
	at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:103)
	... 85 more
Caused by: org.eclipse.core.runtime.AssertionFailedException: null argument:
	at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
	at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
	at org.eclipse.core.internal.events.ResourceChangeListenerList.remove(ResourceChangeListenerList.java:146)
	at org.eclipse.core.internal.events.NotificationManager.removeListener(NotificationManager.java:313)
	at org.eclipse.core.internal.resources.Workspace.removeResourceChangeListener(Workspace.java:2206)
	at org.eclipse.jdt.internal.core.ExternalAnnotationTracker.shutdown(ExternalAnnotationTracker.java:132)
	at org.eclipse.jdt.internal.core.JavaModelManager.shutdown(JavaModelManager.java:5333)
	at org.eclipse.jdt.internal.core.JavaModelManager.startup(JavaModelManager.java:5309)
	at org.eclipse.jdt.core.JavaCore.start(JavaCore.java:5864)
	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:774)
	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:767)
	... 92 more
Comment 1 Andrey Loskutov CLA 2017-02-02 14:17:10 EST
Most likely die the bug 511593
Comment 2 Eclipse Genie CLA 2017-02-02 14:40:38 EST
New Gerrit change created: https://git.eclipse.org/r/90216
Comment 3 Stephan Herrmann CLA 2017-02-02 16:44:23 EST
(In reply to Eclipse Genie from comment #2)
> New Gerrit change created: https://git.eclipse.org/r/90216

Interesting. Are you saying, when JavaModelManager.startup() fails, we should be more robust during JavaModelManager.shutdown()?

But then, when startup() already failed, is there any value in reducing the mayhem the will invariably follow? What can we gain from that, JDT will not work in that state anyway, right?
Comment 4 Stephan Herrmann CLA 2017-02-02 16:48:37 EST
If we want to be "nice" in the broken state, what about a generic and more complete solution like:

   boolean started = false;
   startup() {
       ...
       started = true;
   }
   shutdown() {
       try {
           ...
       } catch (RuntimeException|Error e) {
           if (started)
                throw e;
           // otherwise we're broken anyway so just keep silent.
       }
   }
Comment 5 Sergey Prigogin CLA 2017-02-02 16:57:44 EST
(In reply to Stephan Herrmann from comment #4)
> If we want to be "nice" in the broken state, what about a generic and more
> complete solution like:
> 
>    boolean started = false;
>    startup() {
>        ...
>        started = true;
>    }
>    shutdown() {
>        try {
>            ...
>        } catch (RuntimeException|Error e) {
>            if (started)
>                 throw e;
>            // otherwise we're broken anyway so just keep silent.
>        }
>    }

Is the proposed code for ExternalAnnotationTracker or for JavaCore?
Comment 6 Stephan Herrmann CLA 2017-02-02 18:00:39 EST
(In reply to Sergey Prigogin from comment #5)
> (In reply to Stephan Herrmann from comment #4)
> > If we want to be "nice" in the broken state, what about a generic and more
> > complete solution like:
> > 
> >    boolean started = false;
> >    startup() {
> >        ...
> >        started = true;
> >    }
> >    shutdown() {
> >        try {
> >            ...
> >        } catch (RuntimeException|Error e) {
> >            if (started)
> >                 throw e;
> >            // otherwise we're broken anyway so just keep silent.
> >        }
> >    }
> 
> Is the proposed code for ExternalAnnotationTracker or for JavaCore?

At the time I was looking at JavaModelManager :)
Putting it into JavaCore would perhaps cover even more situations.
We could almost ask to put this into Equinox ...

"Why should X deal with the case where its stop() method is called although its start() method was never called due to Y exploding?" - for all pairs of X and Y.

But all this is only band-aids, right? We need to stop Y from exploding, right?
Comment 7 Sergey Prigogin CLA 2017-02-02 18:09:16 EST
(In reply to Stephan Herrmann from comment #6)
Yes, this is just to make sure that the initial exception shows up somewhere.
Comment 9 Stephan Herrmann CLA 2017-02-03 11:49:17 EST
(In reply to Eclipse Genie from comment #8)
> Gerrit change https://git.eclipse.org/r/90216 was merged to [master].
> Commit:
> http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/
> ?id=54727436a8683fd28e2a1bc40f789e809432974a

Stefan, can you please explain why you pushed this variant? Have you read any of the discussion that followed the proposal in gerrit?
Comment 10 Sergey Prigogin CLA 2017-02-03 11:56:18 EST
(In reply to Stephan Herrmann from comment #9)
The change https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=54727436a8683fd28e2a1bc40f789e809432974a does not preclude further improvements in JavaCore and JavaModelManager. It is just defensive coding protecting against an abnormal call sequence. It is a common practice used in shutdown methods of most plugins.
Comment 11 Thomas Watson CLA 2017-02-03 13:48:09 EST
What are the steps to reproduce this?  Are you suggesting eclipse build 4.7.0.I20170130-0600 freshly downloaded fails to bring up the workbench?
Comment 12 Sergey Prigogin CLA 2017-02-03 13:50:32 EST
(In reply to Thomas Watson from comment #11)
> What are the steps to reproduce this?  Are you suggesting eclipse build
> 4.7.0.I20170130-0600 freshly downloaded fails to bring up the workbench?

It happened only in one specific workspace, that unfortunately was not preserved for further investigation.
Comment 13 Stephan Herrmann CLA 2017-02-03 14:17:55 EST
(In reply to Sergey Prigogin from comment #10)
> (In reply to Stephan Herrmann from comment #9)
> The change
> https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/
> ?id=54727436a8683fd28e2a1bc40f789e809432974a does not preclude further
> improvements in JavaCore and JavaModelManager. It is just defensive coding
> protecting against an abnormal call sequence.

Thanks, but I did ask Stefan, because he was the one releasing the change, so it's his commit.

> It is a common practice used in shutdown methods of most plugins.

So, why not put the fix in the shutdown method of the plugin?

All I'm saying: the current change is done in the wrong location.
The contract should be clear that shutdown() can only ever happen, when previously start() was called.
Looking at the current code, we will later be very puzzled, what could make start() to fail so badly, that it fails to assign 'singleton' (it can't). 

If a caller violates the contract, then the caller must be fixed, not the callee.
Comment 14 Sergey Prigogin CLA 2017-02-03 14:36:29 EST
(In reply to Stephan Herrmann from comment #13)
> If a caller violates the contract, then the caller must be fixed, not the
> callee.
Who is at fault here in your opinion, JavaCore or JavaModelManager?
Comment 15 Stefan Xenos CLA 2017-02-07 20:45:15 EST
Re: comment 9

Sorry, I didn't follow the discussion. I pushed the patch because it looked safe and straight forward.

Do you want me to revert it while you and Sergey discuss the best approach to use here?
Comment 16 Markus Keller CLA 2017-02-09 06:33:44 EST
(In reply to Sergey Prigogin from comment #7)
> Yes, this is just to make sure that the initial exception shows up somewhere.

The end of JavaModelManager#startup() is this anti-pattern:

		} catch (RuntimeException e) {
			shutdown();
			throw e;
		}

When shutdown() is not trivially safe, this will lose the original exception. Fixed with http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=d4ac888fe2906afa87b92b83a041215d0c4c08c6


(In reply to Stephan Herrmann from comment #4)
>        } catch (RuntimeException|Error e) {

Error must not be caught, see its Javadoc and SafeRunner#run(ISafeRunnable)

I don't think there's anything to put in JavaCore or Equinox. It's only JavaModelManager that calls shutdown() in its startup() method. That has been added in http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=665fa70c145e3460af8c3efab89c50489feb17d0 , and I'm hesitant to change that.
Comment 17 Stephan Herrmann CLA 2017-02-09 15:29:51 EST
(In reply to Stefan Xenos from comment #15)
> Re: comment 9
> 
> Sorry, I didn't follow the discussion. I pushed the patch because it looked
> safe and straight forward.
> 
> Do you want me to revert it while you and Sergey discuss the best approach
> to use here?

In my understanding, by pushing a change a committer assumes responsibility. Who pushed the change and doesn't want to participate in the discussion about it?


(In reply to Markus Keller from comment #16)
> (In reply to Sergey Prigogin from comment #7)
> > Yes, this is just to make sure that the initial exception shows up somewhere.
> 
> The end of JavaModelManager#startup() is this anti-pattern:
> 
> 		} catch (RuntimeException e) {
> 			shutdown();
> 			throw e;
> 		}
> 
> When shutdown() is not trivially safe, this will lose the original
> exception. Fixed with
> http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=d4ac888fe2906afa87b92b83a041215d0c4c08c6

cool, thanks.

> (In reply to Stephan Herrmann from comment #4)
> >        } catch (RuntimeException|Error e) {
> 
> Error must not be caught, see its Javadoc and SafeRunner#run(ISafeRunnable)

I see. I over-generalized here.
 
> I don't think there's anything to put in JavaCore or Equinox. It's only
> JavaModelManager that calls shutdown() in its startup() method. That has
> been added in
> http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=665fa70c145e3460af8c3efab89c50489feb17d0
> , and I'm hesitant to change that.

Mh, that commit was done just for the sake of tests. Too bad it adds complexity that bites us in real life, but I understand your hesitation.

At face value, isn't commit d4ac888f sufficient as a full solution? IMHO, this essentially obsoletes the previous band-aid. Any one disagreeing?
Am I right in assuming that when JavaModelManager.startup() throws (and thus also JavaCore.start() does), that Equinox will not call JavaCore.stop() later?
Comment 18 Sergey Prigogin CLA 2017-02-09 15:52:04 EST
(In reply to Stephan Herrmann from comment #17)
> At face value, isn't commit d4ac888f sufficient as a full solution?

Even with http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=d4ac888fe2906afa87b92b83a041215d0c4c08c6 it is good to avoid an extra suppressed exception, isn't it?
Comment 19 Stefan Xenos CLA 2017-02-09 15:55:26 EST
> In my understanding, by pushing a change a committer assumes responsibility.
> Who pushed the change and doesn't want to participate in the discussion
> about it?

Accepting responsibility for the change and volunteering to participate in discussions about it are different things. I felt comfortable asserting that the change wouldn't cause any problems, I will happily take responsibility for the change and will revert or fix it if it causes any problems. But if I have to choose between keeping the change and spend time discussing it, I'd prefer to revert it.
Comment 20 Stephan Herrmann CLA 2017-02-09 16:23:50 EST
I'm aware the discussion has grown out of proportion (I admit I got started because the change was made in "my" code :) ), so I'll write my opinion one last time:

I seriously dislike carelessly adding checks all over the place. We had the discussion before. In many cases it just moves the problem to another place. Every check without an explanation how we may get there and with no "else" action will cause us spending valuable time later, puzzling about the implications.

Specifically, when reviewing any future change in this code, and when seeing that shutdown() expects singleton to be null, shouldn't a reviewer suggest adding similar checks to *every* access to this field? If so, what will be all those "else" actions??? What's the design behind this implementation? Why should shutdown() code against a different contract than all the other methods?

I'll let Stefan make his decision.
Comment 21 Eclipse Genie CLA 2017-02-09 16:37:54 EST
New Gerrit change created: https://git.eclipse.org/r/90780
Comment 22 Sergey Prigogin CLA 2017-02-09 16:39:16 EST
Stephan, would https://git.eclipse.org/r/90780 satisfy you?
Comment 23 Stephan Herrmann CLA 2017-02-09 16:44:08 EST
(In reply to Sergey Prigogin from comment #22)
> Stephan, would https://git.eclipse.org/r/90780 satisfy you?

- After commit d4ac888f I don't see any value in this check
+ The comment should prevent most of the negative consequences a la comment 20
We might call it a compromise then.
Comment 24 Eclipse Genie CLA 2020-01-31 03:27:37 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.