net.sf.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: 7045164, of class: com.atlassian.confluence.pages.Page

Atlassian JIRA | Roberto Dominguez | 9 years ago
  1. 0

    Here's the scenario: * Rendering some content on Page A * At the end of rendering, I am trying to add a comment to Page B commentManager.refreshContentEntity(pageB); commentManager.addCommentToPage(pageB, null,"Da message"); Here it the stacktrace: org.springframework.orm.hibernate.HibernateSystemException: a different object with the same identifier value was already associated with the session: 7045164, of class: com.atlassian.confluence.pages.Page; nested exception is net.sf.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: 7045164, of class: com.atlassian.confluence.pages.Page net.sf.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: 7045164, of class: com.atlassian.confluence.pages.Page at net.sf.hibernate.impl.SessionImpl.checkUniqueness(SessionImpl.java:1687) at net.sf.hibernate.impl.SessionImpl.doUpdateMutable(SessionImpl.java:1453) at net.sf.hibernate.impl.SessionImpl.doUpdate(SessionImpl.java:1480) at net.sf.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:1403) at net.sf.hibernate.engine.Cascades$4.cascade(Cascades.java:114) at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:436) at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:503) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:901) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:868) at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:790) at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:749) at net.sf.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:1398) at org.springframework.orm.hibernate.HibernateTemplate$16.doInHibernate(HibernateTemplate.java:532) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:312) at org.springframework.orm.hibernate.HibernateTemplate.saveOrUpdate(HibernateTemplate.java:529) at com.atlassian.hibernate.HibernateObjectDao.saveRaw(HibernateObjectDao.java:148) at com.atlassian.hibernate.HibernateObjectDao.save(HibernateObjectDao.java:118) at com.atlassian.confluence.pages.DefaultCommentManager.addCommentToPage(DefaultCommentManager.java:44) at sun.reflect.GeneratedMethodAccessor1273.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:284) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:155) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:56) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174) at $Proxy27.addCommentToPage(Unknown Source)

    Atlassian JIRA | 9 years ago | Roberto Dominguez
    net.sf.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: 7045164, of class: com.atlassian.confluence.pages.Page
  2. 0

    Here's the scenario: * Rendering some content on Page A * At the end of rendering, I am trying to add a comment to Page B commentManager.refreshContentEntity(pageB); commentManager.addCommentToPage(pageB, null,"Da message"); Here it the stacktrace: org.springframework.orm.hibernate.HibernateSystemException: a different object with the same identifier value was already associated with the session: 7045164, of class: com.atlassian.confluence.pages.Page; nested exception is net.sf.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: 7045164, of class: com.atlassian.confluence.pages.Page net.sf.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: 7045164, of class: com.atlassian.confluence.pages.Page at net.sf.hibernate.impl.SessionImpl.checkUniqueness(SessionImpl.java:1687) at net.sf.hibernate.impl.SessionImpl.doUpdateMutable(SessionImpl.java:1453) at net.sf.hibernate.impl.SessionImpl.doUpdate(SessionImpl.java:1480) at net.sf.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:1403) at net.sf.hibernate.engine.Cascades$4.cascade(Cascades.java:114) at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:436) at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:503) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:901) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:868) at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:790) at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:749) at net.sf.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:1398) at org.springframework.orm.hibernate.HibernateTemplate$16.doInHibernate(HibernateTemplate.java:532) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:312) at org.springframework.orm.hibernate.HibernateTemplate.saveOrUpdate(HibernateTemplate.java:529) at com.atlassian.hibernate.HibernateObjectDao.saveRaw(HibernateObjectDao.java:148) at com.atlassian.hibernate.HibernateObjectDao.save(HibernateObjectDao.java:118) at com.atlassian.confluence.pages.DefaultCommentManager.addCommentToPage(DefaultCommentManager.java:44) at sun.reflect.GeneratedMethodAccessor1273.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:284) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:155) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:56) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174) at $Proxy27.addCommentToPage(Unknown Source)

    Atlassian JIRA | 9 years ago | Roberto Dominguez
    net.sf.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: 7045164, of class: com.atlassian.confluence.pages.Page
  3. 0

    Cause: org.springframework.orm.hibernate.HibernateSystemException: a different object with the same identifier value was already associated with the session: 3, of class: com.opensymphony.user.provider.hibernate.entity.HibernateUser; nested exception is: net.sf.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: 3, of class: com.opensymphony.user.provider.hibernate.entity.HibernateUser Stack Trace: [hide] org.springframework.orm.hibernate.HibernateSystemException: a different object with the same identifier value was already associated with the session: 3, of class: com.opensymphony.user.provider.hibernate.entity.HibernateUser; nested exception is: net.sf.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: 3, of class: com.opensymphony.user.provider.hibernate.entity.HibernateUser net.sf.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: 3, of class: com.opensymphony.user.provider.hibernate.entity.HibernateUser at net.sf.hibernate.impl.SessionImpl.checkUniqueness(SessionImpl.java:1614) at net.sf.hibernate.impl.SessionImpl.doUpdateMutable(SessionImpl.java:1386) at net.sf.hibernate.impl.SessionImpl.doUpdate(SessionImpl.java:1412) at net.sf.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:1336) at org.springframework.orm.hibernate.HibernateTemplate$8.doInHibernate(HibernateTemplate.java:312) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:147) at org.springframework.orm.hibernate.HibernateTemplate.saveOrUpdate(HibernateTemplate.java:310) at com.atlassian.confluence.user.persistence.dao.hibernate.ConfluenceUserDAO.updateUser(ConfluenceUserDAO.java:138) at com.opensymphony.user.provider.hibernate.HibernateAccessProvider.addToGroup(HibernateAccessProvider.java:37) at com.atlassian.confluence.user.providers.ConfluenceAccessProvider.addToGroup(ConfluenceAccessProvider.java:107) at com.opensymphony.user.User.addToGroup(User.java:117) at com.atlassian.confluence.user.actions.EditUserGroupsAction.execute(EditUserGroupsAction.java:68) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:173) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:37) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170) at com.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor.intercept(DefaultWorkflowInterceptor.java:58) at com.atlassian.confluence.core.ConfluenceWorkflowInterceptor.intercept(ConfluenceWorkflowInterceptor.java:32) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:37) at com.atlassian.confluence.core.ConfluenceValidationInterceptor.intercept(ConfluenceValidationInterceptor.java:18) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:37) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170) at com.atlassian.confluence.security.actions.PermissionCheckInterceptor.intercept(PermissionCheckInterceptor.java:40) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:37) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:37) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:37) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:37) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170) at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:116) at com.opensymphony.webwork.dispatcher.ServletDispatcher.serviceAction(ServletDispatcher.java:182) at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:162) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:129) at com.atlassian.confluence.util.profiling.ProfilingPageFilter.parsePage(ProfilingPageFilter.java:36) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:61) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:161) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.seraph.filter.LoginFilter.doFilter(LoginFilter.java:181) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.johnson.filters.JohnsonFilter.doFilter(JohnsonFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:83) at com.atlassian.confluence.setup.SpringSessionInViewFilter.doFilterInternal(SpringSessionInViewFilter.java:32) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:39) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:132) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.core.filters.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:38) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666) at java.lang.Thread.run(Thread.java:536) Referer URL: http://alexandria.ucsb.edu:8080/confluence/admin/users/editusergroups-start.action?username=lrose

    Atlassian JIRA | 1 decade ago | david valentine
    net.sf.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: 3, of class: com.opensymphony.user.provider.hibernate.entity.HibernateUser
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Bundle Fails to Publish

    GitHub | 4 years ago | wezell
    com.dotmarketing.exception.DotHibernateException: Unable to save/update Object to Hibernate Session

    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. net.sf.hibernate.NonUniqueObjectException

      a different object with the same identifier value was already associated with the session: 7045164, of class: com.atlassian.confluence.pages.Page

      at net.sf.hibernate.impl.SessionImpl.checkUniqueness()
    2. net.sf.hibernate
      SessionImpl.saveOrUpdate
      1. net.sf.hibernate.impl.SessionImpl.checkUniqueness(SessionImpl.java:1687)
      2. net.sf.hibernate.impl.SessionImpl.doUpdateMutable(SessionImpl.java:1453)
      3. net.sf.hibernate.impl.SessionImpl.doUpdate(SessionImpl.java:1480)
      4. net.sf.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:1403)
      5. net.sf.hibernate.engine.Cascades$4.cascade(Cascades.java:114)
      6. net.sf.hibernate.engine.Cascades.cascade(Cascades.java:436)
      7. net.sf.hibernate.engine.Cascades.cascade(Cascades.java:503)
      8. net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:901)
      9. net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:868)
      10. net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:790)
      11. net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:749)
      12. net.sf.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:1398)
      12 frames
    3. Hibernate
      HibernateTemplate.saveOrUpdate
      1. org.springframework.orm.hibernate.HibernateTemplate$16.doInHibernate(HibernateTemplate.java:532)
      2. org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:312)
      3. org.springframework.orm.hibernate.HibernateTemplate.saveOrUpdate(HibernateTemplate.java:529)
      3 frames
    4. com.atlassian.hibernate
      HibernateObjectDao.save
      1. com.atlassian.hibernate.HibernateObjectDao.saveRaw(HibernateObjectDao.java:148)
      2. com.atlassian.hibernate.HibernateObjectDao.save(HibernateObjectDao.java:118)
      2 frames
    5. com.atlassian.confluence
      DefaultCommentManager.addCommentToPage
      1. com.atlassian.confluence.pages.DefaultCommentManager.addCommentToPage(DefaultCommentManager.java:44)
      1 frame
    6. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor1273.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:585)
      3 frames
    7. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:284)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:155)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122)
      3 frames
    8. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:56)
      1 frame
    9. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
      2 frames
    10. Unknown
      $Proxy27.addCommentToPage
      1. $Proxy27.addCommentToPage(Unknown Source)
      1 frame