; 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)
错误:
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