I'm just a spring + hibernate beginner. I'm doing a simple project and I set up eveything for transactions, a simple service, a simple dao and all the annotated beans.
Using list works, I can list the objects and their properties, using a Criteria query. But if I try to load an object with:
Session sess = sessionFactory.getCurrentSession();
Ordine res = (Ordine) sess.load(Ordine.class, id);
return res;
the query seems to work fine, but I get a nasty exception when the View tries to read a property (a string):
org.hibernate.LazyInitializationException: could not initialize proxy - no Session
I even noticed this is the startup logs:
INFO: Bean 'mySessionFactory' of type [class org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
What does all this mean?