• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Hibernate Exception “illegally attempted to associate a proxy with two open Sessions”

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I get hibernate exception “illegally attempted to associate a proxy with two open Sessions”. I tried many wayto resolve this issue but could not find any solutions.

Scenario which I follow is as below:

• Hibernate transaction is stated
• I create new instance of class A
• Load object from DB using HB session, and associates them to newly created instance of A
• Now I create new hibernate transaction and try to save instance of A, on hibernate save here it throws “illegally attempted to associate a proxy with two open Sessions”

Can anyone please suggest way to get out of this HB exception?

Note: I really need to save instance of A into separate transaction then where I created instance of A and loaded it’s associated instances.

Thanks
Ashok Mor
 
reply
    Bookmark Topic Watch Topic
  • New Topic