Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • 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
  • 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