could not initialize proxy - no Session

could not initialize proxy - no Session

 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:86)
 at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:140)
 at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:190)
 at com.yuweitek.mmp.model.CarCorpInfo_$$_javassist_73.getCorpName(CarCorpInfo_$$_javassist_73.java)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at javax.el.BeanELResolver.getValue(BeanELResolver.java:87)
 ... 106 more  

Yuor service layer is transactional, transaction is over/ended as soon as you are back in the controller. No more session. Use OpenSessionInViewFilter or Interceptor to keep the session open.

你可能感兴趣的:(could not initialize proxy - no Session)