You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by IcedDante <ul...@yahoo.com> on 2012/03/17 16:49:19 UTC

Using “Persist” annotation in Tapestry is causing Problems with RunJettyRun

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.


--
View this message in context: http://tapestry.1045711.n5.nabble.com/Using-Persist-annotation-in-Tapestry-is-causing-Problems-with-RunJettyRun-tp5573828p5573828.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Using “Persist” annotation in Tapestry is causing Problems with RunJettyRun

Posted by IcedDante <ul...@yahoo.com>.
Thiago,

Your class solution did work for me. The only problem is I'm not sure /why/
it worked and what the problem was from launching my application from the
console, lol. I guess I will just keep trucking along for now.

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Using-Persist-annotation-in-Tapestry-is-causing-Problems-with-RunJettyRun-tp5573828p5578552.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Using “Persist” annotation in Tapestry is causing Problems with RunJettyRun

Posted by IcedDante <ul...@yahoo.com>.
Thanks for the feedback friends. Yes, I wondered if I was seeing a common
error or was just having bad luck. I shifted to the command prompt and it
was working well from there, but now my instance of jetty is hanging. Every
time I try to contact the server or my webapps I get a timeout error. If
anyone else has had problems with Jetty or can suggest an alternative,
please let me know.

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Using-Persist-annotation-in-Tapestry-is-causing-Problems-with-RunJettyRun-tp5573828p5578377.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re:Using “Persist” annotation in Tapestry is causing Problems with RunJettyRun

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Sat, 17 Mar 2012 19:21:20 -0300, Chris Mylonas <ch...@opencsta.org>  
wrote:

> Hi mate,

Hi, muchachos!

> When I'm working on the web stuff I stick to running jetty from the  
> command line because sometimes the tools within eclipse don't work as  
> advertised and therefore I stick to the command line - mvn / jetty come  
> to mind. The fact that it runs from the command line makes it point to  
> an eclipse plugin problem rather than a tapestry problem.

This situation is really, really weird. I've never had this kind of  
problem, and I've had projects launching Jetty from Maven (command-line),  
Maven (m2eclipse and m2e plugins), JettyLauncher (years ago), RunJettyRun  
and through embedded Jetty instance (my favorite).

Here's my preferred way of launching Jetty: embedded, through code. I add  
Jetty 7 as a test dependency and this class in src/test/java:

package test;

import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.webapp.WebAppContext;

public class Main {

	public static void main(String[] args) throws Exception {
		
		Server server = new Server(8080);
		
         WebAppContext context = new WebAppContext();
         context.setDescriptor("src/main/webapp/WEB-INF/web.xml");
         context.setResourceBase("src/main/webapp");
         context.setContextPath("/");
         context.setParentLoaderPriority(true);

         server.setHandler(context);

         server.start();
         server.join();

	}

}

Then I just run or debug this class inside Eclipse (or your IDE of  
choice). Couldn't be simpler. :)

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Using “Persist” annotation in Tapestry is causing Problems with RunJettyRun

Posted by Chris Mylonas <ch...@opencsta.org>.
Hi mate,

When I'm working on the web stuff I stick to running jetty from the command line because sometimes the tools within eclipse don't work as advertised and therefore I stick to the command line - mvn / jetty come to mind.

The fact that it runs from the command line makes it point to an eclipse plugin problem rather than a tapestry problem.

Have you tried a jetty-related list to see if there are other jdk1.7/indigo problems?

Cheers



On 18/03/2012, at 2:49 AM, IcedDante wrote:

> 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.
> 
> 
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Using-Persist-annotation-in-Tapestry-is-causing-Problems-with-RunJettyRun-tp5573828p5573828.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org