Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 413216

Summary: Plug-in contributed an invalid Menu Extension (org.eclipse.ui.projectConfigure)
Product: [Eclipse Project] Platform Reporter: Konstantin Komissarchik <konstantin>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: alex.blewitt, BMarkmann, corozcoc, fchen0000, loskutov, mciobanu, pwebster, ram.venkataswamy, ruediger.herrmann, timothy.jones
Version: 4.4   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description Konstantin Komissarchik CLA 2013-07-17 21:47:28 EDT
We are seeing the following log messages intermittently and only on Linux after right clicking on a project in the project explorer.

Plug-in 'org.eclipse.wst.jsdt.ui' contributed an invalid Menu Extension 
(Path: 'org.eclipse.ui.projectConfigure' is invalid): 
org.eclipse.wst.jsdt.ui.internal.convertProjects 

Plug-in 'org.eclipse.pde.ui' contributed an invalid Menu Extension (Path: 
'org.eclipse.ui.projectConfigure' is invalid): 
org.eclipse.pde.ui.ConvertedProjectWizard 

Plug-in 'org.eclipse.wst.jsdt.ui' contributed an invalid Menu Extension 
(Path: 'org.eclipse.ui.projectConfigure' is invalid): 
org.eclipse.wst.jsdt.ui.internal.convertProjects
Comment 1 Paul Webster CLA 2013-07-22 14:31:54 EDT
This could happen if your product doesn't include the org.eclipse.ui.ide.application plugin.

PW
Comment 2 Konstantin Komissarchik CLA 2013-07-22 14:36:25 EDT
The org.eclipse.ui.ide.application bundle is present. Note that this is seen intermittently and only on Linux. The problem is not seen on Windows.
Comment 3 Paul Webster CLA 2013-07-22 15:04:17 EDT
is it 64 bit eclipse?  Is it with on of the EPP packages or are there more features installed?

PW
Comment 4 Konstantin Komissarchik CLA 2013-07-22 15:14:53 EDT
The issue was seen with 64-bit Eclipse on Linux. Both when using Oracle custom Eclipse distro and when installing Oracle Enterprise Pack for Eclipse in the standard Kepler Java EE distro. Note that our plugin pack includes Spring IDE and PyDev. May be worth testing in presence of those two.
Comment 5 Andrey Loskutov CLA 2013-08-19 04:10:11 EDT
In our 3.7.2 based application on 64 bit Linux we see similar errors but with different menus (Plug-in '_plugin_id_' contributed an invalid Menu Extension (Path: '_existing_path_' is invalid): _action_id_).

Could it be that the bug exists since 3.x stream and that this is a generic problem with actions contributed to the menu entries defined in *other* plugins?

E.g. 
 * plugin "plugin1" defines the *menu* "menu/path" via org.eclipse.ui.actionSets extension point.
 * plugin "plugin2" defines some *action* via same extension point and points in the action "menubarPath" attribute to the "menu/path" from "plugin1".
 * CustomizePerspectiveDialog tries to mimic some workbench code in buildMenusAndToolbarsFor() but does not consider that the action set from plugin2 requires menu contributions from plugin1.

Except the error reported by 

CustomizePerspectiveDialog.buildMenusAndToolbarsFor() -> PluginActionSetBuilder$ActionSetContribution(PluginActionBuilder$BasicContribution).contributeMenuAction(ActionDescriptor, IMenuManager, boolean) line: 361

everything is fine, and actions are perfectly contributed to menus.

On Eclipse 3.7.2 the stack trace is:

