-
Notifications
You must be signed in to change notification settings - Fork 5
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
Error with executing MindMapVisualApplication in Part 1 of Tutorial. #3
Comments
It seems to be a configuration problem in your development environment. Could you please verify whether you set up your environment properly? You can use the following blog post as a starting point: |
Hi, I tried the configuration mentioned in the blog, and it works. Unfortunately, I got the same error in Part 2, while creating the "SimpleMindMapApplication". I am following the tutorial and this was the error output. Could you guide me for a workaround for this issue? java.lang.NullPointerException |
How does the code line looks like throwing the NPE? You can try to surround that code line by an if statement to control that the code is executed only if the certain object is not null. |
The solution is a null check before calling visual.getParent(), because it might be null in the initial startup. |
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:498)
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:498)
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/google/common/collect/SetMultimap
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
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)
at org.eclipse.gef.fx.nodes.Connection.(Connection.java:277)
at com.itemis.gef.tutorial.mindmap.visuals.MindMapConnectionVisual.(MindMapConnectionVisual.java:17)
at com.itemis.gef.tutorial.mindmap.visuals.MindMapVisualApplication.start(MindMapVisualApplication.java:37)
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.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
... 1 more
Caused by: java.lang.ClassNotFoundException: com.google.common.collect.SetMultimap
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)
... 24 more
Exception running application com.itemis.gef.tutorial.mindmap.visuals.MindMapVisualApplication
The above stack trace result is generated after executing every single step of Part 1 of the tutorial provided on the website.
I did a complete code coverage and the error seems to generate from the part of the code in "MindMapVisualApplication"
**Connection conn = new MindMapConnectionVisual();
conn.setStartAnchor(new DynamicAnchor(node, new ChopBoxStrategy()));
conn.setEndAnchor(new DynamicAnchor(node2, new ChopBoxStrategy()));
and also the whole "MindMapConnectionVisual" class.
I am running the on Eclipse IDE - 2018.12 with JavaSE 1.8 and Javafx-sdk-11.0.2
Would appreciate if anyone can provide me with a solution to this error.
The text was updated successfully, but these errors were encountered: