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