Using "Persist" annotation in Tapestry is causing Problems with RunJettyRun - eclipse

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

Related

Problems wih Eclipse / Spring Boot / Camunda

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

Run JHipster SpringApplication via eclipse

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)?

slight url mismatch while publishing java 6 maven webapp to tomcat from netbeans

Honestly I've started this small maven webapp using eclipse 3.6 (STS) and i found it so complicated that i had to switch to netbeans.I really wanted to use eclipse but these are reality on the ground.So at the end of everything I'll like to have an eclipse version of the same project. thanks
I set up the maven webapp using the embedded archetype, and use cargo plugin to take care of the deployment.basically there is only hello world index.jsp in the project.after picking pom configuration here and there my pom finally is like this .
while it started publishing after i restart the IDE, it's publishing to http://localhost:8080/ but for me I'm expecting it at http://localhost:8080/mvnTestWebap
so here are my questions
Question 1 : How can i correct that?
Question 2 : I believe my pom is tied to netbeans too much, how can i achieve the publishing to tomcat result but having a portable pom?Can anyone suggest a rewrite that can run on eclipse?
Question 3 : what correspond to netbeans "run" in eclipse?
probably by some deployment descriptor editing.
don't really understand the point. by default netbeans uses it's own embedded IDE way of deployment. That's not creating a pom tied to netbeans in any way. You can use that in eclipse or IDE or command line to build the project. The deployment part of the web app is specific to the server being used and the IDE being used.
You can also tell netbeans to execute your cargo plugin on executing the Run/Debug/Profile action (bypassing the netbeans default behaviour)
run basically performs a redeploy of the app on the server of choice. There has to be an equivalent on eclipse.

Eclipse 3.6.1 and Tomcat 7 problems

Well, it is trivial problems... In fact I started using Tomcat 7 (why not) but when I do Run on Server, Eclipse always fails to get the right URL for the servlet, resulting in my trying to find the right combo for minutes. It's so annoying. Do you have any suggestions? Other servers work correctly, like Spring tc server.
I think the real problem is that the project doesn't get deployed at all (or do you actually manage to find it in the browser?).
I'm having problems running a project on Tomcat 7 from inside Eclipse, and have so far found no other "solution" than to manually package (using maven) the project and copy the war file into my tomcats webapps dir.
If the problem is really only the initial URL being wrong, then please disregard my answer :P
Otherwise, here's another question of similar sort: Troubleshoot Eclipse's "Run on server" deploy.
EDIT:
I've done some more research, and it turns out that the mojo plugin version 1.1. doesn't work (as well) with tomcat 7, because the deploy path has changed. I'm working on fixing it by adding this line to the pom.xml inside the <plugin> <configuration> tags:
<url>http://localhost:8080/manager/text</url>
But am still having some problems. Will update if I get it working.

Can't get compile on save / hot deploy feature to work with maven based webapp in eclipse or netbeans

So our new webapp project is based on maven. I'm really liking the dependency management and IDE agnostic approach but I'm having problems with compilation and debugging.
Here's how I would currently get a clean copy of the project working
Check out the main project from SVN
Open the project in IDE (I've tried in eclipse 3.4 and netbeans 6.7)
The IDE will automatically open two subprojects one being the webapp, the other being a supporting utils jar.
From the command line I run mvn war:inplace on the webapp module which builds a working copy of the webapp with all dependencies in WEB-INF/lib/
This then runs fine but whenever I change a java class I have to clean and build / reload the app context.
I've googled high and low but no one seems to be complaining about this so I guess there must be something really obvious I'm missing. How is everyone else handling incremental compilation and hot deploy with maven?
To clarify all I'm looking for is the replicate the behavior I used to have before maven where I could make simple changes to java classes and they would be instantaneously compiled and hot deployed to a running webapp. I don't need anything fancy like jRebel etc I just want the new tool to give me the same functionality I enjoyed with my old tools.
If you can use mvn jetty:run it will read the classes and resources directly from the project. Using Maven2 Eclipse plugin and running the server embedded in Eclipse has auto-publishing, which gets you there in the end, although it's slower. And JRebel starting with 2.0 (as you may know) can map the Maven module directly to the deployed application, so you get instant build and redeploy. Those are the only solutions I know of.
Netbeans should support it out of the box. Though, there remains a bug related to this: http://netbeans.org/bugzilla/show_bug.cgi?id=177230
In-place deployment works for me with Netbeans 7.0.1 and Tomcat 6.0.x if I use Tomcat 7.0.x in-place deployment doesn't work. Tomcat always copies application to $CATALINA_HOME/temp :(