apache / linkis

Apache Linkis builds a computation middleware layer to facilitate connection, governance and orchestration between the upper applications and the underlying data engines.
https://linkis.apache.org/
Apache License 2.0
3.3k stars 1.17k forks source link

Create DSS Project error--创建工程失败:errCode: 10905, 在MYSQL 8.0.20的版本下,into linkis_ps_bml_project出现的SQL语法错误 #1060

Closed jadesun closed 2 years ago

jadesun commented 2 years ago

过程如下: 采用DSS和LINKIS独立部署的方式进行安装,MYSQL的环境是8.0.20。在创建工程时,提示以下异常 2021-11-01 23:32:35.073 [ERROR] [qtp354764137-19 ] c.w.w.l.s.r.RestfulCatchAOP (81) [apply] - operation failed(操作失败)s org.springframework.jdbc.BadSqlGrammarException:

Error updating database. Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'system, source, description, creator, enabled, create_time) values('aa', 'dss', ' at line 1

The error may exist in com/webank/wedatasphere/linkis/bml/dao/BmlProjectDao.java (best guess)

The error may involve com.webank.wedatasphere.linkis.bml.dao.BmlProjectDao.createNewProject-Inline

The error occurred while setting parameters

SQL: insert ignore into linkis_ps_bml_project(name, system, source, description, creator, enabled, create_time) values(?, ?, ?, ?, ?, ?, ?)

Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'system, source, description, creator, enabled, create_time) values('aa', 'dss', ' at line 1

; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'system, source, description, creator, enabled, create_time) values('aa', 'dss', ' at line 1 at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:239) ~[spring-jdbc-5.2.12.RELEASE.jar:5.2.12.RELEASE] at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) ~[spring-jdbc-5.2.12.RELEASE.jar:5.2.12.RELEASE] at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:88) ~[mybatis-spring-2.0.5.jar:2.0.5] at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440) ~[mybatis-spring-2.0.5.jar:2.0.5] at com.sun.proxy.$Proxy142.insert(Unknown Source) ~[?:?]

根据提示,判断可能是mysql-connector版本不一致。将mysql-connector-java-8.0.20的驱动替换掉dss和linkis的5.0.14版本之后,重启dss和linkis的服务,异常依旧。

peacewong commented 2 years ago

Hello, is it because the ’name‘ is not escaped?