taosdata / TDengine

High-performance, scalable time-series database designed for Industrial IoT (IIoT) scenarios
https://tdengine.com
GNU Affero General Public License v3.0
23.4k stars 4.86k forks source link

Cause: java.sql.SQLException: TDengine ERROR (0x80000216): syntax error near '2021-07-14 23:06:14.235,null,null,18.4,76,65, 7.6,6.8,7, 5.4, 2' (invalid timestamp) #23546

Open FANTASYSSL opened 1 year ago

FANTASYSSL commented 1 year ago

错误:

The error occurred while setting parameters

SQL: INSERT INTO ax.tx_4 USING ax.tx ('type') TAGS('type') VALUES (now(),?, ?,?,?,?,?,?,?,?, ?,?,?, ?, ?, ?,?,?)

Cause: java.sql.SQLException: TDengine ERROR (0x80000216): syntax error near '2021-07-14 23:06:14.235,null,null,18.4,76,65, 7.6,6.8,7, 5.4, 2' (invalid timestamp)

; uncategorized SQLException; SQL state []; error code [-2147483114]; TDengine ERROR (0x80000216): syntax error near '2021-07-14 23:06:14.235,null,null,18.4,76,65, 7.6,6.8,7, 5.4, 2' (invalid timestamp); nested exception is java.sql.SQLException: TDengine ERROR (0x80000216): syntax error near '2021-07-14 23:06:14.235,null,null,18.4,76,65, 7.6,6.8,7, 5.4, 2' (invalid timestamp) at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:93) at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:439) at com.sun.proxy.$Proxy192.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.$Proxy199.insertSummary(Unknown Source) at sun.reflect.GeneratedMethodAccessor171.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)

打印sql的 SQL,手动执行sql没有问题 INSERT INTO ax.tx_4 USING ax.tx ('type') TAGS('type') VALUES (now(),1, 1719621164946219010,5454.0,'2021-07-14 23:06:14',NULL,NULL,18.4,76,65, 7.6,6.8,'7', 5.4, 2, 3,4,0)

参数对象 类型 Timestamp

使用的版本 使用mybatis 2.1.1 tgegine 3.2.0.0 jdbcdriver 3.2.7

FANTASYSSL commented 1 year ago

mac os

yu285 commented 11 months ago

麻烦把对应代码提供一下吧

wwismyname commented 6 months ago

请问这个有继续跟踪吗 我也遇到了同样的问题

johnnylc commented 4 months ago

3.3.0.3 遇到类似问题 请问有解决方法吗 @yu285