Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Reproduce:
- Create a new portfoplio template
- Add a document in the section template
- Delete the portfolio template (to trash)
- Delete the portfolio template permanently (in trash)
<dispatchinfo> <componentinfo> <compname>ffo_main_confirm_delete_permanent</compname> <compclass>org.olat.core.gui.components.form.flexible.impl.FormWrapperContainer</compclass> <extendedinfo>n/a</extendedinfo> <event> <class>org.olat.core.gui.components.form.flexible.impl.FormEvent</class> <command>done</command> <tostring>com:done,org.olat.core.gui.components.form.flexible.impl.FormEvent@2f23a1</tostring> </event> </componentinfo> <controllerinfo> <controllername>org.olat.repository.ui.author.ConfirmDeletePermanentlyController</controllername> <controllername>org.olat.repository.ui.author.AuthorDeletedListController</controllername> <controllername>org.olat.repository.ui.author.OverviewAuthoringController</controllername> <controllername>org.olat.core.commons.fullWebApp.BaseFullWebappController</controllername> </controllerinfo> </dispatchinfo> Throwable: javax.persistence.PersistenceException message:org.hibernate.exception.ConstraintViolationException: could not execute statement,javax.persistence.PersistenceException at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:154) at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181) at org.hibernate.query.internal.AbstractProducedQuery.executeUpdate(AbstractProducedQuery.java:1681) at org.olat.modules.portfolio.manager.BinderDAO.deleteBinderTemplate(BinderDAO.java:493) at org.olat.modules.portfolio.manager.PortfolioServiceImpl.deleteBinderTemplate(PortfolioServiceImpl.java:319) at org.olat.modules.portfolio.handler.BinderTemplateHandler.cleanupOnDelete(BinderTemplateHandler.java:232) at org.olat.repository.manager.RepositoryServiceImpl.deletePermanently(RepositoryServiceImpl.java:556) at org.olat.repository.ui.author.ConfirmDeletePermanentlyController.deleteEntries(ConfirmDeletePermanentlyController.java:289) at org.olat.repository.ui.author.ConfirmDeletePermanentlyController.doCompleteDelete(ConfirmDeletePermanentlyController.java:238) at org.olat.repository.ui.author.ConfirmDeletePermanentlyController.formInnerEvent(ConfirmDeletePermanentlyController.java:209) 1. cause: message:could not execute statement,org.hibernate.exception.ConstraintViolationException at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:109) at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:200) at org.hibernate.hql.internal.ast.exec.BasicExecutor.doExecute(BasicExecutor.java:80) at org.hibernate.hql.internal.ast.exec.BasicExecutor.execute(BasicExecutor.java:50) at org.hibernate.hql.internal.ast.exec.DeleteExecutor.execute(DeleteExecutor.java:177) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:458) at org.hibernate.engine.query.spi.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:377) 2. cause: message:ERROR: update or delete on table "o_pf_binder" violates foreign key constraint "pf_assign_binder_idx" on table "o_pf_assignment" Detail: Key (id)=(17) is still referenced from table "o_pf_assignment".,org.postgresql.util.PSQLException at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2553) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2285) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:323) at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:473) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:393) at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:164) at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:130) at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61) at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:197)