Bug 566699 - java.lang.ClassNotFoundException: org.eclipse.e4.ui.workbench.renderers.swt.cocoa.FullscreenWindowHandler
Summary: java.lang.ClassNotFoundException: org.eclipse.e4.ui.workbench.renderers.swt.c...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.17   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-05 11:30 EDT by Phil Beauvoir CLA
Modified: 2022-06-22 14:26 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Beauvoir CLA 2020-09-05 11:30:06 EDT
Testing our Eclipse RCP application against Eclipse 4.17 RC2 as target results in this error on each launch.

!ENTRY org.eclipse.e4.ui.workbench 4 0 2020-09-05 16:24:29.197
!MESSAGE Unable to load class 'org.eclipse.e4.ui.workbench.renderers.swt.cocoa.FullscreenWindowHandler' from bundle '87'
!STACK 0
java.lang.ClassNotFoundException: org.eclipse.e4.ui.workbench.renderers.swt.cocoa.FullscreenWindowHandler cannot be found by org.eclipse.e4.ui.workbench.renderers.swt_0.14.1300.v20200829-1411
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:516)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:171)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:616)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:89)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:60)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:42)
	at org.eclipse.e4.ui.internal.workbench.addons.HandlerProcessingAddon.processActiveHandler(HandlerProcessingAddon.java:145)
	at org.eclipse.e4.ui.internal.workbench.addons.HandlerProcessingAddon.postConstruct(HandlerProcessingAddon.java:55)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:999)
	at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:140)
	at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:405)
	at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:346)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:227)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:94)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:60)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:37)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:289)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:573)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:153)
	at com.archimatetool.editor.Application.start(Application.java:84)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	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:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
Comment 1 Phil Beauvoir CLA 2020-09-05 12:06:39 EDT
MacOS 10.15.6
Comment 2 Phil Beauvoir CLA 2020-09-05 12:21:03 EDT
A reference to this is stored in the workbench.xmi file. Deleting that file and restarting eliminated the problem.
Comment 3 Rolf Theunissen CLA 2020-09-11 10:18:38 EDT
This is a exact duplicate of Bug 561602, which is marked duplicate of Bug 513614, which should have been fixed but apparently something is missed there.
Comment 4 Lars Vogel CLA 2020-09-11 10:27:04 EDT
(In reply to Rolf Theunissen from comment #3)
> This is a exact duplicate of Bug 561602, which is marked duplicate of Bug
> 513614, which should have been fixed but apparently something is missed
> there.

The removal happens after the first startup, so one time we should see this exception for an older workspace.
Comment 5 Phil Beauvoir CLA 2020-09-11 11:02:56 EDT
(In reply to Lars Vogel from comment #4)
> The removal happens after the first startup, so one time we should see this
> exception for an older workspace.

The removal is not happening in our RCP application. Each time the app is launched this entry remains in workbench.xmi:

<handlers xmi:id="_BBr1sPIHEeqiGurj6hI96Q" elementId="org.eclipse.e4.ui.workbench.renderers.swt.cocoa.FullscreenWindowHandler" contributorURI="platform:/fragment/org.eclipse.e4.ui.workbench.renderers.swt.cocoa" contributionURI="bundleclass://org.eclipse.e4.ui.workbench.renderers.swt/org.eclipse.e4.ui.workbench.renderers.swt.cocoa.FullscreenWindowHandler" command="_BBrOofIHEeqiGurj6hI96Q"/>
Comment 6 Lars Vogel CLA 2020-09-11 11:46:34 EDT
Is the ModelCleanupAddon which does the cleanup part of your RCP runtime? (use model spy to check).
Comment 7 Phil Beauvoir CLA 2020-09-11 12:04:33 EDT
(In reply to Lars Vogel from comment #6)
> Is the ModelCleanupAddon which does the cleanup part of your RCP runtime?
> (use model spy to check).

The RCP app is old school and does not use an e4 application model so no model spy.
Comment 8 Phil Beauvoir CLA 2020-09-11 13:41:57 EDT
(In reply to Phil Beauvoir from comment #7)
> (In reply to Lars Vogel from comment #6)
> > Is the ModelCleanupAddon which does the cleanup part of your RCP runtime?
> > (use model spy to check).
> 
> The RCP app is old school and does not use an e4 application model so no
> model spy.

It looks like that in order to have ModelCleanupAddon as part of an RCP app one needs to include org.eclipse.ui.ide.application, which has a dependency on org.eclipse.ui.ide and other IDE type plug-ins. This is not an option for us as those things are not relevant to our app.
Comment 9 Lars Vogel CLA 2020-09-11 14:44:05 EDT
(In reply to Phil Beauvoir from comment #7)
> (In reply to Lars Vogel from comment #6)
> > Is the ModelCleanupAddon which does the cleanup part of your RCP runtime?
> > (use model spy to check).
> 
> The RCP app is old school and does not use an e4 application model so no
> model spy.

Every RCP which uses 4.x has a runtime application model. Add the spy and see for yourself.

If you cannot reuse our app, you need to copy the add-on and register with your app.
Comment 10 Phil Beauvoir CLA 2020-09-21 09:57:38 EDT
(In reply to Lars Vogel from comment #6)
> Is the ModelCleanupAddon which does the cleanup part of your RCP runtime?
> (use model spy to check).

No it's not part of our RCP runtime.

As an experiment, I added the org.eclipse.ui.ide.application plugin to my launch config which in turn required org.eclipse.ui.ide and a few other dependencies. This cleared the exception as reported in the OP but unfortunately populated our RCP appplication with IDE features which we don't require. So this option is not possible.

Is there a way to use ModelCleanupAddon without all these IDE dependencies?
Comment 11 Lars Vogel CLA 2020-09-21 10:04:07 EDT
(In reply to Phil Beauvoir from comment #10)
> (In reply to Lars Vogel from comment #6)
> > Is the ModelCleanupAddon which does the cleanup part of your RCP runtime?
> > (use model spy to check).
> 
> No it's not part of our RCP runtime.
> 
> As an experiment, I added the org.eclipse.ui.ide.application plugin to my
> launch config which in turn required org.eclipse.ui.ide and a few other
> dependencies. This cleared the exception as reported in the OP but
> unfortunately populated our RCP appplication with IDE features which we
> don't require. So this option is not possible.
> 
> Is there a way to use ModelCleanupAddon without all these IDE dependencies?

Copy & paste in into one of your plugin. It is not very big.
Comment 12 Phil Beauvoir CLA 2020-09-21 10:16:58 EDT
(In reply to Lars Vogel from comment #11)
> (In reply to Phil Beauvoir from comment #10)
> > (In reply to Lars Vogel from comment #6)
> > > Is the ModelCleanupAddon which does the cleanup part of your RCP runtime?
> > > (use model spy to check).
> > 
> > No it's not part of our RCP runtime.
> > 
> > As an experiment, I added the org.eclipse.ui.ide.application plugin to my
> > launch config which in turn required org.eclipse.ui.ide and a few other
> > dependencies. This cleared the exception as reported in the OP but
> > unfortunately populated our RCP appplication with IDE features which we
> > don't require. So this option is not possible.
> > 
> > Is there a way to use ModelCleanupAddon without all these IDE dependencies?
> 
> Copy & paste in into one of your plugin. It is not very big.

Thanks for the advice, Lars, but the dependencies of ModelCleanupAddon are quite significant. I shall ask our users to manually delete workbench.xmi.
Comment 13 Kevin Grigorenko CLA 2022-06-22 14:26:54 EDT
(In reply to Lars Vogel from comment #6)
> Is the ModelCleanupAddon which does the cleanup part of your RCP runtime?

I'm facing this issue too. How do I add this? I upgraded to Eclipse 2022-06 for RCP and RAP Developers. My product launches with features and has the following. I couldn't find the feature that has ModleCleanupAddon.

   <features>
      <!-- [... my features ...] -->
      <feature id="org.eclipse.rcp"/>
      <feature id="org.eclipse.equinox.p2.user.ui"/>
      <feature id="org.eclipse.help" installMode="root"/>
      <feature id="org.eclipse.emf.ecore" installMode="root"/>
      <feature id="org.eclipse.equinox.p2.extras.feature" installMode="root"/>
      <feature id="org.eclipse.ecf.filetransfer.httpclient5.feature" installMode="root"/>
      <feature id="org.eclipse.emf.common" installMode="root"/>
      <feature id="org.eclipse.equinox.p2.core.feature" installMode="root"/>
      <feature id="org.eclipse.ecf.core.feature" installMode="root"/>
      <feature id="org.eclipse.equinox.p2.rcp.feature" installMode="root"/>
      <feature id="org.eclipse.ecf.filetransfer.feature" installMode="root"/>
      <feature id="org.eclipse.ecf.core.ssl.feature" installMode="root"/>
      <feature id="org.eclipse.ecf.filetransfer.ssl.feature" installMode="root"/>
      <feature id="org.eclipse.e4.rcp" installMode="root"/>
      <feature id="org.eclipse.platform" installMode="root"/>
   </features>