Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Eclipse RCP and Java 9 results in NoClassDefFoundError
Eclipse RCP and Java 9 results in NoClassDefFoundError [message #1775136] Wed, 25 October 2017 08:18 Go to next message
Mihael Schmidt is currently offline Mihael SchmidtFriend
Messages: 81
Registered: August 2010
Member
Hi,

i got a pure e4 RCP application and when using the latest Java 9 (9.0.1+11) i get the following error:

!ENTRY org.eclipse.osgi 4 0 2017-10-25 09:39:04.204
!MESSAGE Application error
!STACK 1
java.lang.NoClassDefFoundError: org/w3c/dom/stylesheets/StyleSheet
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.initializeStyling(PartRenderingEngine.java:1330)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1036)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:164)
	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:380)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
	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:564)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
Caused by: java.lang.ClassNotFoundException: org.w3c.dom.stylesheets.StyleSheet cannot be found by org.eclipse.e4.ui.css.core_0.10.100.v20140424-2042
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:432)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:345)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:337)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
	... 19 more


The application is based on Eclipse 4.4.

I tried using the approach from the Eclipse wiki ( https://wiki.eclipse.org/Configure_Eclipse_for_Java_9 ) but that didn't work.

My ini looks like this:

--launcher.GTK_version
2
--launcher.appendVmargs
-vm
/opt/jdk9/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.8
--add-modules=ALL-SYSTEM


Any help is much appreciated.

Mihael
Re: Eclipse RCP and Java 9 results in NoClassDefFoundError [message #1776090 is a reply to message #1775136] Fri, 10 November 2017 15:05 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 772
Registered: January 2012
Senior Member

It looks like org.w3c.dom.stylesheets.StyleSheet is not included in Java 9.

Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Re: Eclipse RCP and Java 9 results in NoClassDefFoundError [message #1776095 is a reply to message #1776090] Fri, 10 November 2017 15:17 Go to previous messageGo to next message
Mihael Schmidt is currently offline Mihael SchmidtFriend
Messages: 81
Registered: August 2010
Member
Is there a best practice workaround for this?
Re: Eclipse RCP and Java 9 results in NoClassDefFoundError [message #1776134 is a reply to message #1776095] Mon, 13 November 2017 03:39 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 772
Registered: January 2012
Senior Member

Update to a more recent version of the Eclipse Platform: Oxygen 4.7.1a was just released with support for Java 9.
Alternatively, ship with your own JRE so that your app installation is independent of what ever the user has installed.

Brian.


Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Re: Eclipse RCP and Java 9 results in NoClassDefFoundError [message #1776144 is a reply to message #1776134] Mon, 13 November 2017 07:04 Go to previous message
Mihael Schmidt is currently offline Mihael SchmidtFriend
Messages: 81
Registered: August 2010
Member
Hmmm... that is no small and easy workaround.
Previous Topic:P2 site
Next Topic:Eclipse 4.7 and Tycho
Goto Forum:
  


Current Time: Wed Sep 19 21:23:01 GMT 2018

Powered by FUDForum. Page generated in 0.02029 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top