问题:修改完工作流之后返回工作流列表程序出现异常。
ds版本:apache-dolphinscheduler-3.0.0-alpha-bin
一直转圈圈:F12查看返回值
找到 请求工作流列表的api process-definition
发现错误 10122
查看api日志
[ERROR] 2022-07-04 03:21:51.323 org.apache.dolphinscheduler.api.exceptions.ApiExceptionHandler:[47] - query process definition
list paging error
org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: Duplicate key 10001; nested exceptio
n is com.fasterxml.jackson.databind.JsonMappingException: Duplicate key 10001 (through reference chain: org.apache.dolphinsche
duler.api.utils.Result["data"]->org.apache.dolphinscheduler.api.utils.PageInfo["totalList"]->java.util.ArrayList[3]->org.apach
e.dolphinscheduler.dao.entity.ProcessDefinition["globalParamMap"])
at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.writeInternal(AbstractJackson2HttpMess
ageConverter.java:463)
at org.springframework.http.converter.AbstractGenericHttpMessageConverter.write(AbstractGenericHttpMessageConverter.ja
va:104)
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConve
rters(AbstractMessageConverterMethodProcessor.java:290)
at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.handleReturnValue(RequestR
esponseBodyMethodProcessor.java:183)
at org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodRetu
rnValueHandlerComposite.java:78)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocabl
eHandlerMethod.java:135)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappi
ngHandlerAdapter.java:895)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHan
dlerAdapter.java:808)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87
)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
......
Caused by: com.fasterxml.jackson.databind.JsonMappingException: Duplicate key 10001 (through reference chain: org.apache.dolphinscheduler.api.utils.Result["data"]->org.apache.dolph