Thread [main] (Suspended)	
	PluginActionSetBuilder$ActionSetContribution(PluginActionBuilder$BasicContribution).contributeMenuAction(ActionDescriptor, IMenuManager, boolean) line: 361	
	PluginActionSetBuilder$ActionSetContribution.contribute(IActionBars, boolean, boolean) line: 372	
	PluginActionSetBuilder.buildMenuAndToolBarStructure(PluginActionSet, IWorkbenchWindow) line: 99	
	CustomizePerspectiveDialog.buildMenusAndToolbarsFor(CustomizePerspectiveDialog$CustomizeActionBars, ActionSetDescriptor) line: 2663	
	CustomizePerspectiveDialog.loadMenuAndToolbarStructure() line: 2615	
	CustomizePerspectiveDialog.<init>(IWorkbenchWindowConfigurer, Perspective) line: 1446	
	WorkbenchWindow.createCustomizePerspectiveDialog(Perspective) line: 4056	
	WorkbenchPage.editActionSets() line: 1954	
	EditActionSetsHandler.execute(ExecutionEvent) line: 41	
	HandlerProxy.execute(ExecutionEvent) line: 293	
	Command.executeWithChecks(ExecutionEvent) line: 476	
	ParameterizedCommand.executeWithChecks(Object, Object) line: 508	
	HandlerService.executeCommand(ParameterizedCommand, Event) line: 169	
	SlaveHandlerService.executeCommand(ParameterizedCommand, Event) line: 241	
	ActionFactory$WorkbenchCommandAction(CommandAction).runWithEvent(Event) line: 157	
	ActionContributionItem.handleWidgetSelection(Event, boolean) line: 584	
	ActionContributionItem.access$2(ActionContributionItem, Event, boolean) line: 501	
	ActionContributionItem$5.handleEvent(Event) line: 411	
	EventTable.sendEvent(Event) line: 84	
	MenuItem(Widget).sendEvent(Event) line: 1258	
	Display.runDeferredEvents() line: 3591	
	Display.readAndDispatch() line: 3212	
	Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 2701	
	Workbench.runUI() line: 2665	
	Workbench.access$4(Workbench) line: 2499	
	Workbench$7.run() line: 679	
	Realm.runWithDefault(Realm, Runnable) line: 332	
	Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 668	
	PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149	
	IDEApplication.start(IApplicationContext) line: 123	
	EclipseAppHandle.run(Object) line: 196	
	EclipseAppLauncher.runApplication(Object) line: 110	
	EclipseAppLauncher.start(Object) line: 79	
	EclipseStarter.run(Object) line: 344	
	EclipseStarter.run(String[], Runnable) line: 179	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 57	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43	
	Method.invoke(Object, Object...) line: 601	
	Main.invokeFramework(String[], URL[]) line: 622	
	Main.basicRun(String[]) line: 577	
	Main.run(String[]) line: 1410	
	Main.main(String[]) line: 1386
Comment 6 Paul Webster CLA 2013-08-20 08:55:23 EDT
(In reply to comment #5)
> In our 3.7.2 based application on 64 bit Linux we see similar errors but
> with different menus (Plug-in '_plugin_id_' contributed an invalid Menu
> Extension (Path: '_existing_path_' is invalid): _action_id_).
> 
> Could it be that the bug exists since 3.x stream and that this is a generic
> problem with actions contributed to the menu entries defined in *other*
> plugins?

In 3.7.2 those errors correctly identify that you have a plugin B that contributes to something defined in plugin A and plugin A is not included.

In Kepler there's something else going on, as in Konstantin's example the plugin that contributes org.eclipse.ui.projectConfigure is in his runtime configuration.

PW
Comment 7 Andrey Loskutov CLA 2013-08-20 09:56:01 EDT
(In reply to comment #6)
> In 3.7.2 those errors correctly identify that you have a plugin B that
> contributes to something defined in plugin A and plugin A is not included.
> In Kepler there's something else going on, as in Konstantin's example the
> plugin that contributes org.eclipse.ui.projectConfigure is in his runtime
> configuration.

A *is* included and activated in my 3.7.2 case, therefore I think this could be same issue?
Comment 8 Paul Webster CLA 2013-08-20 10:01:53 EDT
(In reply to comment #7)
> 
> A *is* included and activated in my 3.7.2 case, therefore I think this could
> be same issue?

Ah, OK.  It would be the same problem with a different underlying cause, since the mechanisms involved changed between 3.8 and 4.2

PW
Comment 9 William Markmann CLA 2014-05-21 14:09:06 EDT
For some reason that's not clear to me, upgrading from JDK 1.7.0_21 to 1.7.0_55 resolved this issue for me (the symptoms described by Konstantin were exactly what I was seeing).
Comment 10 Alex Blewitt CLA 2014-07-24 06:40:07 EDT
I see this message on 4.4 on Windows when launching a run-time Eclipse application when the containing Eclipse instance has the JSDT installed, and the 'all plugins and features' option is selected.
Comment 11 Feng Chen CLA 2015-10-19 12:09:27 EDT
I can confirm that after I switched JDK from 1.7.0_71 to 1.8.0.0_40 the issue is gone.

(In reply to William Markmann from comment #9)
> For some reason that's not clear to me, upgrading from JDK 1.7.0_21 to
> 1.7.0_55 resolved this issue for me (the symptoms described by Konstantin
> were exactly what I was seeing).
Comment 12 Eclipse Genie CLA 2020-07-26 13:47:16 EDT
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.