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

RS if someone remove a lifecycle in the details panel of the repository

    XMLWordPrintable

    Details

      Description

      How to reproduce:

      • create a course
      • set a start/end date
      • close the details panel
      • reopen it, remove the start/end with the radio box "without"
        -> red screen
      2013-11-19 13:47:00,358 [ajp-apr-8010-exec-10] ERROR OLATRuntimeException - OLAT::ERROR ^%^ N10-E3 ^%^ org.olat.core.logging 
      Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.59.10 (KHTML, like Gecko) Version/5.1.9 Safari/534.59.10
      **RedScreen** org.hibernate.exception.ConstraintViolationException: could not execute statement
      <dispatchinfo>
      	<componentinfo>
      		<compname>ffo_main_bgrep</compname>
      		<compclass>org.olat.core.gui.components.form.flexible.impl.FormWrapperContainer</compclass>
      		<extendedinfo></extendedinfo>
      		<event>
      			<class&gt;org.olat.core.gui.control.Event</class&gt;
      			<command>validation ok</command>
      			<tostring>com:validation ok,org.olat.core.gui.control.Event@d62b3f02</tostring>
      		</event>
      	</componentinfo>
      	<controllerinfo>
      		<controllername>org.olat.repository.controllers.RepositoryEditDescriptionController</controllername>
      		<controllername>org.olat.repository.controllers.RepositoryDetailsController</controllername>
      		<controllername>org.olat.repository.controllers.RepositoryMainController</controllername>
      		<controllername>org.olat.core.commons.fullWebApp.BaseFullWebappController</controllername>
      		<controllername>org.olat.core.commons.chiefcontrollers.controller.simple.SimpleBaseController</controllername>
      		<controllername>org.olat.core.commons.chiefcontrollers.BaseChiefController</controllername>
      	</controllerinfo>
      </dispatchinfo>
      >>> stack of 1.cause::org.olat.core.logging.OLATRuntimeException: org.hibernate.exception.ConstraintViolationException: could not execute statement
      -> at org.olat.core.gui.exception.ExceptionWindowController.<init>(ExceptionWindowController.java:107)
         at org.olat.core.gui.exception.MsgFactory.createMessageChiefController(MsgFactory.java:57)
         at org.olat.core.gui.exception.MsgFactory.createMessageChiefController(MsgFactory.java:46)
         at org.olat.core.gui.components.Window.dispatchRequest(Window.java:508)
         at org.olat.core.gui.components.Window.doDispatchRequest(Window.java:226)
         at org.olat.core.gui.components.Component.dispatchRequest(Component.java:192)
         at org.olat.dispatcher.AuthenticatedDispatcher.execute(AuthenticatedDispatcher.java:227)
         at org.olat.core.dispatcher.DispatcherAction.execute(DispatcherAction.java:154)
         at org.olat.core.servlets.OLATServlet.doPost(OLATServlet.java:155)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
         at org.olat.core.servlets.OLATServlet.service(OLATServlet.java:112)
      >>> stack of 2.cause::javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement
      -> at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1387)
         at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1310)
         at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:277)
         at org.olat.repository.RepositoryManager.lookupRepositoryEntry(RepositoryManager.java:487)
         at org.olat.repository.RepositoryManager.lookupRepositoryEntry(RepositoryManager.java:465)
         at org.olat.repository.controllers.RepositoryDetailsController.event(RepositoryDetailsController.java:940)
         at org.olat.core.gui.control.DefaultController$1.run(DefaultController.java:239)
         at org.olat.core.logging.activity.ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(ThreadLocalUserActivityLoggerInstaller.java:108)
         at org.olat.core.gui.control.DefaultController.dispatchEvent(DefaultController.java:236)
         at org.olat.core.gui.control.DefaultController.fireEvent(DefaultController.java:184)
         at org.olat.repository.controllers.RepositoryEditDescriptionController.formOK(RepositoryEditDescriptionController.java:421)
      >>> stack of 3.cause::org.hibernate.exception.ConstraintViolationException: could not execute statement
      -> at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:74)
         at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
         at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
         at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
         at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:136)
         at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:58)
         at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3343)
         at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3546)
         at org.hibernate.action.internal.EntityDeleteAction.execute(EntityDeleteAction.java:100)
         at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:377)
         at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:369)
      >>> stack of 4.cause::com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`saq`.`o_repositoryentry`, CONSTRAINT `idx_re_lifecycle_fk` FOREIGN KEY (`fk_lifecycle`) REFERENCES `o_repositoryentry_cycle` (`id`))
      -> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
         at com.mysql.jdbc.Util.getInstance(Util.java:386)
         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1040)
         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074)
         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006)
         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2468)
         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2629)
      

        Attachments

          Activity

            People

            Assignee:
            srosse Stéphane Rossé
            Reporter:
            srosse Stéphane Rossé
            Votes:
            0 Vote for this issue
            Watchers:
            0 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 - 45 minutes
                45m