How to debug a Gluon Application that uses Dagger in Eclipse - eclipse

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!

Related

Starting wso2 enterprise integrator server from EI Tool

I'm starting a new project with Enterprise Integrator 6.0 and so far I'm unable to start a server from within the eclipse distribution that comes with the EI Tool.
When I was working with ESB, I used to create a server and create a Runtime environment pointing the CARBON_HOME variable to <ESB_INTALLATION_DIR>/bin, but if I do the same with Enterprise Integrator I get the following error:
Configuration error
java.io.FileNotFoundException: C:\Users\...\wso2ei-6.0.0\repository\conf\etc\logging-bridge.properties (The system cannot find the path specified)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:466)
at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:311)
at java.util.logging.LogManager$3.run(Unknown Source)
at java.util.logging.LogManager$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.readPrimordialConfiguration(Unknown Source)
at java.util.logging.LogManager.access$800(Unknown Source)
at java.util.logging.LogManager$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.ensureLogManagerInitialized(Unknown Source)
at java.util.logging.LogManager.getLogManager(Unknown Source)
at java.util.logging.Logger.demandLogger(Unknown Source)
at java.util.logging.Logger.getLogger(Unknown Source)
at com.sun.jmx.remote.util.ClassLogger.<init>(Unknown Source)
at sun.management.jmxremote.ConnectorBootstrap.<clinit>(Unknown Source)
at sun.management.Agent.startLocalManagementAgent(Unknown Source)
at sun.management.Agent.startAgent(Unknown Source)
at sun.management.Agent.startAgent(Unknown Source)
java.lang.ClassNotFoundException: org.wso2.carbon.server.Main
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.wso2.carbon.bootstrap.Bootstrap.loadClass(Bootstrap.java:59)
at org.wso2.carbon.bootstrap.Bootstrap.main(Bootstrap.java:45)
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
I'm able to start the EI server from the console, but in the long run it would be way easier to work directly from eclipse. Can anyone shed a light on how to do this configuration?
I'm running on java jdk 1.8.0_25, windows 10.
So apparently the default arguments used by eclipse in the launch configuration was all wrong.It was using the file structure for ESB projects, and that's what caused the FileNotFoundException.For example, the default server configuration would have something like
-Dconf.location="<CARBON_HOME>/repository/conf"
When it should be:
-Dconf.location="<CARBON_HOME>\conf"
I found this after some digging with the integrator.bat script. Information about the configuration differences between ESB and EI can be found here.
-EDIT-
It seems these problems are going o be fixed in the next release

JPA class not found on production system

I am using eclipse mars and seem to be able to use JPA in a stand alone app (no glassfish/jboss) by just using these libraries:
eclipselink.jar
javax.persistence_2.1.0.v201304241213.jar
org.eclipse.persistence.jpa.jpql_2.5.2.v20140319-9ad6abd.jar
But when I build and deploy my app I keep getting the below errors. Would my version of java matter? I'm using 1.6.0 24 32 bit on my production board and my IDE is a 64 bit system. The above libraries were included when I created a test project in NetBeans so I was able to use JPA in NetBeans fine as well. Am I missing additional libraries or perhaps something is wrong with my deployment? any advise is greatly appreciated.
java.lang.RuntimeException: java.lang.NoClassDefFoundError: javax/persistence/NoResultException
at com.s3.utils.ExceptionCatchingSwingWorker$1.done(ExceptionCatchingSwingWorker.java:79)
at javax.swing.SwingWorker$5.run(Unknown Source)
at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(Unknown Source)
at sun.swing.AccumulativeRunnable.run(Unknown Source)
at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(Unknown Source)
at javax.swing.Timer.fireActionPerformed(Unknown Source)
at javax.swing.Timer$DoPostEvent.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at com.s3.gui.control.TracingEventQueue.dispatchEvent(TracingEventQueue.java:30)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: javax/persistence/NoResultException
at com.s3.gui.pages.usermanagement.ImportFromUSBActionListener.doInstall(ImportFromUSBActionListener.java:116)

RapidClipse UI Designer Error

