destroydestiny opened a new issue, #15152:
URL: https://github.com/apache/dolphinscheduler/issues/15152

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
   unable to run workflow
   <img width="1280" alt="Snipaste_2023-11-10_13-08-36" 
src="https://github.com/apache/dolphinscheduler/assets/49700906/991968a4-36e2-42c9-b7e7-85a7a606c0b6";>
   
   
   ### What you expected to happen
   
   run workflow
   
   ### How to reproduce
   
   Using docker-compose to start server. And run workflow
   
   ### Anything else
   
   [ERROR] 2023-11-10 12:59:53.134 +0800 
org.apache.dolphinscheduler.api.exceptions.ApiExceptionHandler:[52] - 运行工作流实例错误
   org.springframework.jdbc.BadSqlGrammarException: 
   ### Error updating database.  Cause: org.postgresql.util.PSQLException: 
ERROR: syntax error at or near "DUPLICATE"
     Position: 145
   ### The error may exist in class path resource 
[org/apache/dolphinscheduler/dao/mapper/TriggerRelationMapper.xml]
   ### The error may involve defaultParameterMap
   ### The error occurred while setting parameters
   ### SQL: INSERT INTO t_ds_trigger_relation (trigger_code, trigger_type, 
job_id, create_time, update_time) VALUES(             ?,?,?,?,?)         ON 
DUPLICATE KEY UPDATE update_time = ?;
   ### Cause: org.postgresql.util.PSQLException: ERROR: syntax error at or near 
"DUPLICATE"
     Position: 145
   ; bad SQL grammar []; nested exception is org.postgresql.util.PSQLException: 
ERROR: syntax error at or near "DUPLICATE"
     Position: 145
           at 
org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:239)
           at 
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)
           at 
org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:91)
           at 
org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441)
           at com.sun.proxy.$Proxy147.insert(Unknown Source)
           at 
org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:272)
           at 
com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:59)
           at 
com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148)
           at 
com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)
           at com.sun.proxy.$Proxy194.upsert(Unknown Source)
           at 
org.apache.dolphinscheduler.service.process.TriggerRelationServiceImpl.saveTriggerToDb(TriggerRelationServiceImpl.java:46)
           at 
org.apache.dolphinscheduler.api.service.impl.ExecutorServiceImpl.createCommand(ExecutorServiceImpl.java:833)
           at 
org.apache.dolphinscheduler.api.service.impl.ExecutorServiceImpl.execProcessInstance(ExecutorServiceImpl.java:271)
           at 
org.apache.dolphinscheduler.api.service.impl.ExecutorServiceImpl$$FastClassBySpringCGLIB$$ff5175fc.invoke(<generated>)
           at 
org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
           at 
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793)
           at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
           at 
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
           at 
org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
           at 
org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)
           at 
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
           at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
           at 
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
           at 
org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708)
           at 
org.apache.dolphinscheduler.api.service.impl.ExecutorServiceImpl$$EnhancerBySpringCGLIB$$ce080d89.execProcessInstance(<generated>)
           at 
org.apache.dolphinscheduler.api.controller.ExecutorController.startProcessInstance(ExecutorController.java:170)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:498)
           at 
org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
           at 
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
           at 
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
           at 
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
           at 
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
           at 
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
           at 
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1070)
           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.doPost(FrameworkServlet.java:909)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:517)
           at 
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:584)
           at 
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
           at 
org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1656)
           at 
org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)
           at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
           at 
org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
           at 
org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626)
           at 
org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
           at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
           at 
org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
           at 
org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626)
           at 
org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
           at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
           at 
org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
           at 
org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626)
           at 
org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:96)
           at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
           at 
org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
           at 
org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626)
           at 
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
           at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
           at 
org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
           at 
org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626)
           at 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:552)
           at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
           at 
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)
           at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
           at 
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
           at 
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
           at 
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
           at 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440)
           at 
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
           at 
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505)
           at 
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
           at 
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
           at 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)
           at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
           at 
org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:772)
           at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
           at org.eclipse.jetty.server.Server.handle(Server.java:516)
           at 
org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)
           at 
org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)
           at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)
           at 
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
           at 
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
           at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
           at 
org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
           at 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
           at 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
           at 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
           at 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
           at 
org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)
           at 
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
           at 
org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
           at java.lang.Thread.run(Thread.java:750)
   Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near 
"DUPLICATE"
     Position: 145
           at 
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2676)
           at 
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2366)
           at 
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:356)
           at 
org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:490)
           at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:408)
           at 
org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:181)
           at 
org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:170)
           at 
com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
           at 
com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
           at 
org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47)
           at 
org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:498)
           at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:64)
           at com.sun.proxy.$Proxy826.update(Unknown Source)
           at 
org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:50)
           at 
org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:498)
           at org.apache.ibatis.plugin.Invocation.proceed(Invocation.java:49)
           at 
com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:106)
           at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62)
           at com.sun.proxy.$Proxy825.update(Unknown Source)
           at 
org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:194)
           at 
org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:181)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:498)
           at 
org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427)
           ... 93 common frames omitted
   
   ### Version
   
   3.2.x
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to