Uploaded image for project: 'JCommune'
  1. JCommune
  2. JC-1744

NonUniqueObjectException during topic creation

VotersWatchers
    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4 Larks
    • Fix Version/s: 2.6 Larks
    • Labels:
      None
    • Sprint:
      2.5 Larks, 2.6 Larks

      Description

      2014-01-18 17:43:14 [DEBUG][http-4080-6     ][admin][.service.transactional.TransactionalTopicModificationService] - Created new topic id=25577, branch id=1
      , author=admin
      2014-01-18 17:43:16 [DEBUG][http-4080-5     ][admin][org.jtalks.jcommune.web.exception.PrettyLogExceptionResolver] - Resolving exception from handler [publi
      c org.springframework.web.servlet.ModelAndView org.jtalks.jcommune.web.controller.TopicController.createTopic(org.jtalks.jcommune.web.dto.TopicDto,org.sprin
      gframework.validation.BindingResult,java.lang.Long) throws org.jtalks.jcommune.service.exceptions.NotFoundException]: org.springframework.dao.DuplicateKeyEx
      ception: a different object with the same identifier value was already associated with the session: [org.jtalks.jcommune.model.entity.JCUser#1]; nested exce
      ption is org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [org.jtalks.jcom
      mune.model.entity.JCUser#1]
      2014-01-18 17:43:16 [WARN ][http-4080-5     ][admin][                 org.jtalks.jcommune] - Handler execution resulted in exception
      org.springframework.dao.DuplicateKeyException: a different object with the same identifier value was already associated with the session: [org.jtalks.jcommu
      ne.model.entity.JCUser#1]; nested exception is org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associa
      ted with the session: [org.jtalks.jcommune.model.entity.JCUser#1]
              at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:662)
              at org.springframework.orm.hibernate3.HibernateExceptionTranslator.convertHibernateAccessException(HibernateExceptionTranslator.java:89)
              at org.springframework.orm.hibernate3.HibernateExceptionTranslator.translateExceptionIfPossible(HibernateExceptionTranslator.java:68)
              at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:58)
              at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:213)
              at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:163)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
              at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
              at com.sun.proxy.$Proxy64.saveOrUpdate(Unknown Source)
              at org.jtalks.jcommune.service.transactional.TransactionalTopicModificationService.createTopic(TransactionalTopicModificationService.java:171)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
              at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:67)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
              at etm.contrib.aop.aopalliance.EtmMethodCallInterceptor.invoke(EtmMethodCallInterceptor.java:62)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
              at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
              at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
              at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
              at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
              at com.sun.proxy.$Proxy92.createTopic(Unknown Source)
              at org.jtalks.jcommune.web.controller.TopicController.createTopicWithLockHandling(TopicController.java:177)
              at org.jtalks.jcommune.web.controller.TopicController.createTopic(TopicController.java:168)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
              at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
              at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
              at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
              at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686)
              at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
              at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
              at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
              at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
              at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
              at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.jtalks.jcommune.web.filters.HeadRequestTypeFilter.doFilter(HeadRequestTypeFilter.java:45)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.jtalks.jcommune.web.filters.LoggingConfigurationFilter.doFilter(LoggingConfigurationFilter.java:69)
              at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
              at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129)
              at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368)
              at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
              at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
              at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
              at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
              at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
              at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:119)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
              at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
              at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
              at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
              at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
              at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
              at org.jtalks.jcommune.web.filters.UsernamePasswordAuthenticationFilter.doFilter(UsernamePasswordAuthenticationFilter.java:63)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
              at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
              at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
              at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
              at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
              at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:233)
              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at com.cj.trim.trimFilter.doFilter(Unknown Source)
              at org.jtalks.jcommune.web.filters.TrimFilter.doFilter(TrimFilter.java:82)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
              at java.lang.Thread.run(Thread.java:724)
      Caused by: org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [org.jtalks.jcommune.model.entity.JCUser#1]
              at org.hibernate.engine.StatefulPersistenceContext.checkUniqueness(StatefulPersistenceContext.java:638)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performUpdate(DefaultSaveOrUpdateEventListener.java:305)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsDetached(DefaultSaveOrUpdateEventListener.java:246)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:112)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
              at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:685)
              at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:677)
              at org.hibernate.engine.CascadingAction$5.cascade(CascadingAction.java:252)
              at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:392)
              at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:335)
              at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:204)
              at org.hibernate.engine.Cascade.cascade(Cascade.java:161)
              at org.hibernate.engine.Cascade.cascade(Cascade.java:127)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.cascadeOnUpdate(DefaultSaveOrUpdateEventListener.java:376)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performUpdate(DefaultSaveOrUpdateEventListener.java:350)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsDetached(DefaultSaveOrUpdateEventListener.java:246)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:112)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
              at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:685)
              at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:677)
              at org.hibernate.engine.CascadingAction$5.cascade(CascadingAction.java:252)
              at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:392)
              at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:335)
              at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:204)
              at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:425)
              at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:362)
              at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:338)
              at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:204)
              at org.hibernate.engine.Cascade.cascade(Cascade.java:161)
              at org.hibernate.engine.Cascade.cascade(Cascade.java:127)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.cascadeOnUpdate(DefaultSaveOrUpdateEventListener.java:376)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performUpdate(DefaultSaveOrUpdateEventListener.java:350)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsDetached(DefaultSaveOrUpdateEventListener.java:246)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:112)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
              at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:685)
              at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:677)
              at org.hibernate.engine.CascadingAction$5.cascade(CascadingAction.java:252)
              at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:392)
              at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:335)
              at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:204)
              at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:425)
              at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:362)
              at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:338)
              at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:204)
              at org.hibernate.engine.Cascade.cascade(Cascade.java:161)
              at org.hibernate.engine.Cascade.cascade(Cascade.java:127)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.cascadeOnUpdate(DefaultSaveOrUpdateEventListener.java:376)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performUpdate(DefaultSaveOrUpdateEventListener.java:350)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsDetached(DefaultSaveOrUpdateEventListener.java:246)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:112)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
              at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:685)
              at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:677)
              at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:673)
              at org.jtalks.common.model.dao.hibernate.GenericDao.saveOrUpdate(GenericDao.java:73)
              at sun.reflect.GeneratedMethodAccessor360.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
              at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155)
              ... 116 more
      2014-01-18 17:43:16 [INFO ][http-4080-5     ][admin][org.jtalks.jcommune.web.exception.PrettyLogExceptionResolver] - [POST][http://autotests.jtalks.org/jcommune/topics/new?branchId=4][JSESSIONID=4ADDD3DB815F7EC52FDEE91B842AD08D; SPRING_SECURITY_REMEMBER_ME_COOKIE=N29QNXZGZ2UvYlpXTzhNTmJaek1mUT09OkZ5VkNaTm5ZbWplZ051NmpuWjB5OWc9PQ; org.springframework.web.servlet.i18n.CookieLocaleResolver.LOCALE=en; GMT=0][]

        Attachments

          Issue Links

            Structure

              Activity

                People

                • Assignee:
                  Vtech Targa Florio
                  Reporter:
                  ctapobep Stanislav Bashkyrtsev
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0h
                    0h
                    Logged:
                    Time Spent - 7h
                    7h

                      Structure Helper Panel