• 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

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

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.

Ashok Mor
Do Re Mi Fa So La Tiny Ad
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
    Bookmark Topic Watch Topic
  • New Topic