Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » e(fx)clipse 3.7 + eclipse 2020/12 + open jdk 11 : Exception raised
e(fx)clipse 3.7 + eclipse 2020/12 + open jdk 11 : Exception raised [message #1839900] Wed, 31 March 2021 13:22 Go to next message
smaoui asma is currently offline smaoui asmaFriend
Messages: 47
Registered: July 2009
Location: Paris Saclay, France
Member
Hello,

after succeeding in using JavaFx in Eclipse 2020/06 (with java8) thanks to e(fx)clipse 3.6 I am trying now to migrate my project to Eclipse 2020/12 (java 11) and e(fx)clipse 3.7.

I try to display an FXViewPart, a snippet of my main class using JavaFx

public class MainView extends FXViewPart {

private WebView browser;

@Override
protected Scene createFxScene() {
browser = new WebView();
WebEngine webEngine = browser.getEngine();
webEngine.setJavaScriptEnabled(true);
...
}


I followed this link https://openjfx.io/openjfx-docs/#IDE-Intellij I am using openjfx 11 and my java version is :

openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.8+10)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.21.0, JRE 11 Windows 10 amd64-64-Bit Compressed References 20200715_679 (JIT enabled, AOT enabled)
OpenJ9 - 34cf4c075
OMR - 113e54219
JCL - 95bb504fbb based on jdk-11.0.8+10)

when I run my eclipse runtime to test my project I got this error :
here are my vm arguments

-Dorg.osgi.framework.bundle.parent=ext

--module-path "C:\Users\Asma\Downloads\openjfx-11.0.2_windows-x64_bin-sdk2\javafx-sdk-11.0.2\lib"

--add-modules javafx.controls,javafx.fxml,javafx.graphics
-Dosgi.framework.extensions=org.eclipse.fx.osgi

-Dsun.net.http.allowRestrictedHeaders=true

-Defxclipse.osgi.hook.debug=true


FXClassLoader#collectModifications - Reads: []
FXClassLoader#collectModifications - Exports: [javafx.graphics/com.sun.javafx.scene=BUNDLE(@299)]
FXClassLoader#collectModifications - Opens: [javafx.graphics/javafx.scene=BUNDLE(@299)]
FXClassLoader#advancedModuleLayerBoostrap - Using advanced layer creation to apply patches
JavaModuleLayerModification#applyConfigurations - Exporting 'javafx.graphics/com.sun.javafx.scene=BUNDLE(@299)'
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.eclipse.fx.osgi.fxloader.jpms.ModuleLayerWrapper$ControllerWrapper.addExports(ModuleLayerWrapper.java:173)
at org.eclipse.fx.osgi.fxloader.jpms.JavaModuleLayerModification.applyConfigurations(JavaModuleLayerModification.java:110)
at org.eclipse.fx.osgi.fxloader.FXClassLoader.advancedModuleLayerBoostrap(FXClassLoader.java:483)
at org.eclipse.fx.osgi.fxloader.FXClassLoader.initModuleLayer(FXClassLoader.java:426)
at org.eclipse.fx.osgi.fxloader.FXClassLoader.getModuleLayer(FXClassLoader.java:293)
at org.eclipse.fx.osgi.fxloader.FXClassLoader.findClassJavaFX11(FXClassLoader.java:207)
at org.eclipse.fx.osgi.fxloader.FXClassLoader.postFindClass(FXClassLoader.java:144)
at org.eclipse.osgi.internal.loader.BundleLoader.searchHooks(BundleLoader.java:532)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:494)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:171)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1078)
at org.eclipse.osgi.internal.framework.ContextFinder.loadClass(ContextFinder.java:142)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1078)
at java.base/java.lang.Class.forNameImpl(Native Method)
at java.base/java.lang.Class.forName(Class.java:412)
at java.xml/javax.xml.transform.FactoryFinder.getProviderClass(FactoryFinder.java:111)
at java.xml/javax.xml.transform.FactoryFinder.newInstance(FactoryFinder.java:165)
at java.xml/javax.xml.transform.FactoryFinder.find(FactoryFinder.java:257)
at java.xml/javax.xml.transform.TransformerFactory.newInstance(TransformerFactory.java:126)
at org.eclipse.jdt.internal.corext.util.History.save(History.java:299)
at org.eclipse.jdt.internal.corext.util.History.save(History.java:194)
at org.eclipse.jdt.internal.ui.JavaPlugin.stop(JavaPlugin.java:553)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:871)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:734)
at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:863)
at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:1025)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:370)
at org.eclipse.osgi.container.Module.doStop(Module.java:660)
at org.eclipse.osgi.container.Module.stop(Module.java:521)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1886)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1761)
at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:275)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:202)
at org.eclipse.osgi.container.Module.doStop(Module.java:660)
at org.eclipse.osgi.container.Module.stop(Module.java:521)
at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:207)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:220)
at java.base/java.lang.Thread.run(Thread.java:836)
Caused by: java.lang.reflect.InvocationTargetException
at jdk.internal.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
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.fx.osgi.fxloader.jpms.ModuleLayerWrapper$ControllerWrapper.addExports(ModuleLayerWrapper.java:170)
... 38 more
Caused by: java.lang.IllegalArgumentException: module javafx.graphics not in layer
at java.base/java.lang.ModuleLayer$Controller.ensureInLayer(ModuleLayer.java:216)
at java.base/java.lang.ModuleLayer$Controller.addExports(ModuleLayer.java:268)
... 42 more
FXClassLoader#postFindClass - exception while loading java.lang.reflect.InvocationTargetException. Continue delegation by returning NULL
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.eclipse.fx.osgi.fxloader.jpms.ModuleLayerWrapper$ControllerWrapper.addExports(ModuleLayerWrapper.java:173)
at org.eclipse.fx.osgi.fxloader.jpms.JavaModuleLayerModification.applyConfigurations(JavaModuleLayerModification.java:110)
at org.eclipse.fx.osgi.fxloader.FXClassLoader.advancedModuleLayerBoostrap(FXClassLoader.java:483)
at org.eclipse.fx.osgi.fxloader.FXClassLoader.initModuleLayer(FXClassLoader.java:426)
at org.eclipse.fx.osgi.fxloader.FXClassLoader.getModuleLayer(FXClassLoader.java:293)
at org.eclipse.fx.osgi.fxloader.FXClassLoader.findClassJavaFX11(FXClassLoader.java:207)
at org.eclipse.fx.osgi.fxloader.FXClassLoader.postFindClass(FXClassLoader.java:144)
at org.eclipse.osgi.internal.loader.BundleLoader.searchHooks(BundleLoader.java:532)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:494)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:171)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1078)
at org.eclipse.osgi.internal.framework.ContextFinder.loadClass(ContextFinder.java:142)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1078)
at java.base/java.lang.Class.forNameImpl(Native Method)
at java.base/java.lang.Class.forName(Class.java:412)
at java.xml/javax.xml.transform.FactoryFinder.getProviderClass(FactoryFinder.java:111)
at java.xml/javax.xml.transform.FactoryFinder.newInstance(FactoryFinder.java:165)
at java.xml/javax.xml.transform.FactoryFinder.find(FactoryFinder.java:257)
at java.xml/javax.xml.transform.TransformerFactory.newInstance(TransformerFactory.java:126)
at org.eclipse.jdt.internal.corext.util.History.save(History.java:299)
at org.eclipse.jdt.internal.corext.util.History.save(History.java:194)
at org.eclipse.jdt.internal.ui.JavaPlugin.stop(JavaPlugin.java:553)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:871)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:734)
at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:863)
at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:1025)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:370)
at org.eclipse.osgi.container.Module.doStop(Module.java:660)
at org.eclipse.osgi.container.Module.stop(Module.java:521)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1886)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1761)
at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:275)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:202)
at org.eclipse.osgi.container.Module.doStop(Module.java:660)
at org.eclipse.osgi.container.Module.stop(Module.java:521)
at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:207)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:220)
at java.base/java.lang.Thread.run(Thread.java:836)
Caused by: java.lang.reflect.InvocationTargetException
at jdk.internal.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
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.fx.osgi.fxloader.jpms.ModuleLayerWrapper$ControllerWrapper.addExports(ModuleLayerWrapper.java:170)
... 38 more
Caused by: java.lang.IllegalArgumentException: module javafx.graphics not in layer
at java.base/java.lang.ModuleLayer$Controller.ensureInLayer(ModuleLayer.java:216)
at java.base/java.lang.ModuleLayer$Controller.addExports(ModuleLayer.java:268)
... 42 more


Thanks a lot !
Re: e(fx)clipse 3.7 + eclipse 2020/12 + open jdk 11 : Exception raised [message #1840108 is a reply to message #1839900] Tue, 06 April 2021 22:50 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6593
Registered: July 2009
Senior Member
Please take a look at https://tomsondev.bestsolution.at/2020/01/28/setting-up-efxclipse-rcp-development-for-java11-and-pde/ how to set up your IDE - I know this is for pure JavaFX. Afterwards take a look at the other GEF-Thread in this forum there I provided a PR against a repo which solves the SWT integration problems
Re: e(fx)clipse 3.7 + eclipse 2020/12 + open jdk 11 : Exception raised [message #1840388 is a reply to message #1840108] Tue, 13 April 2021 20:55 Go to previous message
Stéphane  ournier is currently offline Stéphane ournierFriend
Messages: 315
Registered: July 2009
Senior Member
Hi,
I noticed EFX runtime 3.7 (when released) was built against Eclipse platform 2019/12 package. In another post, you explained it is time consuming to follow all Eclipse platform with a lot of non regression tests to run and API to manage etc...
Nevertheless, would it be possible to use EFX 3.7 runtime with 2020/06 or more recent platforms compiled against java11 please ? Or we have to wait for 3.8 version later on.

Many thanks
Previous Topic:GEF5 with e4 RCP and Tycho
Next Topic:openjdk 11, openjfx, eclipse rcp 2018-12
Goto Forum:
  


Current Time: Fri May 14 11:41:11 GMT 2021

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

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

Back to the top