0

I'm trying do create a JavaFX application based on Gluon. Therefor I'm using Eclipse with the Gluon plugin. I need to say that I am new to Gradle and JavaFX as well, so maybe I disgrace myself with this question, because it's too obvious.

I created a fresh project with the Gluon project wizard that I am able to compile and start via the Gradle task "run". After some toying with the project I produced an error that I would like to debug step by step with the eclipse debugger.

So, how can you debug a Gluon/Gradle application? I'm also interested where I can configure the Gradle tasks. I see the preconfigured ones in the task list, but can only execute them by doubleclick. There isn't even a context menu. One idea was that there was a debug gradle task in the list, but I couldn't find one so far.

UPDATE: I) I need to add that I want to use Gluon ignite with dagger and my application can't be started by the eclipse run menu, because the code generation for the dagger modules has not been performed. Debugging and launching without Dagger seems to work. So my question is bit more specific than I thought... II)

Exception in Application start method
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(Unknown Source)
    at com.sun.javafx.application.LauncherImpl.launchApplication(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.RuntimeException: Exception in Application start method
    at com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: Module adapter for class com.myapp.main.MyApp$DaggerModule could not be loaded. Please ensure that code generation was run for this module.
    at dagger.internal.FailoverLoader$1.create(FailoverLoader.java:45)
    at dagger.internal.FailoverLoader$1.create(FailoverLoader.java:40)
    at dagger.internal.Memoizer.get(Memoizer.java:56)
    at dagger.internal.FailoverLoader.getModuleAdapter(FailoverLoader.java:57)
    at dagger.internal.Modules.loadModules(Modules.java:43)
    at dagger.ObjectGraph$DaggerObjectGraph.makeGraph(ObjectGraph.java:174)
    at dagger.ObjectGraph$DaggerObjectGraph.access$000(ObjectGraph.java:138)
    at dagger.ObjectGraph.create(ObjectGraph.java:129)
    at com.gluonhq.ignite.dagger.DaggerContext.init(DaggerContext.java:58)
    at com.myapp.main.MyApp.start(MyApp.java:85)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(Unknown Source)
    at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(Unknown Source)
    at com.sun.javafx.application.PlatformImpl.lambda$null$173(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(Unknown Source)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$null$148(Unknown Source)
    ... 1 more
Exception running application com.myapp.main.MyApp

Thanks in advance!

MannikJ
  • 301
  • 1
  • 15
  • 1
    Are you able to debug your application in eclipse now? – ItachiUchiha Mar 02 '16 at 15:56
  • No, unfortunately not. How would I be supposed to do this? I can neither launch it via the eclipse launch button nor debug it. I added the resulting exception to the question. – MannikJ Mar 02 '16 at 18:18
  • Are you able to debug it when you are not using dagger? – ItachiUchiha Mar 02 '16 at 18:20
  • It's quite hard to test that within a few minutes, but as the main problem seems to be dagger's code generation I guess it would run without it. – MannikJ Mar 02 '16 at 18:27
  • I am just trying to understand what your real problem is. Initially, your problem seemed to be related to debugging gradle project in eclipse. Now it seems to be a dagger issue. – ItachiUchiha Mar 02 '16 at 18:48
  • Yeah, you are right. That's because I had a bunch of problems and wasn't sure about the origin. So it's maybe quite hard to follow. I rather thought it's a gradle or eclipse issue, because I somehow need to tell it to perform the dagger code generation before debugging/launching as happening when using the gradle tasks. I just tried to run it without dagger (launching and debugging via eclipse) and it works. – MannikJ Mar 02 '16 at 18:55
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/105179/discussion-between-mannikj-and-itachiuchiha). – MannikJ Mar 02 '16 at 18:59

0 Answers0