Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java 11: Scenicview with efxclipse don't work (NoClassDefFoundError: javafx/scene/Node) #412

Open
ShawnKleese opened this issue Jun 23, 2020 · 2 comments

Comments

@ShawnKleese
Copy link
Contributor

When i start Scenicview for Java11 to inspect a efxclipse RCP-App i'am getting this error in the console of my RCP-App.

Looks for some OSGI and JPMS Problems. Any Idea ?

Launching agent server on:7559:7558:2184:true Exception in thread "Attach Listener" java.lang.reflect.InvocationTargetException 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 java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:513) at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallAgentmain(InstrumentationImpl.java:535) Caused by: java.lang.NoClassDefFoundError: javafx/scene/Node at org.fxconnector.remote.RuntimeAttach.init(RuntimeAttach.java:85) at org.fxconnector.remote.RuntimeAttach.agentmain(RuntimeAttach.java:58) ... 6 more Caused by: java.lang.ClassNotFoundException: javafx.scene.Node at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ... 8 more

@ShawnKleese
Copy link
Contributor Author

The problem is that the InstrumentationImpl-Class uses

ClassLoader classLoader = ClassLoader.getSystemClassLoader(); Class c = classLoader.loadClass( ..., ...);

But the SystemClassloader does not know any of the openjfx classes..

I've looked in the fx.osgi-Module, if there is maybe some equal Problem solved...

One possibility could be to overwrite the systemclassloader with -Djava.system.class.loader=com.test.MyClassLoader Parameter.
(But i think this is ugly :-/ )

@tomsontom: Do you have another Idea ?

@tomsontom
Copy link
Contributor

I need to give this a spin before I can give any advice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants