Can't get javafx-d3 up and running
yunus89 opened this issue · 9 comments
I clone this repo and opened javafx-d3-demo with project all seems okay. The problem is when i build to download dependencies with maven, the build failed with error
Building javafx-d3-demo 0.0.1-SNAPSHOT
The POM for javafx-d3:javafx-d3:jar:0.0.1-SNAPSHOT is missing, no dependency information available
BUILD FAILURE
Total time: 3.510s
Finished at: Fri Aug 12 16:14:01 EAT 2016Final Memory: 4M/61M
Failed to execute goal on project javafx-d3-demo: Could not resolve dependencies for project javafx-d3-demo:javafx-d3-demo:jar:0.0.1-SNAPSHOT: Could not find artifact javafx-d3:javafx-d3:jar:0.0.1-SNAPSHOT -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
Hello.
Did you try to build javafx-d3 in first? It is necessary that the artifact of javafx-d3 was in mvn local repository
I tried build javafx-d3, now am getting this error:
--- maven-surefire-plugin:2.10:test (default-test) @ javafx-d3-demo ---
Surefire report directory: C:\Users\Yunus\Documents\JavaFX Visualizations\javafx-d3\javafx-d3-demo\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.github.javafxd3.d3.arrays.ArrayTest
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
at java.io.Reader.<init>(Reader.java:78)
at java.io.InputStreamReader.<init>(InputStreamReader.java:97)
at com.github.javafxd3.javafx.JavaFxD3Browser.getJavaScriptLibraryFromFile(JavaFxD3Browser.java:252)
at com.github.javafxd3.javafx.JavaFxD3Browser.injectD3(JavaFxD3Browser.java:163)
at com.github.javafxd3.javafx.JavaFxD3Browser.injectJavaScriptLibraries(JavaFxD3Browser.java:151)
at com.github.javafxd3.javafx.JavaFxD3Browser.lambda$registerLoadingFinishedHook$1(JavaFxD3Browser.java:134)
at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:182)
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81)
at javafx.beans.property.ReadOnlyObjectPropertyBase.fireValueChangedEvent(ReadOnlyObjectPropertyBase.java:74)
at javafx.beans.property.ReadOnlyObjectWrapper.fireValueChangedEvent(ReadOnlyObjectWrapper.java:102)
at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:112)
at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:146)
at javafx.scene.web.WebEngine$LoadWorker.updateState(WebEngine.java:1260)
at javafx.scene.web.WebEngine$LoadWorker.dispatchLoadEvent(WebEngine.java:1371)
at javafx.scene.web.WebEngine$LoadWorker.access$1200(WebEngine.java:1253)
at javafx.scene.web.WebEngine$PageLoadListener.dispatchLoadEvent(WebEngine.java:1240)
at com.sun.webkit.WebPage.fireLoadEvent(WebPage.java:2400)
at com.sun.webkit.WebPage.fwkFireLoadEvent(WebPage.java:2244)
at com.sun.webkit.Timer.twkFireTimerEvent(Native Method)
at com.sun.webkit.Timer.fireTimerEvent(Timer.java:83)
at com.sun.webkit.Timer.notifyTick(Timer.java:64)
at javafx.scene.web.WebEngine$PulseTimer.lambda$static$45(WebEngine.java:1201)
at com.sun.javafx.tk.Toolkit.lambda$runPulse$30(Toolkit.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:354)
at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:381)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:510)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:490)
at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$404(QuantumToolkit.java:319)
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)
at java.lang.Thread.run(Thread.java:745)
In real then many errors in unit tests.
Could try build without run tests
mvn clean install -Dmaven.test.skip=true
and run demo as (for windows)
javafx-d3-demo\target>java -cp javafx-d3-demo-0.0.1-SNAPSHOT.jar;C:\Users\USER\.m2 \repository\javafx-d3\javafx-d3\0.0.1-SNAPSHOT\* com.github.javafxd3.d3.JavaFxD3DemoSuite
And this error
Running com.github.javafxd3.d3.arrays.ArrayTest
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
at java.io.Reader.(Reader.java:78)
at java.io.InputStreamReader.(InputStreamReader.java:97)
you can fix as insert in https://github.com/stefaneidelloth/javafx-d3/blob/master/javafx-d3/pom.xml next lines as child for resources tag
<resource> <directory>main/resources</directory> </resource>
and rebuild javafx-d3 module
I added <resource> <directory>main/resources</directory> </resource>
and executed mvn clean install -Dmaven.test.skip=true
: everything went well but when i run the app i get....
------------------------------------------------------------------------
Building javafx-d3-demo 0.0.1-SNAPSHOT
------------------------------------------------------------------------
--- exec-maven-plugin:1.2.1:exec (default-cli) @ javafx-d3-demo ---
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
at java.io.Reader.<init>(Reader.java:78)
at java.io.InputStreamReader.<init>(InputStreamReader.java:97)
at com.github.javafxd3.javafx.JavaFxD3Browser.getJavaScriptLibraryFromFile(JavaFxD3Browser.java:252)
at com.github.javafxd3.javafx.JavaFxD3Browser.injectD3(JavaFxD3Browser.java:163)
at com.github.javafxd3.javafx.JavaFxD3Browser.injectJavaScriptLibraries(JavaFxD3Browser.java:151)
at com.github.javafxd3.javafx.JavaFxD3Browser.lambda$registerLoadingFinishedHook$1(JavaFxD3Browser.java:134)
at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:182)
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81)
at javafx.beans.property.ReadOnlyObjectPropertyBase.fireValueChangedEvent(ReadOnlyObjectPropertyBase.java:74)
at javafx.beans.property.ReadOnlyObjectWrapper.fireValueChangedEvent(ReadOnlyObjectWrapper.java:102)
at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:112)
at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:146)
at javafx.scene.web.WebEngine$LoadWorker.updateState(WebEngine.java:1260)
at javafx.scene.web.WebEngine$LoadWorker.dispatchLoadEvent(WebEngine.java:1371)
at javafx.scene.web.WebEngine$LoadWorker.access$1200(WebEngine.java:1253)
at javafx.scene.web.WebEngine$PageLoadListener.dispatchLoadEvent(WebEngine.java:1240)
at com.sun.webkit.WebPage.fireLoadEvent(WebPage.java:2400)
at com.sun.webkit.WebPage.fwkFireLoadEvent(WebPage.java:2244)
at com.sun.webkit.Timer.twkFireTimerEvent(Native Method)
at com.sun.webkit.Timer.fireTimerEvent(Timer.java:83)
at com.sun.webkit.Timer.notifyTick(Timer.java:64)
at javafx.scene.web.WebEngine$PulseTimer.lambda$static$45(WebEngine.java:1201)
at com.sun.javafx.tk.Toolkit.lambda$runPulse$30(Toolkit.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:354)
at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:381)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:510)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:490)
at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$404(QuantumToolkit.java:319)
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)
at java.lang.Thread.run(Thread.java:745)
Do you add <resource> <directory>main/resources</directory> </resource>
in https://github.com/stefaneidelloth/javafx-d3/blob/master/javafx-d3/pom.xml or https://github.com/stefaneidelloth/javafx-d3/blob/master/javafx-d3-demo/pom.xml ?
It is correct case add in https://github.com/stefaneidelloth/javafx-d3/blob/master/javafx-d3/pom.xml.
If you added lines in https://github.com/stefaneidelloth/javafx-d3/blob/master/javafx-d3/pom.xml do you rebuild javafx-d3 module for update javafx-d3 artifact in local mvn repo?
Oh sorry, i added it in demo. I changed and added to javafx-d3/pom.xml
and it's now works.
The problem is when i run this class org.treez.javafxd3.javafx.FunctionPlotter;
i get following error:
Exception in thread "JavaFX Application Thread" netscape.javascript.JSException: SyntaxError: Unexpected identifier 'exp'. Expected '}' to end a object literal.
at com.sun.webkit.dom.JSObject.fwkMakeException(JSObject.java:128)
at com.sun.webkit.dom.JSObject.evalImpl(Native Method)
at com.sun.webkit.dom.JSObject.eval(JSObject.java:52)
at org.treez.javafxd3.d3.wrapper.JavaScriptObject.evalForJsObject(JavaScriptObject.java:462)
at org.treez.javafxd3.functionplot.Options.setDataExpression(Options.java:197)
at org.treez.javafxd3.javafx.FunctionPlotter.plotExecute(FunctionPlotter.java:104)
at org.treez.javafxd3.javafx.FunctionPlotter.lambda$plot$1(FunctionPlotter.java:94)
at org.treez.javafxd3.javafx.FunctionPlotter.processQueue(FunctionPlotter.java:76)
at org.treez.javafxd3.javafx.FunctionPlotter.lambda$createJavaFxD3Browser$0(FunctionPlotter.java:62)
at org.treez.javafxd3.javafx.JavaFxD3Browser.lambda$registerLoadingFinishedHook$1(JavaFxD3Browser.java:143)
at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:182)
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81)
at javafx.beans.property.ReadOnlyObjectPropertyBase.fireValueChangedEvent(ReadOnlyObjectPropertyBase.java:74)
at javafx.beans.property.ReadOnlyObjectWrapper.fireValueChangedEvent(ReadOnlyObjectWrapper.java:102)
at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:112)
at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:146)
at javafx.scene.web.WebEngine$LoadWorker.updateState(WebEngine.java:1260)
at javafx.scene.web.WebEngine$LoadWorker.dispatchLoadEvent(WebEngine.java:1371)
at javafx.scene.web.WebEngine$LoadWorker.access$1200(WebEngine.java:1253)
at javafx.scene.web.WebEngine$PageLoadListener.dispatchLoadEvent(WebEngine.java:1240)
at com.sun.webkit.WebPage.fireLoadEvent(WebPage.java:2400)
at com.sun.webkit.WebPage.fwkFireLoadEvent(WebPage.java:2244)
at com.sun.webkit.Timer.twkFireTimerEvent(Native Method)
at com.sun.webkit.Timer.fireTimerEvent(Timer.java:83)
at com.sun.webkit.Timer.notifyTick(Timer.java:64)
at javafx.scene.web.WebEngine$PulseTimer.lambda$static$45(WebEngine.java:1201)
at com.sun.javafx.tk.Toolkit.lambda$runPulse$30(Toolkit.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:354)
at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:381)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:510)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:490)
at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$404(QuantumToolkit.java:319)
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)
at java.lang.Thread.run(Thread.java:745)
I think it is another error for another issue 😄
Okay then, i will open an issue
I fixed the package structure and maven files.