javax.persistence.PersistenceException: org.hibernate.PersistentObjectException: detached entity passed to persist: org.hibernate.jpa.test.cascade.DetachAndContainsTest$Tooth

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Hibernate JIRA by Réda Housni Alaoui, 1 year ago
org.hibernate.PersistentObjectException: detached entity passed to persist: org.hibernate.jpa.test.cascade.DetachAndContainsTest$Tooth
via Hibernate JIRA by Réda Housni Alaoui, 1 year ago
org.hibernate.PersistentObjectException: detached entity passed to persist: org.hibernate.jpa.test.cascade.DetachAndContainsTest$Tooth
via Stack Overflow by dazito
, 1 year ago
org.hibernate.PersistentObjectException: detached entity passed to persist: view.Person
via qnundrum.com by Unknown author, 1 year ago
org.hibernate.PersistentObjectException: detached entity passed to persist: view.Person
via Stack Overflow by Dinesh Ranawat
, 1 year ago
org.hibernate.PersistentObjectException: detached entity passed to persist: com.mycompany.app.Department
via Stack Overflow by java developer
, 2 years ago
org.hibernate.PersistentObjectException: detached entity passed to persist: model.twitter.entities.Url
org.hibernate.PersistentObjectException: detached entity passed to persist: org.hibernate.jpa.test.cascade.DetachAndContainsTest$Tooth
at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:124)
at org.hibernate.internal.SessionImpl.firePersistOnFlush(SessionImpl.java:801)
at org.hibernate.internal.SessionImpl.persistOnFlush(SessionImpl.java:794)
at org.hibernate.engine.spi.CascadingActions$8.cascade(CascadingActions.java:340)
at org.hibernate.engine.internal.Cascade.cascadeToOne(Cascade.java:379)
at org.hibernate.engine.internal.Cascade.cascadeAssociation(Cascade.java:304)
at org.hibernate.engine.internal.Cascade.cascadeProperty(Cascade.java:146)
at org.hibernate.engine.internal.Cascade.cascadeCollectionElements(Cascade.java:412)
at org.hibernate.engine.internal.Cascade.cascadeCollection(Cascade.java:344)
at org.hibernate.engine.internal.Cascade.cascadeAssociation(Cascade.java:307)
at org.hibernate.engine.internal.Cascade.cascadeProperty(Cascade.java:146)
at org.hibernate.engine.internal.Cascade.cascade(Cascade.java:95)
at org.hibernate.event.internal.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEventListener.java:150)
at org.hibernate.event.internal.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:141)
at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:74)
at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:38)
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1224)
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:1300)
at org.hibernate.jpa.test.cascade.DetachAndContainsTest.testDetachCollectionElementAndFlush(DetachAndContainsTest.java:80)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)

Users with the same issue

Once, 1 month ago
Once, 7 months ago
3 times, 9 months ago
2 times, 10 months ago
3 times, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.