org.hibernate.PersistentObjectException: detached entity passed to persist: com.searcher.entity.EcommerceEntity

Stack Overflow | Guyb | 5 months ago
  1. 0

    Spring 4.3.0.RELEASE + Hibernate 5.2.0.Final -Error.. with root cause org.hibernate.PersistentObjectException

    Stack Overflow | 5 months ago | Guyb
    org.hibernate.PersistentObjectException: detached entity passed to persist: com.searcher.entity.EcommerceEntity
  2. 0

    Why JPA commit fails in Application, but works in JUnit?

    Stack Overflow | 2 years ago | isobretatel
    org.hibernate.PersistentObjectException: detached entity passed to persist: com.archibus.domain.hierarchy.Node
  3. 0

    Spring: detached entity passed to persist

    Stack Overflow | 2 years ago | Alex
    org.hibernate.PersistentObjectException: detached entity passed to persist: bean.Ordine
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    playframework org.hibernate.PersistentObjectException: detached entity passed to persist: models

    Stack Overflow | 3 years ago | masterdany88
    org.hibernate.PersistentObjectException: detached entity passed to persist: models.MedicalIncident
  6. 0

    saving new entity with relationships to two existing entities

    Stack Overflow | 3 years ago | CodeMed
    org.springframework.dao.InvalidDataAccessApiUsageException: detached entity passed to persist: org.springframework.samples.knowledgemanager.model.Provider; nested exception is org.hibernate.PersistentObjectException: detached entity passed to persist: org.springframework.samples.knowledgemanager.model.Provider

  1. linxiaolong 3 times, last 4 months ago
  2. thiago.santos 1 times, last 6 months ago
  3. tjago 1 times, last 8 months ago
7 unregistered visitors
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: com.searcher.entity.EcommerceEntity

    at org.hibernate.event.internal.DefaultPersistEventListener.onPersist()
  2. Hibernate
    SessionImpl.persist
    1. org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:124)
    2. org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:58)
    3. org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:756)
    4. org.hibernate.internal.SessionImpl.persist(SessionImpl.java:736)
    5. org.hibernate.internal.SessionImpl.persist(SessionImpl.java:741)
    5 frames
  3. com.searcher.dao
    EcommerceImp.add
    1. com.searcher.dao.EcommerceImp.add(EcommerceImp.java:29)
    1 frame
  4. com.searcher.service
    EcommerceServiceImp.add
    1. com.searcher.service.EcommerceServiceImp.add(EcommerceServiceImp.java:26)
    1 frame
  5. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:498)
    4 frames
  6. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
    2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    3 frames
  7. Spring Tx
    TransactionInterceptor.invoke
    1. org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
    2. org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
    3. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    3 frames
  8. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
    2 frames
  9. com.sun.proxy
    $Proxy33.add
    1. com.sun.proxy.$Proxy33.add(Unknown Source)
    1 frame
  10. com.searcher.controller
    MainSearcherController.helloWorld
    1. com.searcher.controller.MainSearcherController.helloWorld(MainSearcherController.java:46)
    1 frame
  11. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:498)
    4 frames
  12. Spring
    InvocableHandlerMethod.invokeForRequest
    1. org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
    2. org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
    2 frames
  13. Spring MVC
    FrameworkServlet.doGet
    1. org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:114)
    2. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
    3. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
    4. org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
    5. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
    6. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
    7. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
    8. org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
    8 frames
  14. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
    1 frame
  15. Spring MVC
    FrameworkServlet.service
    1. org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
    1 frame
  16. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    1 frame
  17. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    2 frames
  18. Tomcat WS
    WsFilter.doFilter
    1. org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    1 frame
  19. Glassfish Core
    CoyoteAdapter.service
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
    4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
    7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    8. org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
    9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
    10 frames
  20. Grizzly HTTP
    NioEndpoint$SocketProcessor.run
    1. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099)
    2. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670)
    3. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
    4. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
    4 frames
  21. Java RT
    ThreadPoolExecutor$Worker.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    2 frames
  22. Tomcat Util
    TaskThread$WrappingRunnable.run
    1. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    1 frame
  23. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)
    1 frame