Hi,

thanks for your quick answer but since iolite doesn't seem to use a
custom WebRequestCycle to manage the persistence sessions and we're not
using spring at all I can't find any first-glance-similarities but
haven't had the time to dive deeper into iolite yet.

> -----Original Message-----
> From: Nino Saturnino Martinez Vazquez Wael
> [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 17, 2008 5:42 PM
> To: users@wicket.apache.org
> Subject: Re: FW: WicketTester, ListView, Hibernate and a custom
> WebRequestCycle
> 
> See the wicket iolite maven archetype, are it setup like that?
> 
> David Hendrix wrote:
> > Hi,
> >
> > we're using a custom WebRequestCycle in our application to handle
our
> > Hibernate session. In onBeginRequest() the session is opened and
> closes
> > in onEndRequest(). This works just fine when using Tomcat but fails
> with
> > WicketTester.
> >
> > WicketTester is constructed using our application and the target
> > directory to use the custom made classes, which is fine for most of
> our
> > components except when using hibernate objects to populate
ListViews.
> > Logfiles indicate that onEndRequest() is called before
> populateItems()
> > is run, so any use of an uninitialized hibernate proxy inside a
> ListView
> > causes an Hibernate Exception
> > (org.hibernate.LazyInitializationException: could not initialize
> proxy -
> > no Session) and result in a failed test.
> >
> > A quickstart showing the failure is hard to cough up since it would
> > involve an oracle database (I didn't had the time to check any other
> > databases), but here's an excerpt from the logfile:
> >
> > 2008-07-17 15:25:33,783 DEBUG [main] com.dr.e5: adding startup
> > configuration to session
> > --> This is onBeginRequest() opening the sessions
> > 2008-07-17 15:25:33,939 INFO  [main] com.dr.e5: committing hibernate
> > session: dev
> > --> This is onEndRequest() committing the sessions
> > 2008-07-17 15:25:33,955 DEBUG [main] com.dr.e5: adding startup
> > configuration to session
> > --> This is onbeginRequest opening another set of sessions
> > 2008-07-17 15:25:34,002 ERROR [main]
> > org.hibernate.LazyInitializationException: could not initialize
proxy
> -
> > no Session
> >
> > --> and this is finally hibernate failing to load from a proxy
> formerly
> > attached tot he first set of sessions...
> >
> > Why is onEndRequest() called that early and why is onBeginRequest()
> > called twice?
> > Is there any way around this except checking and possibly
reattaching
> > every proxy just for testing since it works just fine in 'real
life'?
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> --
> -Wicket for love
> 
> Nino Martinez Wael
> Java Specialist @ Jayway DK
> http://www.jayway.dk
> +45 2936 7684
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-David Hendrix

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to