eTutor-plus-plus / task-administration

eTutor Task Administration Server
0 stars 0 forks source link

[Bug]: Task Category Moodle-Synchronization sometimes fails #42

Open Martinaut opened 5 months ago

Martinaut commented 5 months ago

What happened?

For some task-categories the synchronization with Moodle does not work.

How can the bug be reproduced?

No response

Version

v1.2.1

JDK Version

No response

Relevant log output

2024-06-24T07:46:36.521Z DEBUG 8 --- [http-nio-8080-exec-10] a.j.d.e.t.services.TaskCategoryService   : Triggering question category creation for task category 4
2024-06-24T07:46:36.523Z  INFO 8 --- [eta-async-1] a.j.d.e.t.m.QuestionCategoryService      : Creating question category for task category 4.
2024-06-24T07:46:36.528Z DEBUG 8 --- [eta-async-1] a.j.d.e.t.m.QuestionCategoryService      : Sending POST request to https://dkemoodle.dke.uni-linz.ac.at/webservice/rest/server.php?moodlewsrestformat=json&wstoken=[RETRACTED]&wsfunction=local_etutorsync_create_question_category with body {data[course_category_id]=11, data[id]=TC_4, data[name]=Answer Set Programming}
2024-06-24T07:46:36.748Z ERROR 8 --- [eta-async-1] a.j.d.e.t.m.QuestionCategoryService      : Request https://dkemoodle.dke.uni-linz.ac.at/webservice/rest/server.php?moodlewsrestformat=json&wstoken=[RETRACTED]&wsfunction=local_etutorsync_create_question_category failed with status code 200: {"exception":"invalid_parameter_exception","errorcode":"invalidparameter","message":"Ung\u00fcltiger Parameterwert"}
2024-06-24T07:46:36.749Z ERROR 8 --- [eta-async-1] a.j.d.e.t.m.QuestionCategoryService      : Failed to create question category for task category 4.

java.lang.RuntimeException: Request failed: {"exception":"invalid_parameter_exception","errorcode":"invalidparameter","message":"Ung\u00fcltiger Parameterwert"}
        at at.jku.dke.etutor.task_administration.moodle.MoodleService.post(MoodleService.java:112) ~[classes/:1.2.1]
        at at.jku.dke.etutor.task_administration.moodle.QuestionCategoryService.createQuestionCategory(QuestionCategoryService.java:79) ~[classes/:1.2.1]
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source) ~[na:na]
        at java.base/java.lang.reflect.Method.invoke(Unknown Source) ~[na:na]
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:354) ~[spring-aop-6.1.8.jar:6.1.8]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196) ~[spring-aop-6.1.8.jar:6.1.8]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-6.1.8.jar:6.1.8]
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:768) ~[spring-aop-6.1.8.jar:6.1.8]
        at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:113) ~[spring-aop-6.1.8.jar:6.1.8]
        at org.springframework.util.concurrent.FutureUtils.lambda$toSupplier$0(FutureUtils.java:74) ~[spring-core-6.1.8.jar:6.1.8]
        at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source) ~[na:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:na]
        at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
github-actions[bot] commented 1 month ago

Issue has not been updated for 120 days.