• 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
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown

IllegalArgumentException: Removing a detached instance

Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hibernate and Spring are running.
I've two tables in a one-to-many relation.
When I try to remove an object (from the "many" side) I get the message "IllegalArgumentException: Removing a detached instance"
I've already read some older topics. They suggest that when you have a detached object, you need to relaod it in a new hibernate session. It is possible to do that with a merge operation.

I keep on getting the same error. I don't know what else to do!!

Here my code:

and here the relations between objects:


Please, can anyone help me?
thank you
    Bookmark Topic Watch Topic
  • New Topic