JonathanGiles / scenic-view

Scenic View is a JavaFX application designed to make it simple to understand the current state of your application scenegraph, and to also easily manipulate properties of the scenegraph without having to keep editing your code. This lets you find bugs, and get things pixel perfect without having to do the compile-check-compile dance.
GNU General Public License v3.0
536 stars 68 forks source link

Exception at startup #22

Open JonathanGiles opened 9 years ago

JonathanGiles commented 9 years ago

Original report by Thomas (Bitbucket: UncleInf, GitHub: UncleInf).


Exception at startup running with java 1.8 45 x64 on linux, kubuntu 15.04

#!java

java.lang.IllegalArgumentException: URI is not absolute
        at java.net.URI.toURL(URI.java:1088)
        at org.scenicview.model.attach.AttachHandlerFactory.addToolsJarToClasspath(AttachHandlerFactory.java:212)
        at org.scenicview.model.attach.AttachHandlerFactory.initAttachAPI(AttachHandlerFactory.java:91)
        at org.scenicview.ScenicView.start(ScenicView.java:160)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$159(LauncherImpl.java:863)
        at com.sun.javafx.application.LauncherImpl$$Lambda$58/1556304290.run(Unknown Source)
        at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$172(PlatformImpl.java:326)
        at com.sun.javafx.application.PlatformImpl$$Lambda$50/1766822961.run(Unknown Source)
        at com.sun.javafx.application.PlatformImpl.lambda$null$170(PlatformImpl.java:295)
        at com.sun.javafx.application.PlatformImpl$$Lambda$53/1773778632.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(PlatformImpl.java:294)
        at com.sun.javafx.application.PlatformImpl$$Lambda$51/1496724653.run(Unknown Source)
        at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
        at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
        at com.sun.glass.ui.gtk.GtkApplication.lambda$null$48(GtkApplication.java:139)
        at com.sun.glass.ui.gtk.GtkApplication$$Lambda$41/1364335809.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:745)
Platform running
Launching ScenicView v8.0.0
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 14: reading configurations from ~/.fonts.conf is deprecated. please move it to /home/thomas/.config/fontconfig/fonts.conf manually
Startup done
Creating server
Exception in Application start method
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
        at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Exception in Application start method
        at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$152(LauncherImpl.java:182)
        at com.sun.javafx.application.LauncherImpl$$Lambda$55/1031980531.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: com/sun/tools/attach/AttachNotSupportedException
        at org.fxconnector.remote.FXConnectorFactory.getConnector(FXConnectorFactory.java:32)
        at org.scenicview.ScenicView.start(ScenicView.java:188)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$159(LauncherImpl.java:863)
        at com.sun.javafx.application.LauncherImpl$$Lambda$58/1556304290.run(Unknown Source)
        at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$172(PlatformImpl.java:326)
        at com.sun.javafx.application.PlatformImpl$$Lambda$50/1766822961.run(Unknown Source)
        at com.sun.javafx.application.PlatformImpl.lambda$null$170(PlatformImpl.java:295)
        at com.sun.javafx.application.PlatformImpl$$Lambda$53/1773778632.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(PlatformImpl.java:294)
        at com.sun.javafx.application.PlatformImpl$$Lambda$51/1496724653.run(Unknown Source)
        at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
        at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
        at com.sun.glass.ui.gtk.GtkApplication.lambda$null$48(GtkApplication.java:139)
        at com.sun.glass.ui.gtk.GtkApplication$$Lambda$41/1364335809.run(Unknown Source)
        ... 1 more
Caused by: java.lang.ClassNotFoundException: com.sun.tools.attach.AttachNotSupportedException
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 16 more
Exception running application org.scenicview.ScenicView
#!java

java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
JonathanGiles commented 6 years ago

Original comment by Jiří Vlašimský (Bitbucket: jiriik, GitHub: jiriik).


Thank you @mquirin ! ;)

JonathanGiles commented 7 years ago

