Re: Weird bug
Maybe there is a problem with lazy fetching. So if you call getXXX on lazy attribute you force hibernate to fetch it, because it is still managed. If you need attribute later and entity is detached getter fails. So just call getter on attributes you need to force load and you will be ok. T superoverdr...@gmx.de napsal(a): The same (if you mean the hibernate session). With get it works instead of load...but Strange that getDomainName() which is in the same table cause it to load associated tables Original-Nachricht Datum: Sun, 25 Jan 2009 01:11:54 +0100 Von: Tomas Kolda ko...@web2net.cz An: Tapestry users users@tapestry.apache.org Betreff: Re: Weird bug What happen when you use injected session instead of sessionmanager? @Inject private Session session; public Object onActivate(int domainID) { domain = (Domain)this.session.get(Domain.class, Integer.valueOf(domainID)); return this; } Tomas superoverdr...@gmx.de napsal(a): The following code: public Object onActivate(int domainID) { domain = (Domain)sessionManager.getSession().load(Domain.class, new Integer(domainID)); return this; } leads to: HTTP ERROR: 500 Render queue error in BeginRender[core/ExceptionReport:renderobject_0]: could not initialize proxy - no Session RequestURI=/editdomain Powered by Jetty:// However, if I add this line: public Object onActivate(int domainID) { domain = (Domain)sessionManager.getSession().load(Domain.class, new Integer(domainID)); System.out.println(domain.getDomainName()); return this; } The error does not occur. My question is: 1. How do you avoid this error? 2. Why is this a Jetty error and not a Tapestry5 error message? Is this something I should report as bugreport? Thanks! Toby - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Anyone got Jetty-T5-OpenEJB-Hibernate working?
I'm not sure that I understand your question, but have you had a play now and did it answer your question? On 25/01/2009, at 1:01 AM, Adam Zimowski wrote: Thanks Geoff!! I'll play with it today then :) Do you have a built-in support for running openEJB on a remote server, or is it a matter of an easy configuration, in case of jumpstart? -adam On Sat, Jan 24, 2009 at 7:56 AM, Geoff Callender geoff.callender.jumpst...@gmail.com wrote: Yes, I got it working and released it as JumpStart 4.0 ( http://jumpstart.doublenegative.com.au/installation.html ). You develop with OpenEJB and can still deploy to JBoss. I'm working on expanding the deployment servers list. The next one will be Glassfish. With any luck I'll also add Geronimo and Tomcat/OpenEJB. Cheers, Geoff On 25/01/2009, at 12:40 AM, Adam Zimowski wrote: Geoff - any further news on your Jetty-T5-OpenEJB-Hibernate stack? I'm on the same boat, except for me it is a requirement. I'm just at the beginning of the research phase, and thought I'd check the list for any shorter routes.. -adam On Sun, Jan 18, 2009 at 5:36 AM, Geoff Callender geoff.callender.jumpst...@gmail.com wrote: For the record, I've succeeded in getting Jetty-T5-OpenEJB- Hibernate working. It's a great combination for development and it has resulted in JumpStart 4.0. I'll post the announcement tomorrow if there are no glitches reported in the next 24 hours. On 22/11/2008, at 10:35 AM, Geoff Callender wrote: Has anyone got Jetty-T5-OpenEJB-Hibernate working? I'd like to use this combo for a 2nd implementation of JumpStart so if anyone can help me that would be great. Thanks, Geoff - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Weird bug
On Sat, Jan 24, 2009 at 8:01 PM, superoverdr...@gmx.de wrote: The following code: public Object onActivate(int domainID) { domain = (Domain)sessionManager.getSession().load(Domain.class, new Integer(domainID)); return this; } One advice: some very subtle and hard-to-find @Persist-related bugs may happen when you return this in a event handler method. Return null instead. Another advice: Session.load() raises an exception whan the wanted object was not loaded in this session before. As stated before, use Session.get(). 1. How do you avoid this error? This is a LazyInstantiationException. It happens when you try to lazy-load some property value from an object that is not associated with an open session. To associate an object with a session. do session.lock(object, LockMode.NONE). 2. Why is this a Jetty error and not a Tapestry5 error message? Is this something I should report as bugreport? IMHO, it is a bug. -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: autocomplete, display more info
I am facing this problem as well - is there any solution? (what I want to do is to return a Map in my onProvideCompletionFromField event. The key gets submitted by the form, the value is presented to the user) Piero Am Montag 29 Dezember 2008 17:33:45 schrieb Joachim Van der Auwera: In the autocomplete mixin, the full string which is returned is always returned as value. Is there a way to make a distinction between the value which should be selected and the information which is displayed? In the original library, you can contain additional information in a span tag, allowing styling and assuring the additional info not set when selecting the value. When I try inserting this in the string, the tags are just added as literal strings. Is it possible to return a Bloock which contains a li and all the styling or is there another way to handle this? Thanks for the help, Joachim - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
RE: Advanced Component help
Hello, I it sort of working(code is below). My 2 problems are this: 1:If I put 2 components in the page editing the 2nd, edits the first and I assume it is because it is always running the first form/zone as the names of the second ones have _0 after it. I do not know how to get around this. 2:I still cannot figure out how to bubble the event to the page so I can use the value on submit(IE save the object the field is a member of) div xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; div t:type=Zone t:id=zone form t:type=form t:zone=zone t:id=form div t:type=Errors/ ${value} t:ButtonFragment t:id=buttonfragment t:mixins=triggerfragment fragment=formfragment/ t:formfragment t:id=formfragment visible=buttonfragment input t:type=TextField t:id=value t:validate=required/ input type=submit value=Save/ /t:formfragment /form /div /div public class AjaxEditor { @InjectComponent private Zone zone; @Parameter @Property private String _value; @Property private boolean _buttonfragment; @Component(id = value) private TextField _valueField; @Component(id = form) private Form _form; @OnEvent(value = EventConstants.VALIDATE_FORM, component=form) public Object validate() { if (_value == null ||_value.trim().equals()) { //validation errors _form.recordError(must have a fname); return zone; } else { return null; // let the form submission process continue } } @OnEvent(value = EventConstants.SUCCESS, component=form) public Object sucess() { // do whatever you want _buttonfragment = false; return zone; } } Thanks, --James -Original Message- From: James Sherwood [mailto:jsherw...@rgisolutions.com] Sent: January-24-09 9:13 PM To: 'Tapestry users' Subject: Advanced Component help Hello, I am looking for a good tutorial(or help) on advanced components with forms and event bubbling. In particular a component that takes a value(with some paramaters) then spits out a form with a form fragment inside a zone. When the user clicks a button in this component the value parameter is to be changed and an OnEvent caught to manipulate it. I am not even sure if this is. Below is the code I would like to turn into a single value component(it is basically an in place editor): div t:type=Zone t:id=firstNameZone form t:type=form t:zone=firstNameZone t:id=firstNameForm div t:type=Errors/ ${firstName} t:ButtonFragment t:id=modifyFirstName t:mixins=triggerfragment fragment=firstNameModify/ t:formfragment t:id=firstNameModify visible=modifyFirstName input t:type=TextField t:id=firstName t:validate=required/ input type=submit value=Save/ /t:formfragment /form /div @InjectComponent private Zone firstNameZone; @Property private String _firstName = Fname; @Property private boolean _modifyFirstName; @Component(id = firstName) private TextField _firstnameField; @Component(id = firstNameForm) private Form _firstNameForm; @OnEvent(value = EventConstants.VALIDATE_FORM, component=firstNameForm) public Object validate() { if (_firstName == null ||_firstName.trim().equals()) { //validation errors _firstNameForm.recordError(must have a fname); return firstNameZone; } else { return null; // let the form submission process continue } } @OnEvent(value = EventConstants.SUCCESS, component=firstNameForm) public Object sucess() { // do whatever you want _modifyFirstName = false; return firstNameZone; } I would like the OnEvent to bubble through to the page. Any nudge in the right direction would be appreciated. --James - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Coming Soon: Tapestry360!
I'll add svneton to my list ... thanks for the tip. In terms of application hosting; that'll be on a case-by-case basis. There is a limit to how much bandwidth and/or money formos can devote to this. They've already donated the hardware and a lot of my time, and other's at Formos. On Sun, Jan 25, 2009 at 1:30 AM, Borut BolĨina borut.bolc...@gmail.com wrote: Hi, this looks really promising. So Formos will be offering a shared tomcat instance also for Tapestry apps (the ones Tapestry360 is hosting)? It may be a little late, but do you know Sventon http://www.sventon.org/, a subversion repository browser. Check it out. It is more advanced and also more visually appealing and can also be integrated with JIRA. I have evaluated Crowd months ago, but did not really finish... Cheers, Borut 2009/1/24 Howard Lewis Ship hls...@gmail.com Lately, I've been pulled in a couple of directions. I'm working on a number of Tapestry-related things (new presentations, a DZone Refcard, articles and a new tutorial). I've also been working on Tapestry360: http://tapestry.formos.com You may be familiar with this site already; for about two years it has run the Bamboo Continuous Integration server. Formos (my employer) is firmly behind supporting the community more fully. When this site is ready, it will be a TapestryForge, a project hosting site featuring: - Subversion access via HTTPS - Subversion browsing (i.e., ViewVC) - JIRA Issue management - Confluence Wiki - Bamboo continuous integration - Project home pages - Project nightly build pages - Maven snapshot repository - Maven stable repository All of this is in place except for the self-service SVN administration app, which I'm working on. I could also use a hand figuring out how to accomplish single-sign on using Atlassian Crowd. Anybody used it? I just get confused. Why not just use GoogleCode? GoogleCode doesn't support Maven repositories, or project home pages. Putting it all on one server means it all becomes integrated and automated, the way it should be. In addition, in the future, we can add GIT support if we wish. Again, the only major annoyance currently is the lack of single sign on (you must register individually in Bamboo, JIRA and Confuence) and the fact that granting SVN access is a manual process (for me). I don't think we'll be able to offer shell access either, which makes having an Ant- or Maven-based build that can work inside Bamboo that much more critical. -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Weird bug
I'm curious as well as to why this would result in a 500 rather than the T5 ExceptionReport. Any other configuration? What's the full stack trace of the exception? On Sun, Jan 25, 2009 at 4:54 AM, Thiago HP thiag...@gmail.com wrote: On Sat, Jan 24, 2009 at 8:01 PM, superoverdr...@gmx.de wrote: The following code: public Object onActivate(int domainID) { domain = (Domain)sessionManager.getSession().load(Domain.class, new Integer(domainID)); return this; } One advice: some very subtle and hard-to-find @Persist-related bugs may happen when you return this in a event handler method. Return null instead. Another advice: Session.load() raises an exception whan the wanted object was not loaded in this session before. As stated before, use Session.get(). 1. How do you avoid this error? This is a LazyInstantiationException. It happens when you try to lazy-load some property value from an object that is not associated with an open session. To associate an object with a session. do session.lock(object, LockMode.NONE). 2. Why is this a Jetty error and not a Tapestry5 error message? Is this something I should report as bugreport? IMHO, it is a bug. -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Weird bug
22:26:06.468 ERROR! [SocketListener0-1] org.hibernate.LazyInitializationException.init(LazyInitializationException.java:19) 69 could not initialize proxy - no Session org.hibernate.LazyInitializationException: could not initialize proxy - no Session at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:57) at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:111) at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:150) at tm.framework.entities.Domain$$EnhancerByCGLIB$$f7ca86bf.getDomainName(generated) at tm.framework.pages.EditDomain.getTest(EditDomain.java:114) at $PropertyConduit_11f0f99b38b.get($PropertyConduit_11f0f99b38b.java) at org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:53) at org.apache.tapestry5.internal.structure.ExpansionPageElement.render(ExpansionPageElement.java:47) at org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:68) at org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:108) at $PageRenderQueue_11f0f99b281.render($PageRenderQueue_11f0f99b281.java) at $PageRenderQueue_11f0f99b277.render($PageRenderQueue_11f0f99b277.java) at org.apache.tapestry5.services.TapestryModule$15.renderMarkup(TapestryModule.java:1128) at org.apache.tapestry5.services.TapestryModule$24.renderMarkup(TapestryModule.java:1472) at $MarkupRenderer_11f0f99b283.renderMarkup($MarkupRenderer_11f0f99b283.java) at org.apache.tapestry5.services.TapestryModule$23.renderMarkup(TapestryModule.java:1453) at $MarkupRenderer_11f0f99b283.renderMarkup($MarkupRenderer_11f0f99b283.java) at org.apache.tapestry5.services.TapestryModule$22.renderMarkup(TapestryModule.java:1435) at $MarkupRenderer_11f0f99b283.renderMarkup($MarkupRenderer_11f0f99b283.java) at org.apache.tapestry5.services.TapestryModule$21.renderMarkup(TapestryModule.java:1415) at $MarkupRenderer_11f0f99b283.renderMarkup($MarkupRenderer_11f0f99b283.java) at $MarkupRenderer_11f0f99b27f.renderMarkup($MarkupRenderer_11f0f99b27f.java) at org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:64) at $PageMarkupRenderer_11f0f99b27d.renderPageMarkup($PageMarkupRenderer_11f0f99b27d.java) at org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:57) at $PageResponseRenderer_11f0f99b20d.renderPageResponse($PageResponseRenderer_11f0f99b20d.java) at org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:59) at org.apache.tapestry5.services.TapestryModule$29.handle(TapestryModule.java:1653) at $PageRenderRequestHandler_11f0f99b20e.handle($PageRenderRequestHandler_11f0f99b20e.java) at $PageRenderRequestHandler_11f0f99b204.handle($PageRenderRequestHandler_11f0f99b204.java) at org.apache.tapestry5.internal.services.PageRenderDispatcher.process(PageRenderDispatcher.java:97) at org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:73) at $Dispatcher_11f0f99b209.dispatch($Dispatcher_11f0f99b209.java) at $Dispatcher_11f0f99b1fb.dispatch($Dispatcher_11f0f99b1fb.java) at org.apache.tapestry5.services.TapestryModule$13.service(TapestryModule.java:953) at org.apache.tapestry5.internal.services.LocalizationFilter.service(LocalizationFilter.java:42) at $RequestHandler_11f0f99b1fc.service($RequestHandler_11f0f99b1fc.java) at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:586) at $RequestHandler_11f0f99b1fc.service($RequestHandler_11f0f99b1fc.java) at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) at $RequestHandler_11f0f99b1fc.service($RequestHandler_11f0f99b1fc.java) at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:79) at $RequestHandler_11f0f99b1fc.service($RequestHandler_11f0f99b1fc.java) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:93) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:84) at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:83) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:106) at $RequestHandler_11f0f99b1fc.service($RequestHandler_11f0f99b1fc.java) at $RequestHandler_11f0f99b1f4.service($RequestHandler_11f0f99b1f4.java) at
Re: autocomplete, display more info
Em Sun, 25 Jan 2009 11:00:06 -0300, Piero Sartini li...@pierosartini.de escreveu: I am facing this problem as well - is there any solution? (what I want to do is to return a Map in my onProvideCompletionFromField event. The key gets submitted by the form, the value is presented to the user) This is a common needed fuctionality, I guess. So we need something like an AutocompleteObject mixin that returns a SelectModel (just as Select's model parameter). Has anyone implemented this? This could be a very nice addition to the Tapestry component collection. ;) -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Weird Bug II
This bug is a different bug, so I start a new threadbut it has the same effect. Hope I can contribute to make Tapestry more stable as far as errors is concerned...even if those errors should be stupid errors. Instead of a Tapestry error page there is a server error again: HTTP ERROR: 500 Render queue error in BeginRender[core/ExceptionReport:renderobject_0]: org.apache.tapestry5.ioc.internal.util.TapestryException RequestURI=/editdomain.domaineditor Powered by Jetty:// This is caused when I add a toString method: public String toString(){ if (value!=null){ return Value: .concat(value.getName()); } else { return Text: .concat(this.getText()); } } Without this method it works. The toString method is used inside of: void onValidateForm() { for (ConfigurationValue configurationValue : list) { System.out.println(configurationValue); ... } (usually I use log - but this was just a quick test!) 22:32:33.921 WARN!! [SocketListener0-1] org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:590) 11 /editdomain.domaineditor: org.apache.tapestry5.internal.services.RenderQueueException: Render queue error in BeginRender[core/ExceptionReport:renderobject_0]: org.apache.tapestry5.ioc.internal.util.TapestryException [at classpath:org/apache/tapestry5/corelib/pages/ExceptionReport.tml, line 30, column 78] at org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:80) at org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:108) at $PageRenderQueue_11f0fb4d548.render($PageRenderQueue_11f0fb4d548.java) at $PageRenderQueue_11f0fb4d53e.render($PageRenderQueue_11f0fb4d53e.java) at org.apache.tapestry5.services.TapestryModule$15.renderMarkup(TapestryModule.java:1128) at org.apache.tapestry5.services.TapestryModule$24.renderMarkup(TapestryModule.java:1472) at $MarkupRenderer_11f0fb4d54a.renderMarkup($MarkupRenderer_11f0fb4d54a.java) at org.apache.tapestry5.services.TapestryModule$23.renderMarkup(TapestryModule.java:1453) at $MarkupRenderer_11f0fb4d54a.renderMarkup($MarkupRenderer_11f0fb4d54a.java) at org.apache.tapestry5.services.TapestryModule$22.renderMarkup(TapestryModule.java:1435) at $MarkupRenderer_11f0fb4d54a.renderMarkup($MarkupRenderer_11f0fb4d54a.java) at org.apache.tapestry5.services.TapestryModule$21.renderMarkup(TapestryModule.java:1415) at $MarkupRenderer_11f0fb4d54a.renderMarkup($MarkupRenderer_11f0fb4d54a.java) at $MarkupRenderer_11f0fb4d546.renderMarkup($MarkupRenderer_11f0fb4d546.java) at org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:64) at $PageMarkupRenderer_11f0fb4d544.renderPageMarkup($PageMarkupRenderer_11f0fb4d544.java) at org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:57) at $PageResponseRenderer_11f0fb4d4d4.renderPageResponse($PageResponseRenderer_11f0fb4d4d4.java) at org.apache.tapestry5.internal.services.DefaultRequestExceptionHandler.handleRequestException(DefaultRequestExceptionHandler.java:64) at $RequestExceptionHandler_11f0fb4d4c1.handleRequestException($RequestExceptionHandler_11f0fb4d4c1.java) at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:42) at $RequestHandler_11f0fb4d4c3.service($RequestHandler_11f0fb4d4c3.java) at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:79) at $RequestHandler_11f0fb4d4c3.service($RequestHandler_11f0fb4d4c3.java) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:93) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:84) at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:83) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:106) at $RequestHandler_11f0fb4d4c3.service($RequestHandler_11f0fb4d4c3.java) at $RequestHandler_11f0fb4d4bb.service($RequestHandler_11f0fb4d4bb.java) at org.apache.tapestry5.services.TapestryModule$12.service(TapestryModule.java:933) at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62) at $HttpServletRequestFilter_11f0fb4d4ba.service($HttpServletRequestFilter_11f0fb4d4ba.java) at $HttpServletRequestHandler_11f0fb4d4bc.service($HttpServletRequestHandler_11f0fb4d4bc.java) at