Discussions

General J2EE: LazyInitializationException in DWR and Hibernate

  1. Hi, I am geting LazyInitializationException while passing a hibernate model over the DWR call. The hibernate model contains few lazy fetch associated objects with in that. please let me know, if any workaround to solve this issue. Thanks, Mahendran.. ---------------------- org.hibernate.LazyInitializationException: could not initialize proxy - no Session at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:57) at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:111) at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:150) at com.iflexsolutions.wm.refdata.model.PortfolioType$$EnhancerByCGLIB$$253a8370.getVerNo() at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) etc..... ----------------
  2. You need to define OpenSessionInViewFilter for your dwr calls.