Uploaded image for project: 'Openmeetings'
  1. Openmeetings
  2. OPENMEETINGS-2714

"Encountered unmanaged object" while saving invitation

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 6.2.0
    • 6.3.0
    • Invitation, Recordings, Room
    • None

    Description

      "Encountered unmanaged object" can happen while saving invitation

      steps:

      1. login as valid user with 20+ recordings
      2. go to Recordings
      3. select any valid recording (lets say "RecA")
      4. click Share
      5. open another browser/browser tab
      6. go to Recordings
      7. click 15+ recordings other than RecA
      8. go to previous tab
      9. fill Invitation form
      10. click Send
        Actual result: crash

      full stack trace:

      DEBUG 11-23 17:05:41.327 o.a.o.w.u.FileItemResourceReference:86 [nio-5080-exec-6] - Recording with id 15572 is requested
      ERROR 11-23 17:06:18.285 o.a.w.DefaultExceptionMapper:170 [nio-5080-exec-6] - Unexpected error occurred
      org.springframework.dao.InvalidDataAccessApiUsageException: Encountered unmanaged object "org.apache.openmeetings.db.entity.record.Recording@19a4c28e" in life cycle state  unmanaged while cascading persistence via field "org.apache.openmeetings.db.entity.room.Invitation.recording" during flush.  However, this field does not allow cascade persist. You cannot flush unmanaged objects or graphs that have persistent associations to unmanaged objects.^M
       Suggested actions: a) Set the cascade attribute for this field to CascadeType.PERSIST or CascadeType.ALL (JPA annotations) or "persist" or "all" (JPA orm.xml), ^M
       b) enable cascade-persist globally, ^M
       c) manually persist the related field value prior to flushing. ^M
       d) if the reference belongs to another context, allow reference to it by setting StoreContext.setAllowReferenceToSiblingContext().; nested exception is <openjpa-3.2.0-r6f721f6 nonfatal user error> org.apache.openjpa.persistence.InvalidStateException: Encountered unmanaged object "org.apache.openmeetings.db.entity.record.Recording@19a4c28e" in life cycle state  unmanaged while cascading persistence via field "org.apache.openmeetings.db.entity.room.Invitation.recording" during flush.  However, this field does not allow cascade persist. You cannot flush unmanaged objects or graphs that have persistent associations to unmanaged objects.^M
       Suggested actions: a) Set the cascade attribute for this field to CascadeType.PERSIST or CascadeType.ALL (JPA annotations) or "persist" or "all" (JPA orm.xml), ^M
       b) enable cascade-persist globally, ^M
       c) manually persist the related field value prior to flushing. ^M
       d) if the reference belongs to another context, allow reference to it by setting StoreContext.setAllowReferenceToSiblingContext().
      FailedObject: org.apache.openmeetings.db.entity.record.Recording@19a4c28e
              at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:371)
              at org.springframework.orm.jpa.DefaultJpaDialect.translateExceptionIfPossible(DefaultJpaDialect.java:128)
              at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:242)
              at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:575)
              at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:743)
              at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:711)
              at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:654)
              at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:407)
              at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
              at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
              at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)
              at org.apache.openmeetings.db.dao.room.InvitationDao$$EnhancerBySpringCGLIB$$ecff5f7b.update(<generated>)
              at org.apache.openmeetings.db.dao.room.Wicket_Proxy_InvitationDao$$FastClassByCGLIB$$c3eaf29c.invoke(<generated>)
              at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
              at org.apache.wicket.proxy.LazyInitProxyFactory$AbstractCGLibInterceptor.intercept(LazyInitProxyFactory.java:318)
              at org.apache.openmeetings.db.dao.room.Wicket_Proxy_InvitationDao$$EnhancerByCGLIB$$bc5a33ac.update(<generated>)
              at org.apache.openmeetings.web.common.InvitationForm.create(InvitationForm.java:181)
              at org.apache.openmeetings.web.common.InvitationForm.onClick(InvitationForm.java:233)
              at org.apache.openmeetings.web.common.InvitationDialog.onClick(InvitationDialog.java:89)
              at org.apache.openmeetings.web.common.InvitationDialog$1.onSubmit(InvitationDialog.java:56)
              at org.apache.wicket.ajax.markup.html.form.AjaxButton$1.onSubmit(AjaxButton.java:113)
              at org.apache.wicket.ajax.form.AjaxFormSubmitBehavior$AjaxFormSubmitter.onSubmit(AjaxFormSubmitBehavior.java:249)
              at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1344)
              at org.apache.wicket.markup.html.form.Form.process(Form.java:1016)
              at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:840)
              at org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:202)
              at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:146)
              at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:630)
              at org.apache.wicket.core.request.handler.ListenerRequestHandler.internalInvoke(ListenerRequestHandler.java:306)
              at org.apache.wicket.core.request.handler.ListenerRequestHandler.invoke(ListenerRequestHandler.java:280)
              at org.apache.wicket.core.request.handler.ListenerRequestHandler.invokeListener(ListenerRequestHandler.java:222)
              at org.apache.wicket.core.request.handler.ListenerRequestHandler.respond(ListenerRequestHandler.java:208)
              at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:910)
              at org.apache.wicket.request.RequestHandlerExecutor.execute(RequestHandlerExecutor.java:63)
              at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:294)
              at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:255)
              at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:277)
              at org.apache.wicket.protocol.ws.AbstractUpgradeFilter.processRequestCycle(AbstractUpgradeFilter.java:67)
              at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:208)
              at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:307)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:659)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
              at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
              at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382)
              at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
              at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:895)
              at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1722)
              at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
              at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
              at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
              at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
              at java.base/java.lang.Thread.run(Thread.java:829)
      Caused by: org.apache.openjpa.persistence.InvalidStateException: Encountered unmanaged object "org.apache.openmeetings.db.entity.record.Recording@19a4c28e" in life cycle state  unmanaged while cascading persistence via field "org.apache.openmeetings.db.entity.room.Invitation.recording" during flush.  However, this field does not allow cascade persist. You cannot flush unmanaged objects or graphs that have persistent associations to unmanaged objects.^M
       Suggested actions: a) Set the cascade attribute for this field to CascadeType.PERSIST or CascadeType.ALL (JPA annotations) or "persist" or "all" (JPA orm.xml), ^M
       b) enable cascade-persist globally, ^M
       c) manually persist the related field value prior to flushing. ^M
       d) if the reference belongs to another context, allow reference to it by setting StoreContext.setAllowReferenceToSiblingContext().
              at org.apache.openjpa.kernel.SingleFieldManager.preFlushPC(SingleFieldManager.java:799)
              at org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:631)
              at org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:599)
              at org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:520)
              at org.apache.openjpa.kernel.StateManagerImpl.preFlush(StateManagerImpl.java:3188)
              at org.apache.openjpa.kernel.PNewState.beforeFlush(PNewState.java:44)
              at org.apache.openjpa.kernel.StateManagerImpl.beforeFlush(StateManagerImpl.java:1110)
              at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2241)
              at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2201)
              at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:2118)
              at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:84)
              at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1603)
              at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:1035)
              at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:690)
              at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:562)
              ... 56 common frames omitted
      
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            solomax Maxim Solodovnik
            solomax Maxim Solodovnik
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment