Problème de lancement Servlet avec Hibernate
Salut,
J'ai fait une classe de test pour tester ma configuration Hibernate et tout fonctionne. J'ai donc voulu faire mes JSP.
Déjà lorsque je lance TOMCAT j'ai des trucs bizarre ... Et à la fin c'est lancé avec cette erreur :
10:27:30,617 DEBUG StandardWrapper:700 - Returning non-STM instance
Ensuite j'utilise dans mon code :
getServletConfig().getServletContext().getRequestDispatcher("/index.jsp?page=1").forward(req, resp);
Je me suis aperçu avec le mode débugg que ça plantait sur cette instruction.
Voici l'erreur :
10:28:01,648 ERROR LazyInitializationException:19 - could not initialize proxy - the owning Session was closed
org.hibernate.LazyInitializationException: could not initialize proxy - the owning Session was closed
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:56)
at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:98)
at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:158)
at com.simecom.planning.pojo.Niveau$$EnhancerByCGLIB$$102a4f7f.getLibelle(<generated>)
Donc, je ne sais pas trop quoi faire ni d'ou cela vient. Est-ce qu'il faut utiliser des Lazy ???
J'attends votre aide.
Merci d'avance.