Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-1853

RS adding question to a newly created list

    XMLWordPrintable

    Details

      Description

      @Tester: it's not a red screen which happen every time. It's rare.

      https://olat.xyz.ch/auth/QPool/0/My/0 ^%^ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:43.0) Gecko/20100101 Firefox/43.0 ^%^ **RedScreen** commit failed, rollback transaction
      
      >>> stack of 1.cause::org.olat.core.logging.DBRuntimeException: commit failed, rollback transaction
      -> at org.olat.core.commons.persistence.DBImpl.commit(DBImpl.java:754)
         at org.olat.modules.qpool.manager.CollectionDAO.addItemToCollection(CollectionDAO.java:101)
         at org.olat.modules.qpool.manager.QuestionPoolServiceImpl.createCollection(QuestionPoolServiceImpl.java:598)
         at org.olat.modules.qpool.ui.QuestionListController.doCreateCollection(QuestionListController.java:781)
         at org.olat.modules.qpool.ui.QuestionListController.event(QuestionListController.java:355)
         at org.olat.core.gui.control.DefaultController$1.run(DefaultController.java:246)
         at org.olat.core.logging.activity.ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(ThreadLocalUserActivityLoggerInstaller.java:108)
         at org.olat.core.gui.control.DefaultController.dispatchEvent(DefaultController.java:243)
         at org.olat.core.gui.control.DefaultController.fireEvent(DefaultController.java:190)
         at org.olat.modules.qpool.ui.CreateCollectionController.formOK(CreateCollectionController.java:98)
         at org.olat.core.gui.components.form.flexible.impl.FormBasicController.event(FormBasicController.java:367)
      >>> stack of 2.cause::javax.persistence.RollbackException: Error while committing the transaction
      -> at org.hibernate.jpa.internal.TransactionImpl.commit(TransactionImpl.java:94)
         at org.olat.core.commons.persistence.DBImpl.commit(DBImpl.java:711)
         at org.olat.modules.qpool.manager.CollectionDAO.addItemToCollection(CollectionDAO.java:101)
         at org.olat.modules.qpool.manager.QuestionPoolServiceImpl.createCollection(QuestionPoolServiceImpl.java:598)
         at org.olat.modules.qpool.ui.QuestionListController.doCreateCollection(QuestionListController.java:781)
         at org.olat.modules.qpool.ui.QuestionListController.event(QuestionListController.java:355)
         at org.olat.core.gui.control.DefaultController$1.run(DefaultController.java:246)
         at org.olat.core.logging.activity.ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(ThreadLocalUserActivityLoggerInstaller.java:108)
         at org.olat.core.gui.control.DefaultController.dispatchEvent(DefaultController.java:243)
         at org.olat.core.gui.control.DefaultController.fireEvent(DefaultController.java:190)
         at org.olat.modules.qpool.ui.CreateCollectionController.formOK(CreateCollectionController.java:98)
      >>> stack of 3.cause::javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement
      -> at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1763)
         at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1677)
         at org.hibernate.jpa.internal.TransactionImpl.commit(TransactionImpl.java:82)
         at org.olat.core.commons.persistence.DBImpl.commit(DBImpl.java:711)
         at org.olat.modules.qpool.manager.CollectionDAO.addItemToCollection(CollectionDAO.java:101)
         at org.olat.modules.qpool.manager.QuestionPoolServiceImpl.createCollection(QuestionPoolServiceImpl.java:598)
         at org.olat.modules.qpool.ui.QuestionListController.doCreateCollection(QuestionListController.java:781)
         at org.olat.modules.qpool.ui.QuestionListController.event(QuestionListController.java:355)
         at org.olat.core.gui.control.DefaultController$1.run(DefaultController.java:246)
         at org.olat.core.logging.activity.ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(ThreadLocalUserActivityLoggerInstaller.java:108)
         at org.olat.core.gui.control.DefaultController.dispatchEvent(DefaultController.java:243)
      >>> stack of 4.cause::org.hibernate.exception.ConstraintViolationException: could not execute statement
      -> at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:72)
         at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
         at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)
         at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112)
         at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:211)
         at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:62)
         at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3124)
         at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3581)
         at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:104)
         at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:465)
         at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:351)
      >>> stack of 5.cause::com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`bzgbs`.`o_qp_collection_2_item`, CONSTRAINT `idx_qp_coll_coll_id` FOREIGN KEY (`fk_collection_id`) REFERENCES `o_qp_item_collection` (`id`))
      -> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
         at com.mysql.jdbc.Util.handleNewInstance(Util.java:377)
         at com.mysql.jdbc.Util.getInstance(Util.java:360)
         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:971)
         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3887)
         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823)
         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435)
         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582)
      

        Attachments

          Activity

            People

            Assignee:
            srosse Stéphane Rossé
            Reporter:
            srosse Stéphane Rossé
            Tester:
            Kirsten Scherer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes
                30m