Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] [dolphinscheduler-tool] insert t_ds_process_definition_log sql error #16251

Open
3 tasks done
lyyprean opened this issue Jul 1, 2024 · 8 comments
Open
3 tasks done
Labels
bug Something isn't working

Comments

@lyyprean
Copy link
Contributor

lyyprean commented Jul 1, 2024

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

String insertLogSql =
"insert into t_ds_process_definition_log (code,name,version,description,project_code,release_state,user_id,"
+ "global_params,flag,locations,timeout,operator,operate_time,create_time,update_time) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";

sql error, 15 fields, 16 question marks

What you expected to happen

image sql error

How to reproduce

sql error

Anything else

No response

Version

dev

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@lyyprean lyyprean added bug Something isn't working Waiting for reply Waiting for reply labels Jul 1, 2024
@SbloodyS
Copy link
Member

SbloodyS commented Jul 1, 2024

Please provide more error logs.

@SbloodyS SbloodyS added Waiting for user feedback Waiting for feedback from issue/PR author and removed Waiting for reply Waiting for reply labels Jul 1, 2024
@lyyprean
Copy link
Contributor Author

lyyprean commented Jul 1, 2024

This is an obvious sql error. The SQL has 15 fcolumn,but it has 16 (?)placeholders

@SbloodyS
Copy link
Member

SbloodyS commented Jul 1, 2024

Need the error logs to check if it's deprecated. @lyyprean

@lyyprean
Copy link
Contributor Author

lyyprean commented Jul 2, 2024

Uploading image.png…
at org.apache.dolphinscheduler.tools.datasource.UpgradeDolphinScheduler.main(UpgradeDolphinScheduler.java:36)
[ERROR] 2024-07-02 09:13:36.482 org.apache.dolphinscheduler.tools.datasource.upgrader.v200.V200DolphinSchedulerUpgrader:[131] - json split error
java.lang.RuntimeException: java.sql.SQLException: No value specified for parameter 16
at org.apache.dolphinscheduler.tools.datasource.dao.JsonSplitDao.executeJsonSplitProcessDefinition(JsonSplitDao.java:95)
at org.apache.dolphinscheduler.tools.datasource.upgrader.v200.V200DolphinSchedulerUpgrader.processDefinitionJsonSplit(V200DolphinSchedulerUpgrader.java:127)
at org.apache.dolphinscheduler.tools.datasource.upgrader.v200.V200DolphinSchedulerUpgrader.doUpgrade(V200DolphinSchedulerUpgrader.java:89)
at org.apache.dolphinscheduler.tools.datasource.upgrader.v200.V200DolphinSchedulerUpgrader$$FastClassBySpringCGLIB$$1b4ba684.invoke()
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.tools.datasource.upgrader.v200.V200DolphinSchedulerUpgrader$$EnhancerBySpringCGLIB$$9e6a8fff.doUpgrade()
at org.apache.dolphinscheduler.tools.datasource.DolphinSchedulerManager.lambda$upgradeDolphinScheduler$0(DolphinSchedulerManager.java:117)
at java.util.Optional.ifPresent(Optional.java:159)
at org.apache.dolphinscheduler.tools.datasource.DolphinSchedulerManager.upgradeDolphinScheduler(DolphinSchedulerManager.java:115)
at org.apache.dolphinscheduler.tools.datasource.UpgradeDolphinScheduler$UpgradeRunner.run(UpgradeDolphinScheduler.java:53)
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:771)
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:755)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295)
at org.apache.dolphinscheduler.tools.datasource.UpgradeDolphinScheduler.main(UpgradeDolphinScheduler.java:36)
Caused by: java.sql.SQLException: No value specified for parameter 16
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:130)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.ClientPreparedStatement.addBatch(ClientPreparedStatement.java:252)
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.addBatch(HikariProxyPreparedStatement.java)
at org.apache.dolphinscheduler.tools.datasource.dao.JsonSplitDao.executeJsonSplitProcessDefinition(JsonSplitDao.java:79)
... 24 common frames omitted
[INFO] 2024-07-02 09:13:36.579 org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener:[136] -

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
[ERROR] 2024-07-02 09:13:36.605 org.springframework.boot.SpringApplication:[824] - Application run failed
java.lang.IllegalStateException: Failed to execute CommandLineRunner
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:774)
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:755)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295)
at org.apache.dolphinscheduler.tools.datasource.UpgradeDolphinScheduler.main(UpgradeDolphinScheduler.java:36)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.sql.SQLException: No value specified for parameter 16
at org.apache.dolphinscheduler.tools.datasource.DolphinSchedulerManager.lambda$upgradeDolphinScheduler$0(DolphinSchedulerManager.java:119)
at java.util.Optional.ifPresent(Optional.java:159)
at org.apache.dolphinscheduler.tools.datasource.DolphinSchedulerManager.upgradeDolphinScheduler(DolphinSchedulerManager.java:115)
at org.apache.dolphinscheduler.tools.datasource.UpgradeDolphinScheduler$UpgradeRunner.run(UpgradeDolphinScheduler.java:53)
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:771)
... 5 common frames omitted
Caused by: java.lang.RuntimeException: java.sql.SQLException: No value specified for parameter 16
at org.apache.dolphinscheduler.tools.datasource.dao.JsonSplitDao.executeJsonSplitProcessDefinition(JsonSplitDao.java:95)
at org.apache.dolphinscheduler.tools.datasource.upgrader.v200.V200DolphinSchedulerUpgrader.processDefinitionJsonSplit(V200DolphinSchedulerUpgrader.java:127)
at org.apache.dolphinscheduler.tools.datasource.upgrader.v200.V200DolphinSchedulerUpgrader.doUpgrade(V200DolphinSchedulerUpgrader.java:89)
at org.apache.dolphinscheduler.tools.datasource.upgrader.v200.V200DolphinSchedulerUpgrader$$FastClassBySpringCGLIB$$1b4ba684.invoke()
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.tools.datasource.upgrader.v200.V200DolphinSchedulerUpgrader$$EnhancerBySpringCGLIB$$9e6a8fff.doUpgrade()
at org.apache.dolphinscheduler.tools.datasource.DolphinSchedulerManager.lambda$upgradeDolphinScheduler$0(DolphinSchedulerManager.java:117)
... 9 common frames omitted
Caused by: java.sql.SQLException: No value specified for parameter 16
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:130)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.ClientPreparedStatement.addBatch(ClientPreparedStatement.java:252)
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.addBatch(HikariProxyPreparedStatement.java)
at org.apache.dolphinscheduler.tools.datasource.dao.JsonSplitDao.executeJsonSplitProcessDefinition(JsonSplitDao.java:79)

@SbloodyS
Copy link
Member

SbloodyS commented Jul 2, 2024

Which version you want to upgrade to? @lyyprean

@lyyprean
Copy link
Contributor Author

lyyprean commented Jul 2, 2024

1.20 to 3.2.1

@SbloodyS
Copy link
Member

SbloodyS commented Jul 2, 2024

This is indeed a bug. However, the minimum support for upgrading to 3.2.1 is 1.3.0. And it is no longer maintained for versions earlier than 2.0.8.

@SbloodyS SbloodyS removed the Waiting for user feedback Waiting for feedback from issue/PR author label Jul 2, 2024
@lyyprean
Copy link
Contributor Author

lyyprean commented Jul 2, 2024

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
2 participants