File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Solution to "Illegal attempt to associate a collection with two open sessions"

 
Rafael Gabriel
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody!
I need a solution to my problem without affecting my whole application.

I'm getting the error "Illegal attempt to associate a collection with two open sessions" and I can not solve.

My DAO:


My HibernateUtil:


My code getting error:


Error is in "clienteDao.deleteC(cliente)...

I can not close the session "getClienteById" because my fields LAZY not work.
What can I do?

Thanks!

My entity:


Full error:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic