we are working on a project that uses spring boot, camunda, gradle. we are using Eclipse as IDE. When we start the app in the run mode, everything works fine. Not so in debug mode. During start up the app crashes because camunda / spring says that some objects are added twice to the application context. This happens as well when we enable spring dev tools. The classpath is printed out to the console when stating. That shows that the project root is part of it. Maybe scanning the root folder and the classes folder to create the application context causes the problem.
Starting the app from within gradle does not produce this error. Also if we use IntelliJ instead of Eclipse we do not run into this error.
Any tips appreciased
TIA Kibu
Solved with eclipse Photon (4.9)
Kibu
Related
I'm trying to complete this tutorial. App created on this page with gradle, kotlin, java 12, war, dependencies as described on tutorial by first link.
In a nutshell, all works fine, app build by gradle works, app starts, I can open gradle app in IntelliJ IDEA and start and debug works.
Next I want to compare kotlin app development in Eclipse. I can run app with this run configuration:
App starts normally and works.
But in debug configuration there is no Gradle project option:
How to make proper debug configuration with possibility to debug kotlin files too?
Right click on project name -> Gradle -> Refresh gradle project did the trick.
Kotlin runtime library appears in libraries, java app or spring boot app debug now works, and breakpoint can be set.
I am trying to create a Spring boot based MVC application using eclipse.
I created a starter template from spring's starter website and i have imported the maven package into eclipse.
I created a controller and a view and I am able to run the application by going to "debug as" or "run as" and selecting Java Application and then selecting the spring boot application main method from the list.
However with this approach, Eclipse does not seem to auto build my changes in my java classes nor the changes in my template views. (I use Thymeleaf btw) on the fly even though "auto build" is switched on in eclipse.
This forces me to stop the application in eclipse and re run the application for every small change i make and its very difficult.
Is this the only way on eclipse or is there a better way for eclipse would auto build the java and template files on the way so that I can code and debug simultaneously.
Eclipse is most likely compiling because that's what Eclipse does, but maybe you need to install the dev tools so that you get live reloading enabled.
I'm trying to run the JHipster application via my Eclipse Juno, using jdk 1.7.
The app seems to be loading properly (no console errors), but when i'm trying to reach the server with the client side (or via Postman, by sending a request to the REST servlets in port 8080), it's not responding.
However, when i'm running "mvn spring-boot:run" in the command shell, the server is loaded successfully and is responding to the exact same requests. Also, I managed to run the same command via eclipse with some maven configuration but it seems to be running only the target files (jars) and not the source code. I still haven't been able to run the source code of this app using eclipse in order to properly debug it.
Any suggestions?
Thanks!
So the answer is quite trivial, but since I spent several hours to reach it, it might save some time for others-
Download & install STS IDE.
Import the project as existing Maven project.
Run/Debug the project.
I tried to run it via Eclipse the whole time (wasn't familiar with STS to be honest) and this probably needs some extra configuration (another comment with explanations on eclipse configuration will be much appreciated). Once you work with STS, it's easy.
You should not need STS, just Eclipse with the J2EE stuff.
I've imported the sample jhipster in Eclipse (without STS) as a Maven project and everything was OK, after installing the maven dependencies.
To run the project, run as an application and search for the Application (com.mycompany.myapp.Application)
This app works for me: https://github.com/jhipster/jhipster-sample-app. It is stuck on Boot RC5 which probably means it's a bit old. Maybe Julien can comment on that (or update it)?
I am going through the Tapestry beginner tutorial at: http://tapestry.apache.org/tapestry-tutorial.html
I just downloaded the template project and tried running it as is.
The problem is adding the #Persist annotation to the property my application hangs indefinitely. I realized that it happens when I launch my application from Eclipse using a RunJettyRun configuration. If I run it form the command prompt with mvn jetty:run it works fine.
I notice that the RunJettyRun version on my machine does not match up exactly with the screenshots in the Tapestry tutorial. Mine allows you to select from three different Jetty versions:
Jetty 6.1
Jetty 7.5
Jetty 8.0
Version 8 doesn't launch at all. 6 and 7 have the hanging error.
Using Jdk1.7, Eclipse Indigo and Windows XP.
I realized that it happens when I launch my application from Eclipse using a RunJettyRun configuration. If I run it form the command prompt with mvn jetty:run it works fine.
I am a maintainer of RJR team , that sounds more like a RunJettyRun bug if you could run it well with "mvn jetty:run".
Because I am not familiar with Tapestry, if you could provide the reproducible war file and reproduce steps, and file a issue on RJR's tracker,
then I will try to check if there's anything we could do for it.
It sounds more like configuration conflict or version issue, but it's just a quick guess.
http://code.google.com/p/run-jetty-run/issues/list
I'm using jetty 7 and it's working fine for me
Did you try downloading the tutorial source code from GitHub and run that?
Also note that any field with a #Persist annotation must not be initialized and should be private
T5 tutorial source code on GitHub
I'm developping a web application in Eclipse and I'm using maven, spring and tomcat.
Now the problem I have is that debug as => debug on server doesn't work.
I just get exceptions. (and yes I've created the server)
If I use the mvn command to compile it, put the war in my tomcat webapps dir and start my tomcat the application works fine. But for the functionallity I'm now working on debugging would be usefull.
I found the answer for this in http://jacksonps4.me/wordpress/?p=868
Worked like a charm for me, yet I don't understand anything!
We used to test our application with Tomcat as well, but switched to starting an embeddable Jetty. Here's a sample app. It's JSF, but it doesn't really matter. The pseudo-unit test simply starts a jetty "before" and shuts stops it "after". No need for external server infrastructure, no need for IDE dependencies.
you can run tomcat with maven with this command:
mvn tomcat:run
and if you want to debug, set this maven options:
export MAVEN_OPTS=-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
if you are in windows, use the set command:
set MAVEN_OPTS=-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
then you can debug with eclipse Remote Java Application.
Hope this help.