Trying to edit or delete speaker with ID 9 (Milen Dyankov) fails.
Steps to reproduce:
- navigate to https://jprime.io/admin/speaker/edit/9
- try to modify some field
- Save
- Request is sent but nothing is updated
Trying to delete the speaker gives the following constraint exception:
May 03 15:01:02 hp-jprime java[355893]: 2022-05-03 15:01:02.080 INFO 355893 --- [-8080-exec-6772] o.h.e.j.b.i.AbstractBatchImpl : HHH000010: On release of batch it still contained JDBC statements
May 03 15:01:02 hp-jprime java[355893]: 2022-05-03 15:01:02.080 ERROR 355893 --- [-8080-exec-6772] o.h.e.j.b.i.BatchingBatch : HHH000315: Exception executing batch [java.sql.BatchUpdateException: Cannot delete or update a parent row: a foreign key constraint fails (jprime.Session, CONSTRAINT FK_lbsdck6wuoavhk28w7q6i4cf3 FOREIGN KEY (submission) REFERENCES Submission (id))], SQL: /* delete site.model.Submission / delete from Submission where id=?
May 03 15:01:02 hp-jprime java[355893]: 2022-05-03 15:01:02.080 WARN 355893 --- [-8080-exec-6772] o.h.e.j.s.SqlExceptionHelper : SQL Error: 1451, SQLState: 23000
May 03 15:01:02 hp-jprime java[355893]: 2022-05-03 15:01:02.080 ERROR 355893 --- [-8080-exec-6772] o.h.e.j.s.SqlExceptionHelper : Cannot delete or update a parent row: a foreign key constraint fails (jprime.Session, CONSTRAINT FK_lbsdck6wuoavhk28w7q6i4cf3 FOREIGN KEY (submission) REFERENCES Submission (id))
May 03 15:01:02 hp-jprime java[355893]: 2022-05-03 15:01:02.080 ERROR 355893 --- [-8080-exec-6772] o.h.i.ExceptionMapperStandardImpl : HHH000346: Error during managed flush [org.hibernate.exception.ConstraintViolationException: could not execute batch]
May 03 15:01:02 hp-jprime java[355893]: 2022-05-03 15:01:02.082 ERROR 355893 --- [-8080-exec-6772] o.a.c.c.C.[.[.[.[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: could not execute batch; SQL [/ delete site.model.Submission */ delete from Submission where id=?]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute batch] with root cause
May 03 15:01:02 hp-jprime java[355893]: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (jprime.Session, CONSTRAINT FK_lbsdck6wuoavhk28w7q6i4cf3 FOREIGN KEY (submission) REFERENCES Submission (id))
Trying to edit or delete speaker with ID 9 (Milen Dyankov) fails.
Steps to reproduce:
Trying to delete the speaker gives the following constraint exception:
May 03 15:01:02 hp-jprime java[355893]: 2022-05-03 15:01:02.080 INFO 355893 --- [-8080-exec-6772] o.h.e.j.b.i.AbstractBatchImpl : HHH000010: On release of batch it still contained JDBC statements
May 03 15:01:02 hp-jprime java[355893]: 2022-05-03 15:01:02.080 ERROR 355893 --- [-8080-exec-6772] o.h.e.j.b.i.BatchingBatch : HHH000315: Exception executing batch [java.sql.BatchUpdateException: Cannot delete or update a parent row: a foreign key constraint fails (
jprime.Session, CONSTRAINTFK_lbsdck6wuoavhk28w7q6i4cf3FOREIGN KEY (submission) REFERENCESSubmission(id))], SQL: /* delete site.model.Submission / delete from Submission where id=?May 03 15:01:02 hp-jprime java[355893]: 2022-05-03 15:01:02.080 WARN 355893 --- [-8080-exec-6772] o.h.e.j.s.SqlExceptionHelper : SQL Error: 1451, SQLState: 23000
May 03 15:01:02 hp-jprime java[355893]: 2022-05-03 15:01:02.080 ERROR 355893 --- [-8080-exec-6772] o.h.e.j.s.SqlExceptionHelper : Cannot delete or update a parent row: a foreign key constraint fails (
jprime.Session, CONSTRAINTFK_lbsdck6wuoavhk28w7q6i4cf3FOREIGN KEY (submission) REFERENCESSubmission(id))May 03 15:01:02 hp-jprime java[355893]: 2022-05-03 15:01:02.080 ERROR 355893 --- [-8080-exec-6772] o.h.i.ExceptionMapperStandardImpl : HHH000346: Error during managed flush [org.hibernate.exception.ConstraintViolationException: could not execute batch]
May 03 15:01:02 hp-jprime java[355893]: 2022-05-03 15:01:02.082 ERROR 355893 --- [-8080-exec-6772] o.a.c.c.C.[.[.[.[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: could not execute batch; SQL [/ delete site.model.Submission */ delete from Submission where id=?]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute batch] with root cause
May 03 15:01:02 hp-jprime java[355893]: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (
jprime.Session, CONSTRAINTFK_lbsdck6wuoavhk28w7q6i4cf3FOREIGN KEY (submission) REFERENCESSubmission(id))