Original comment by noshio (Bitbucket: noshio, GitHub: noshio).


Confirmed OK in ubuntu 17.04.

Many Thanks Michael Quirin.

JonathanGiles commented 7 years ago

Original comment by Daniel Bathke (Bitbucket: danielbathke-fm, GitHub: Unknown).


Thanks, this was very helpful!

JonathanGiles commented 8 years ago

Original comment by William Comnisky (Bitbucket: wcomnisky, GitHub: wcomnisky).


Awesome @mquirin!

Confirmed here, it solves the problem.

Information from the ScenicView About:

#!text

JavaFX Build Information:
    Java FX 8.0.72-b15

Required Libraries:
    tools.jar Home: /usr/lib/jvm/java-8-oracle

Operating System:
    Linux, amd64, 4.2.0-35-generic

Java Version:
    1.8.0_77, Oracle Corporation, 1.8.0_77-b03

Thanks a lot!

JonathanGiles commented 8 years ago

Original comment by Michael Quirin (Bitbucket: mquirin, GitHub: mquirin).


I had the same issue and solved it by adding the following line to scenicView.properties:

#!bash
jdkPath=/usr/lib/jvm/java-8-oracle

If the jdk is not specified there is a fixed list of places in LinuxAttachHandler, but if your path is not in there you get this (not so obvious) error.

JonathanGiles commented 8 years ago

Original comment by William Comnisky (Bitbucket: wcomnisky, GitHub: wcomnisky).


Same problem here on Ubuntu 15.10 x64 with Java 1.8.0_73

#!shell
william@wcomnisky:~/Downloads/ScenicView$ java -jar ScenicView.jar 
java.lang.IllegalArgumentException: URI is not absolute
    at java.net.URI.toURL(URI.java:1088)
    at org.scenicview.model.attach.AttachHandlerFactory.addToolsJarToClasspath(AttachHandlerFactory.java:212)
    at org.scenicview.model.attach.AttachHandlerFactory.initAttachAPI(AttachHandlerFactory.java:91)
    at org.scenicview.ScenicView.start(ScenicView.java:160)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
    at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
    at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
    at com.sun.glass.ui.gtk.GtkApplication.lambda$null$49(GtkApplication.java:139)
    at java.lang.Thread.run(Thread.java:745)
java.lang.UnsatisfiedLinkError: no attach in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1864)
    at java.lang.Runtime.loadLibrary0(Runtime.java:870)
    at java.lang.System.loadLibrary(System.java:1122)
    at org.scenicview.model.attach.AttachHandlerFactory.patchAttachLibrary(AttachHandlerFactory.java:202)
    at org.scenicview.model.attach.AttachHandlerFactory.initAttachAPI(AttachHandlerFactory.java:138)
    at org.scenicview.ScenicView.start(ScenicView.java:160)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
    at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
    at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
    at com.sun.glass.ui.gtk.GtkApplication.lambda$null$49(GtkApplication.java:139)
    at java.lang.Thread.run(Thread.java:745)
Platform running
Launching ScenicView v8.0.0
Startup done
Creating server
Exception in Application start method
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
    at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Exception in Application start method
    at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: com/sun/tools/attach/AttachNotSupportedException
    at org.fxconnector.remote.FXConnectorFactory.getConnector(FXConnectorFactory.java:32)
    at org.scenicview.ScenicView.start(ScenicView.java:188)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
    at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
    at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
    at com.sun.glass.ui.gtk.GtkApplication.lambda$null$49(GtkApplication.java:139)
    ... 1 more
Caused by: java.lang.ClassNotFoundException: com.sun.tools.attach.AttachNotSupportedException
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 11 more
Exception running application org.scenicview.ScenicView
#!shell
william@wcomnisky:~/Downloads/ScenicView$ java -version
java version "1.8.0_73"
Java(TM) SE Runtime Environment (build 1.8.0_73-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.73-b02, mixed mode)