Updating an exam exercise fails with an internal server error if a test run existed but has since been deleted.
Log: Artemis tries to update a student exam that no longer exists, in this case a test run.
To Reproduce
Create an exam with a file upload exercise.
Participate in a test run.
Delete the test run.
Try to update the exercise, e.g., by changing the allowed file types.
Expected behavior
Updating the exercise works.
Screenshots
No response
Which version of Artemis are you seeing the problem on?
5.12.6
What browsers are you seeing the problem on?
Firefox
Additional context
Possibly related to the removed @Transactional annotations?
Relevant log output
org.springframework.orm.jpa.JpaObjectRetrievalFailureException: Unable to find de.tum.in.www1.artemis.domain.participation.StudentParticipation with id 294; nested exception is javax.persistence.EntityNotFoundException: Unable to find de.tum.in.www1.artemis.domain.participation.StudentParticipation with id 294
at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:379)
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:235)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:551)
at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:61)
at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:242)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:152)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:174)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
at jdk.proxy2/jdk.proxy2.$Proxy385.save(Unknown Source)
at de.tum.in.www1.artemis.web.rest.FileUploadExerciseResource.updateFileUploadExercise(FileUploadExerciseResource.java:174)
Describe the bug
Updating an exam exercise fails with an internal server error if a test run existed but has since been deleted.
Log: Artemis tries to update a student exam that no longer exists, in this case a test run.
To Reproduce
Expected behavior
Updating the exercise works.
Screenshots
No response
Which version of Artemis are you seeing the problem on?
5.12.6
What browsers are you seeing the problem on?
Firefox
Additional context
Possibly related to the removed
@Transactional
annotations?Relevant log output