Oops...I meant:
Bar bar = myApi.getBar();
List<Foo> foos = bar.getFoos();
JulianS wrote:
>
> I am experiencing exactly the problem outlined in the subject of this
> post, and I would really appreciate any help I can get, as I am under a
> deadline. It's the first time I'm using Wicket with JPA, and I just don't
> understand why this isn't working.
>
> I have a Wicket dataprovider that looks like this (I've simplified it a
> bit):
>
> public abstract class FooDataProvider extends SortableDataProvider
> {
> private static final long serialVersionUID = 1L;
>
> @SpringBean
> protected MyAPI myApi;
>
> public FooDataProvider()
> {
> super();
> // Injects the spring bean
> InjectorHolder.getInjector().inject(this);
> }
>
> public Iterator iterator(final int first, final int count)
> {
> List<Bar> bars = myApi.getBars();
> List<Foo> foos = bars.getFoos();
> return foos.iterator();
> }
> }
>
> I am using a very standard Spring JPA setup, and my web.xml includes a
> OpenEntityManagerInViewFilter. The spring bean is being injected properly,
> and my list of Bar is returned correctly. But I get a
> LazyInitializationException no matter what I try. What am I doing wrong?
>
> Many thanks,
> Julian
>
>
--
View this message in context:
http://www.nabble.com/wicket-%2B-spring-%2B-jpa--hibernate-%3D-lazy-load-exception-tp19721199p20309299.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]