Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-40260

Syllabus > Can't create items

    Details

    • Type: Bug
    • Status: RESOLVED
    • Priority: Blocker
    • Resolution: Duplicate
    • Affects Version/s: 19.0
    • Fix Version/s: None
    • Component/s: Syllabus
    • Labels:
      None
    • Test Plan:
      1. Go to Syllabus tool
      2. Click 'Add Item'
      3. Enter some text for 'Title' and 'Content'
      4. Click 'Add'
      5. Notice error message states: 'An error occurred while saving. Refresh the page and try again.'

      Description

      Currently only affects 19. Steps to reproduce:

      1. Go to Syllabus tool
      2. Click 'Add Item'
      3. Enter some text for 'Title' and 'Content'
      4. Click 'Add'
      5. Notice error message states: 'An error occurred while saving. Refresh the page and try again.'

      In the logs, the following stack trace is produced:

      org.springframework.dao.InvalidDataAccessApiUsageException: detached entity passed to persist: org.sakaiproject.component.app.syllabus.SyllabusDataImpl; nested exception is org.hibernate.PersistentObjectException: detached entity passed to persist: org.sakaiproject.component.app.syllabus.SyllabusDataImpl
              at org.springframework.orm.hibernate4.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:187)
              at org.springframework.orm.hibernate4.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:730)
              at org.springframework.orm.hibernate4.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:592)
              at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:761)
              at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:730)
              at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:518)
              at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:292)
              at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
              at com.sun.proxy.$Proxy148.addSyllabusToSyllabusItem(Unknown Source)
              at org.sakaiproject.tool.syllabus.entityproviders.SyllabusEntityProvider.updateEntity(SyllabusEntityProvider.java:332)
              at org.sakaiproject.entitybroker.rest.EntityHandlerImpl.handleEntityAccess(EntityHandlerImpl.java:696)
              at org.sakaiproject.entitybroker.util.servlet.DirectServlet.dispatch(DirectServlet.java:189)
              at org.sakaiproject.entitybroker.servlet.SakaiDirectServlet.dispatch(SakaiDirectServlet.java:148)
              at org.sakaiproject.entitybroker.util.servlet.DirectServlet.handleRequest(DirectServlet.java:159)
              at org.sakaiproject.entitybroker.util.servlet.DirectServlet.service(DirectServlet.java:134)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at org.sakaiproject.oauth.filter.OAuthPostFilter.doFilter(OAuthPostFilter.java:76)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:475)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at org.sakaiproject.oauth.filter.OAuthPreFilter.doFilter(OAuthPreFilter.java:74)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
              at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
              at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
              at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
              at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1502)
              at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1458)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
              at java.lang.Thread.run(Thread.java:748)
      Caused by: org.hibernate.PersistentObjectException: detached entity passed to persist: org.sakaiproject.component.app.syllabus.SyllabusDataImpl
              at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:139)
              at org.hibernate.internal.SessionImpl.firePersistOnFlush(SessionImpl.java:838)
              at org.hibernate.internal.SessionImpl.persistOnFlush(SessionImpl.java:831)
              at org.hibernate.engine.spi.CascadingActions$8.cascade(CascadingActions.java:357)
              at org.hibernate.engine.internal.Cascade.cascadeToOne(Cascade.java:350)
              at org.hibernate.engine.internal.Cascade.cascadeAssociation(Cascade.java:293)
              at org.hibernate.engine.internal.Cascade.cascadeProperty(Cascade.java:161)
              at org.hibernate.engine.internal.Cascade.cascadeCollectionElements(Cascade.java:379)
              at org.hibernate.engine.internal.Cascade.cascadeCollection(Cascade.java:319)
              at org.hibernate.engine.internal.Cascade.cascadeAssociation(Cascade.java:296)
              at org.hibernate.engine.internal.Cascade.cascadeProperty(Cascade.java:161)
              at org.hibernate.engine.internal.Cascade.cascade(Cascade.java:118)
              at org.hibernate.event.internal.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEventListener.java:167)
              at org.hibernate.event.internal.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:158)
              at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:91)
              at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:55)
              at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1258)
              at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:425)
              at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101)
              at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:177)
              at org.springframework.orm.hibernate4.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:584)
              ... 45 more
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  maintenanceteam Core Team
                  Reporter:
                  bjones86 Brian Jones
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code