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

RS duplicate question type in Question Pool

    XMLWordPrintable

    Details

      Description

      2016-02-23 09:36:36,299 [ajp-nio-8028-exec-9] ERROR OLATRuntimeException  - OLAT::ERROR ^%^ N8-E4 ^%^ org.olat.core.logging 
      https://testing.frentix.com/test8/auth/QPool/0/Types/0 ^%^ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:44.0) Gecko/20100101 Firefox/44.0
      **RedScreen** org.hibernate.exception.ConstraintViolationException: could not execute statement 
      
      <dispatchinfo>
      	<componentinfo>
      		<compname>ffo_main_null</compname>
      		<compclass>org.olat.core.gui.components.form.flexible.impl.FormWrapperContainer</compclass>
      		<extendedinfo>n/a</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.modules.qpool.ui.admin.QItemTypeEditController</controllername>
      		<controllername>org.olat.modules.qpool.ui.admin.QItemTypesAdminController</controllername>
      		<controllername>org.olat.modules.qpool.ui.QuestionPoolMainEditorController</controllername>
      		<controllername>org.olat.core.commons.fullWebApp.BaseFullWebappController</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:116)
         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:536)
         at org.olat.core.gui.components.Window.doDispatchRequest(Window.java:234)
         at org.olat.core.gui.components.AbstractComponent.dispatchRequest(AbstractComponent.java:193)
         at org.olat.dispatcher.AuthenticatedDispatcher.processValidDispatchURI(AuthenticatedDispatcher.java:298)
         at org.olat.dispatcher.AuthenticatedDispatcher.execute(AuthenticatedDispatcher.java:216)
         at org.olat.core.servlets.OpenOLATServlet.executeUserRequest(OpenOLATServlet.java:289)
         at org.olat.core.servlets.OpenOLATServlet.doPost(OpenOLATServlet.java:232)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
      >>>stack of 2.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.QueryImpl.getResultList(QueryImpl.java:458)
         at org.olat.modules.qpool.manager.QItemTypeDAO.getItemTypes(QItemTypeDAO.java:119)
         at org.olat.modules.qpool.manager.QuestionPoolServiceImpl.getAllItemTypes(QuestionPoolServiceImpl.java:704)
         at org.olat.modules.qpool.ui.admin.QItemTypesAdminController.reloadModel(QItemTypesAdminController.java:116)
         at org.olat.modules.qpool.ui.admin.QItemTypesAdminController.event(QItemTypesAdminController.java:144)
         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)
      >>>stack of 3.cause::org.hibernate.exception.ConstraintViolationException: could not execute statement
      -> at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:129)
         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 4.cause::org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "cst_unique_item_type"
        Detail: Key (q_type)=(myquestion) already exists.
      -> at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2182)
         at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1911)
         at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:173)
         at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:622)
         at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:472)
         at org.postgresql.jdbc.PgStatement.executeUpdate(PgStatement.java:429)
         at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:97)
         at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:97)
         at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:208)
         at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:62)
         at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3124)
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

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