Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update/deletion of speaker fails #191

Open
martinfmi opened this issue May 3, 2022 · 0 comments
Open

Update/deletion of speaker fails #191

martinfmi opened this issue May 3, 2022 · 0 comments

Comments

@martinfmi
Copy link
Collaborator

Trying to edit or delete speaker with ID 9 (Milen Dyankov) fails.
Steps to reproduce:

  1. navigate to https://jprime.io/admin/speaker/edit/9
  2. try to modify some field
  3. Save
  4. 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))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant