Guest User

Untitled

a guest
Jul 23rd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. entity.getLazyLoadedCollection();
  2.  
  3. ERROR org.hibernate.LazyInitializationException IP127.0.0.1 CV#4c44559c-c576-4732 P#75004 - could not initialize proxy - no Session
  4. org.hibernate.LazyInitializationException: could not initialize proxy - no Session
  5. at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:167)
  6. at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:215)
  7. at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:190)
  8. at core.model.entities.WorkflowState_$$_javassist_36.getFunctions(WorkflowState_$$_javassist_36.java)
  9.  
  10. getSession().merge(entity);
  11.  
  12. if (getSession().contains(entity)) {
  13. getHibernateTemplate().merge(person);
  14. } else {
  15. getSession.update(entity);
  16. }
  17.  
  18. Hibernate.initialize(object.getMyLazyCollection());
  19.  
  20. if(object.getMyLazyCollection() != null) {
  21. object.getMyLazyCollection().size(); // forces a collection load
  22. }
Add Comment
Please, Sign In to add comment