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

Errors using scenic-view for JavaFX application in JPMS layer #84

Open
PavelTurk opened this issue May 7, 2024 · 0 comments
Open

Errors using scenic-view for JavaFX application in JPMS layer #84

PavelTurk opened this issue May 7, 2024 · 0 comments

Comments

@PavelTurk
Copy link

For all programs we use a JPMS framework that creates a JPMS layer for every component. So, we have framework in boot layer and in one child layer we have a component with JavaFX modules, our JavaFX application etc.

Now I want to use scenic-view with our JavaFX application. I downloaded scenic-view for linux, added x permission to java and scenicView files and run it. After that I started our program (JPMS framework + JavaFX application in child JPMS layer). This is what I have:

from scenicView:

Platform running
Launching ScenicView v21.0.1
Startup done
Creating server
Server done
Number of running Java applications found: 2
Obtaining properties for Java application with PID:10273
0 JavaFX applications found
Loading agent from: /home/pavel/Programs/scenicview/lib/scenicview.jar
com.sun.tools.attach.AgentInitializationException: Agent JAR loaded but agent failed to initialize
	at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.loadAgent(Unknown Source)
	at org.scenicview.scenicview/org.fxconnector.remote.RemoteConnectorImpl.loadAgent(Unknown Source)
	at org.scenicview.scenicview/org.fxconnector.remote.RemoteConnectorImpl$3.run(Unknown Source)

from JPMS program:

Starting component xxxxx-1.0.0 Exception in thread "Attach Listener" java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:560)
	at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallAgentmain(InstrumentationImpl.java:582)
Caused by: java.lang.NoClassDefFoundError: javafx/collections/ListChangeListener
	at org.fxconnector.remote.RuntimeAttach.init(RuntimeAttach.java:85)
	at org.fxconnector.remote.RuntimeAttach.agentmain(RuntimeAttach.java:58)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	... 3 more
Caused by: java.lang.ClassNotFoundException: javafx.collections.ListChangeListener
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
	... 6 more
*** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with message Outstanding error when calling method in invokeJavaAgentMainMethod at open/src/java.instrument/share/native/libinstrument/JPLISAgent.c line: 627
*** java.lang.instrument ASSERTION FAILED ***: "success" with message invokeJavaAgentMainMethod failed at open/src/java.instrument/share/native/libinstrument/JPLISAgent.c line: 466
*** java.lang.instrument ASSERTION FAILED ***: "success" with message startJavaAgent failed at open/src/java.instrument/share/native/libinstrument/InvocationAdapter.c line: 444
Agent failed to start!

Could anyone say how it can be fixed?

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

1 participant