You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{"timestamp":"2024-01-25T09:01:19.931+00:00","status":500,"error":"Internal Server Error","path":"/therapist/exercises/6"}
024-01-25 16:01:19.928 [http-nio-8080-exec-8] DEBUG o.s.jdbc.core.JdbcTemplate - Executing prepared SQL statement [DELETE FROM "exercises" WHERE "exercises"."id" = ?]
2024-01-25 16:01:19.930 [http-nio-8080-exec-8] ERROR o.a.c.c.C.[.[.[.[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.data.relational.core.conversion.DbActionExecutionException: Failed to execute DbAction.DeleteRoot(id=6, entityType=class pro.qyoga.core.therapy.exercises.model.Exercise, previousVersion=null)] with root cause
org.postgresql.util.PSQLException: ERROR: update or delete on table "exercises" violates foreign key constraint "program_exercises_exercise_ref_fkey" on table "program_exercises"
Detail: Key (id)=(6) is still referenced from table "program_exercises".
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2713)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2401)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:368)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:498)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:415)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:190)
at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:152)
at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
at org.springframework.jdbc.core.JdbcTemplate.lambda$update$2(JdbcTemplate.java:975)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:658)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:970)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:991)
at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.update(NamedParameterJdbcTemplate.java:337)
at org.springframework.data.jdbc.core.convert.DefaultDataAccessStrategy.delete(DefaultDataAccessStrategy.java:165)
at org.springframework.data.jdbc.core.JdbcAggregateChangeExecutionContext.executeDeleteRoot(JdbcAggregateChangeExecutionContext.java:139)
at org.springframework.data.jdbc.core.AggregateChangeExecutor.execute(AggregateChangeExecutor.java:101)
at org.springframework.data.jdbc.core.AggregateChangeExecutor.lambda$executeDelete$1(AggregateChangeExecutor.java:78)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at org.springframework.data.relational.core.conversion.DeleteAggregateChange.forEachAction(DeleteAggregateChange.java:82)
at org.springframework.data.jdbc.core.AggregateChangeExecutor.executeDelete(AggregateChangeExecutor.java:78)
at org.springframework.data.jdbc.core.JdbcAggregateTemplate.deleteTree(JdbcAggregateTemplate.java:479)
at org.springframework.data.jdbc.core.JdbcAggregateTemplate.deleteById(JdbcAggregateTemplate.java:373)
at org.springframework.data.jdbc.repository.support.SimpleJdbcRepository.deleteById(SimpleJdbcRepository.java:105)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:352)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:765)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:137)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:765)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:385)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:765)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:717)
at pro.qyoga.core.therapy.exercises.impl.ExercisesRepo$$SpringCGLIB$$0.deleteById(<generated>)
at pro.qyoga.core.therapy.exercises.ExercisesService$deleteById$exercise$1.invoke(ExercisesServiceImpl.kt:91)
at pro.qyoga.core.therapy.exercises.ExercisesService$deleteById$exercise$1.invoke(ExercisesServiceImpl.kt:87)
at pro.qyoga.platform.spring.tx.TransactionalService.transaction$lambda$0(TransactionTemplateExt.kt:11)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
at pro.qyoga.platform.spring.tx.TransactionalService.transaction(TransactionTemplateExt.kt:10)
at pro.qyoga.core.therapy.exercises.ExercisesService.deleteById(ExercisesServiceImpl.kt:87)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:352)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:713)
at pro.qyoga.core.therapy.exercises.ExercisesService$$SpringCGLIB$$0.deleteById(<generated>)
at pro.qyoga.app.therapist.therapy.exercises.ExercisesListPageController.deleteExercise(ExercisesListPageController.kt:49)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
The text was updated successfully, but these errors were encountered:
Сейчас при попытки удаления такого упражнения, бэк возвращает 500-ку, а для пользователя ничего не происходит.
Надо это как-то исправить.
Варианты:
3.1) с указанием 5 самых свежих программ
The text was updated successfully, but these errors were encountered: