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

JavaFX11 incompatible fxconnector version in jar from scenicview-linux.zip #54

Open
wirew0rm opened this issue Aug 15, 2019 · 1 comment

Comments

@wirew0rm
Copy link

I'm trying to run the jar from the package linked in the README.md using javafx-sdk-12.0.1 and openjdk 11.0.4 2019-07-16 LTS but it is stuck on the "scanning for javaFX applications" screen and spamming NoSuchMethodError Exceptions in the background. It seems like this is allready fixed in 59264de:

https://github.com/JonathanGiles/scenic-view/blob/master/src/main/java/org/fxconnector/remote/RuntimeAttach.java#L138

It seems like the wrong org.fxconnector component was bundled into the release jar.

This is the error message I get when running scenic-view:

# /usr/lib/jvm/java/bin/java --module-path javafx-sdk-12.0.1/lib/ --add-modules javafx.web,javafx.fxml,javafx.swing -jar scenicview/lib/scenicview.jar
[...]
java.rmi.ServerError: Error occurred in server thread; nested exception is: 
	java.lang.NoSuchMethodError: 'java.util.Iterator javafx.stage.Window.impl_getWindows()'
	at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:388)
	at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
	at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:562)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:796)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:677)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
	at java.rmi/sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:283)
	at java.rmi/sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:260)
	at java.rmi/sun.rmi.server.UnicastRef.invoke(UnicastRef.java:161)
	at java.rmi/java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:209)
	at java.rmi/java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:161)
	at org.fxconnector.remote.$Proxy6.getStageIDs(Unknown Source)
	at org.fxconnector.remote.RemoteConnectorImpl.lambda$onAgentStarted$1(RemoteConnectorImpl.java:103)
	at org.fxconnector.remote.RMIUtils$2.run(RMIUtils.java:113)
Caused by: java.lang.NoSuchMethodError: 'java.util.Iterator javafx.stage.Window.impl_getWindows()'
	at org.fxconnector.remote.RuntimeAttach$1.getStageIDs(RuntimeAttach.java:138)
	at org.fxconnector.remote.RemoteApplicationImpl.getStageIDs(RemoteApplicationImpl.java:108)
	at jdk.internal.reflect.GeneratedMethodAccessor3.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 java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:359)
	at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
	at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:562)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:796)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:677)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
@danielfriederich
Copy link

I did run into the same issue. But it turns out my issue was actually due to my javafx app not having the javafx.swing module
Once I did add that, the official linux scenicView started to show the tree.
More concretely (and specific to my debug setup), I did append ,javafx.swing in the --add-modules launch option

--add-modules javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.web,javafx.swing

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