org.hibernate.PersistentObjectException: detached entity passed to persist: de.brockhaus.stock.entity.Stock

Stack Overflow | julian | 9 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Detached entity error caused by cascade attribute

    Stack Overflow | 9 months ago | julian
    org.hibernate.PersistentObjectException: detached entity passed to persist: de.brockhaus.stock.entity.Stock
  2. 0

    JPA: bulk save child and parent entities at the same time

    Stack Overflow | 6 months ago | Tofrar
    java.lang.IllegalStateException: Failed to execute CommandLineRunner
  3. 0

    org.hibernate.PersistentObjectException: detached entity passed to persist | 学步园

    xuebuyuan.com | 11 months ago
    org.hibernate.PersistentObjectException: detached entity passed to persist: com.richsoft.middleware.domain.User
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    detached entity passed to persist: Profile

    Stack Overflow | 12 months ago | nbro
    org.hibernate.PersistentObjectException: detached entity passed to persist: com.mycompany.app.models.Profile
  6. 0

    Spring Data Jpa - Self many to many with additional column

    Stack Overflow | 10 months ago | Tarasare
    org.springframework.dao.InvalidDataAccessApiUsageException: detached entity passed to persist: com.sopiyan.travel.model.entity.Terminal; nested exception is org.hibernate.PersistentObjectException: detached entity passed to persist: com.sopiyan.travel.model.entity.Terminal
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.hibernate.PersistentObjectException

    detached entity passed to persist: de.brockhaus.stock.entity.Stock

    at org.hibernate.event.internal.DefaultPersistEventListener.onPersist()
  2. Hibernate
    SessionImpl.persist
    1. org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:124)
    2. org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:765)
    3. org.hibernate.internal.SessionImpl.persist(SessionImpl.java:758)
    3 frames
  3. org.hibernate.jpa
    JpaPersistEventListener$1.cascade
    1. org.hibernate.jpa.event.internal.core.JpaPersistEventListener$1.cascade(JpaPersistEventListener.java:80)
    1 frame
  4. Hibernate
    AbstractSaveEventListener.saveWithGeneratedId
    1. org.hibernate.engine.internal.Cascade.cascadeToOne(Cascade.java:398)
    2. org.hibernate.engine.internal.Cascade.cascadeAssociation(Cascade.java:323)
    3. org.hibernate.engine.internal.Cascade.cascadeProperty(Cascade.java:162)
    4. org.hibernate.engine.internal.Cascade.cascade(Cascade.java:111)
    5. org.hibernate.event.internal.AbstractSaveEventListener.cascadeBeforeSave(AbstractSaveEventListener.java:425)
    6. org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:249)
    7. org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:178)
    8. org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:121)
    8 frames
  5. org.hibernate.jpa
    JpaPersistEventListener.saveWithGeneratedId
    1. org.hibernate.jpa.event.internal.core.JpaPersistEventListener.saveWithGeneratedId(JpaPersistEventListener.java:67)
    1 frame
  6. Hibernate
    SessionImpl.persist
    1. org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:189)
    2. org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:132)
    3. org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:58)
    4. org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:775)
    5. org.hibernate.internal.SessionImpl.persist(SessionImpl.java:748)
    6. org.hibernate.internal.SessionImpl.persist(SessionImpl.java:753)
    6 frames
  7. org.hibernate.jpa
    AbstractEntityManagerImpl.persist
    1. org.hibernate.jpa.spi.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:1146)
    1 frame