Re: Lazy load exception wicket and hibernate

2008-03-30 Thread Igor Vaynberg
On Sat, Mar 29, 2008 at 8:04 PM, James Carman [EMAIL PROTECTED] wrote: So, I think you just have it backwards. The OpenEntityManagerInViewFilter should be mapped before the WicketFilter. i dont know if my english is broken or what, but i believe that is exactly what ive been saying all

Re: Lazy load exception wicket and hibernate

2008-03-30 Thread lars vonk
Sorry, my bad. I made a typo earlier what may have caused the confusion: On Sat, Mar 29, 2008 at 7:15 AM, lars vonk [EMAIL PROTECTED] wrote: IIRC you should put the OpenEntityManagerInViewFilter definition in the filter-mapping after the WicketFilter otherwise the WicketFilter will come

Re: Lazy load exception wicket and hibernate

2008-03-30 Thread James Carman
On Sun, Mar 30, 2008 at 6:01 AM, lars vonk [EMAIL PROTECTED] wrote: IIRC you should put the OpenEntityManagerInViewFilter definition in the filter-mapping after the WicketFilter otherwise the WicketFilter will come first. I of course meant *before the WicketFilter*, because like I

Re: Lazy load exception wicket and hibernate

2008-03-29 Thread lars vonk
What is the order of the filters you defined in your filter-mapping element in the web.xml. IIRC you should put the OpenEntityManagerInViewFilter definition in the filter-mapping after the WicketFilter otherwise the WicketFilter will come first. Lars On Fri, Mar 28, 2008 at 9:11 PM, cjlyth

Re: Lazy load exception wicket and hibernate

2008-03-29 Thread Igor Vaynberg
erm, i thought filters were executed in the order they were defined in web.xml. so open..inview should be declared before wicket. and its not the filter-mapping but the filter element... -igor On Sat, Mar 29, 2008 at 4:15 AM, lars vonk [EMAIL PROTECTED] wrote: What is the order of the filters

Re: Lazy load exception wicket and hibernate

2008-03-29 Thread lars vonk
They are initialized in the order they are defined, but executed in the order of filter-mapping: Quote from servlet spec 2.4: The order the container uses in building the chain of filters to be applied for a particular request URI is as follows: 1. First, the url-pattern matching filter

Re: Lazy load exception wicket and hibernate

2008-03-29 Thread Igor Vaynberg
thanks. i always thought it was the other way, probably because i googled it at the time instead of reading the spec. if you google web.xml filter order the first hit you get is http://www.onjava.com/pub/a/onjava/2001/05/10/servlet_filters.html?page=3 which states that it is the order they are

Re: Lazy load exception wicket and hibernate

2008-03-29 Thread James Carman
On Sat, Mar 29, 2008 at 7:15 AM, lars vonk [EMAIL PROTECTED] wrote: What is the order of the filters you defined in your filter-mapping element in the web.xml. IIRC you should put the OpenEntityManagerInViewFilter definition in the filter-mapping after the WicketFilter otherwise the

Re: Lazy load exception wicket and hibernate

2008-03-29 Thread Igor Vaynberg
it will execute _after_ the wicket filter. which is no good because you need lazy loading to work inside wicket filter, so you need oemiv to execute before. and possibly, if wicket filter never calls chain.dofilter it will never execute. -igor On Sat, Mar 29, 2008 at 7:02 PM, James Carman

Re: Lazy load exception wicket and hibernate

2008-03-29 Thread James Carman
On Sat, Mar 29, 2008 at 10:14 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: it will execute _after_ the wicket filter. which is no good because you need lazy loading to work inside wicket filter, so you need oemiv to execute before. and possibly, if wicket filter never calls chain.dofilter it

Re: Lazy load exception wicket and hibernate

2008-03-28 Thread cjlyth
I have been getting the same error. I feel like im missing something. Maybe I am doing something horibly wrong but I haven't been able to figure out what it is. I am using spring 2.5, Wicket 1.3.2, and I have put the OpenEntityManagerInViewFilter in my web xml. The filter is loading ok, im not

Re: Lazy load exception wicket and hibernate

2008-03-11 Thread James Carman
On 3/11/08, Mathias P.W Nilsson [EMAIL PROTECTED] wrote: Hi! I'm using wicket with hibernate and spring. In my web.xml I have OpenEntityManagerInViewFilter. But when trying to add a dataview to my wicket page I get the org.hibernate.LazyInitializationException: could not initialize

Re: Lazy load exception wicket and hibernate

2008-03-11 Thread Mathias P.W Nilsson
Not exactly sure what you mean here since this is my first time trying wicket and hibernate, spring. I have spring annoted daos that I use ex. myDao().getList(); returns a list that has lazy object references. When I try to evoke a method on the lazy object I get the exception. I have solved i

Re: Lazy load exception wicket and hibernate

2008-03-11 Thread James Carman
Show us some code, please. How are you setting things up? On 3/11/08, Mathias P.W Nilsson [EMAIL PROTECTED] wrote: Not exactly sure what you mean here since this is my first time trying wicket and hibernate, spring. I have spring annoted daos that I use myDao().getList(); returns a list