I am new to RapidClipse IDE as my organization requested that I study and develop with it. After having installed version 2.3.1 windows edition, I created a project but the UI designer is showing an error and the widget palette is not showing anything. Below you can find the full stacktrace:
java.lang.NullPointerException
at xdev.eclipse.internal.vaadin.model.DefaultBeanInfo.getDefaultValue(DefaultBeanInfo.java:676)
at xdev.eclipse.internal.vaadin.model.Bean.getValueImpl(Bean.java:855) 
at xdev.eclipse.internal.vaadin.model.Bean.getValue(Bean.java:829) 
at xdev.eclipse.internal.vaadin.model.Bean.getConstraints(Bean.java:737)
at xdev.eclipse.internal.vaadin.ui.editor.VaadinDesigner.adjustRootSizeImpl(VaadinDesigner.java:1725)
at xdev.eclipse.internal.vaadin.ui.editor.VaadinDesigner.lambda$17(VaadinDesigner.java:1697)
at xdev.eclipse.internal.vaadin.ui.editor.VaadinDesigner.adjustRootSize(VaadinDesigner.java:1708)
at xdev.eclipse.internal.vaadin.ui.editor.VaadinDesigner.createUI(VaadinDesigner.java:824) 
at xdev.eclipse.internal.vaadin.ui.editor.VaadinDesigner.loadContents_createUI(VaadinDesigner.java:764)
at xdev.eclipse.internal.vaadin.ui.editor.VaadinDesigner.lambda$9(VaadinDesigner.java:701) 
at xdev.eclipse.internal.core.ui.editor.multi.SwingDesignPart.invokeUIActionImpl(SwingDesignPart.java:80)
at xdev.eclipse.internal.core.ui.editor.multi.SwingDesignPart.lambda$0(SwingDesignPart.java:69)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)j
at ava.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at xdev.eclipse.internal.core.ui.swing.XdevEventQueue.dispatchEvent(XdevEventQueue.java:138)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(UnknownSource)
at java.awt.EventDispatchThread.run(Unknown Source)
I have been able to solve this. Its probably a bug from the developers of RapidClipse. this is what i did:
The UI Libraries to display the designer and the pallette does not download when you create the project, so you will have to download the following:
xdev-server-aa
xdev-server-ui
from maven repository and include them in your library path. then you right click the project select maven and update project. Restart the RapidClipse IDE

Error with ClassEnhancer "ASM"

I need some help! I have re-installed Eclipse and the latest GWT SDK 2.5.1/App Engine SDK 1.8.4 and my previously working app is not working any more. I cannot find the way out.
As far as I could figure out it has something to do with the maven dependency. Can I remove it? How?
I believe it is simple. Please help!
Here is the log:
sep 10, 2013 9:40:01 PM org.datanucleus.enhancer.DataNucleusEnhancer addMessage
SEVERE: An error occured for ClassEnhancer "ASM" when trying to call the method "org.datanucleus.enhancer.asm.ASMClassEnhancer" on class "getClassNameForFileName" : class org.datanucleus.enhancer.asm.ASMClassEnhancer$MyClassVisitor has interface org.objectweb.asm.ClassVisitor as super class
java.lang.IncompatibleClassChangeError: class org.datanucleus.enhancer.asm.ASMClassEnhancer$MyClassVisitor has interface org.objectweb.asm.ClassVisitor as super class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.google.appengine.tools.enhancer.EnhancerLoader.loadClass(EnhancerLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.datanucleus.enhancer.asm.ASMClassEnhancer.getClassNameForFileName(ASMClassEnhancer.java:152)
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 org.datanucleus.enhancer.DataNucleusEnhancer.getClassNameForFilename(DataNucleusEnhancer.java:920)
at org.datanucleus.enhancer.DataNucleusEnhancer.getFileMetadataForInput(DataNucleusEnhancer.java:736)
at org.datanucleus.enhancer.DataNucleusEnhancer.enhance(DataNucleusEnhancer.java:545)
at org.datanucleus.enhancer.DataNucleusEnhancer.main(DataNucleusEnhancer.java:1252)
I have found the solution: in the build path I had included libraries I did not really need anymore. After cleaning of the project the app was working as expected.
PS: thank you Chris for your help!
You can try changing the 'Persistence' of GAE from JPA2 to JPA1. It worked for me.

Eclipse WAS V7.0 Dev Tools wsimport error

I'm trying to generate a "Top down EJB Web Service" implementation from a WSDL with WAS V7.0 Developer Tools. (Server runtime WAS 7.0, web service runtime IBM WebSphere JAX-WS.) After selecting my EJB and EAR projects and specifying further options, I always get the following error, regardless of my options:
Errors occurred during wsimport.
java.lang.NoClassDefFoundError: com/sun/tools/internal/ws/wscompile/WsimportTool
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.ibm.ast.ws.jaxws.emitter.jdk6.command.AbstractEmitterCommand.loadClass(AbstractEmitterCommand.java:166)
at com.ibm.ast.ws.jaxws.emitter.jdk6.command.WsImportCommand.execute(WsImportCommand.java:113)
at com.ibm.ast.ws.jaxws.emitter.command.WsImportCommand.execute(WsImportCommand.java:81)
at com.ibm.ast.ws.jaxws.creation.command.WsimportNonUIThreadCommand$RunCmdInNonUIThread.run(WsimportNonUIThreadCommand.java:284)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.ClassNotFoundException: com.sun.tools.internal.ws.wscompile.WsimportTool
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 16 more
Going through the exact same steps in Rational Application Developer 7.5.1, I can successfully generate an EJB web service implementation with an HTTP router module for my WSDL. So I think this problem might be related to WAS Developer Tools.
Do you guys have any idea why I'm getting this error? Any help would be much appreciated.
Thank you,
Csaba
Make sure you are using the WAS 7.0 JVM when you run the wsimport. You may have several JVMs on your workstation. The JVM under <was install>/java is the one you want in your PATH ahead of all others when using the command.
It wasn't enough to configure Eclipse to use IBM's SDK for projects, I had to start Eclipse using IBM's JVM. I've edited eclipse's config file (eclipse.ini) and added IBM's JRE.
openFile
-vm
...\IBM\WebSphere7\AppServer\java\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
...
Reference