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.39k stars 4.86k forks source link

occasionally report error when inserting data #5856

Closed stringhuang closed 2 years ago

stringhuang commented 3 years ago

Bug Description 我的代码框架使用spring boot订阅kafka消息,然后往tdengine写入数据,使用的是mybatis-plus + HikariCP连接池,并发量是每秒写入3条数据。

我使用批量插入子表数据,写法类似:

insert into s_table_xxx_pid1 (col1, col2) using s_table(tag1) tags('xxx') values('val1', 'val2'),
s_table_yyy_pid2 (col1, col2) using s_table(tag1) tags('yyy') values('val1', 'val2'),
s_table_zzz_pid3 (col1, col2) using s_table(tag1) tags('zzz') values('val1', 'val2');

问题:程序偶尔会报错“; uncategorized SQLException; SQL state []; error code [-2147483114]; TDengine Error: syntax error near '2021-04-19 06:45:55.0', 1.0) , s_tablexxx' () expected); nested exception is java.sql.SQLException: TDengine Error: syntax error near '2021-04-19 06:45:55.0', 1.0) , s_tablexxx' () expected)”

环境信息以及程序所用sdk版本信息如下:

所以,不清楚这个报错是怎么发生的,因为它是偶尔报错,是因为mybatis-plus的bug,还是tdengine的bug?

日志信息

2021-04-19 14:36:17.944 DEBUG [device-kafka-service,b7e39f5f022e8b0d,b7e39f5f022e8b0d,false] 1 --- [container-0-C-1] c.h.d.k.t.m.S.batchInsert                : ==>  Preparing: INSERT INTO 's_device_pid_num_299999000015_printer_printerstate' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) , 's_device_pid_num_299999000015_printer_photometerstate' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) , 's_device_pid_num_299999000015_printer_slave_state' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) , 's_device_pid_num_299999000015_printer_slave_masteraxis' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) , 's_device_pid_num_299999000015_printer_slave_protectivecover' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) , 's_device_pid_num_299999000015_printer_slave_lightstrip' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) , 's_device_pid_num_299999000015_printer_slave_platformstate' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) , 's_device_pid_num_299999000015_printer_slave_materialtraystate' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) , 's_device_pid_num_299999000015_printer_slave_filterultravioletlamp' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) , 's_device_pid_num_299999000015_printer_slave_force' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) , 's_device_pid_num_299999000015_printer_slave_insidetemperature' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) , 's_device_pid_num_299999000015_printer_slave_humidity' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) , 's_device_pid_num_299999000015_printer_slave_emergency' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) , 's_device_pid_num_299999000015_printer_slave_heaint_heaintstate' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) , 's_device_pid_num_299999000015_printer_slave_heaint_heaintemperature' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) , 's_device_pid_num_299999000015_printer_liquid_configed' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) , 's_device_pid_num_299999000015_printer_liquid_useropened' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) , 's_device_pid_num_299999000015_printer_liquid_addliquidstate' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) , 's_device_pid_num_299999000015_printer_liquid_liquidlevelstate' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) , 's_device_pid_num_299999000015_printer_hive_safetydoor' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) , 's_device_pid_num_299999000015_printer_hive_emergency' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) , 's_device_pid_num_299999000015_printer_hive_container' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) , 's_device_pid_num_299999000015_printer_hive_containerfulled' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) , 's_device_pid_num_299999000015_printer_hive_plateformlocked' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) , 's_device_pid_num_299999000015_printer_hive_plateforminplace' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) , 's_device_pid_num_299999000015_printer_hive_dectection' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) , 's_device_pid_num_299999000015_printer_projector_projectorstate' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) , 's_device_pid_num_299999000015_printer_projector_projectorscreen' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) , 's_device_pid_num_299999000015_printer_projector_projectortemp' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?) VALUES (?, ?) 
2021-04-19 14:36:18.203 DEBUG [device-kafka-service,b7e39f5f022e8b0d,b7e39f5f022e8b0d,false] 1 --- [container-0-C-1] c.h.d.k.t.m.S.batchInsert                : ==> Parameters: 299999000015(String), printer.printerstate(String), 2021-04-19 06:45:55.0(Timestamp), 1.0(Double), 299999000015(String), printer.photometerstate(String), 2021-04-19 06:45:55.0(Timestamp), -1.0(Double), 299999000015(String), printer.slave.state(String), 2021-04-19 06:45:55.0(Timestamp), 1.0(Double), 299999000015(String), printer.slave.masteraxis(String), 2021-04-19 06:45:55.0(Timestamp), 1.0(Double), 299999000015(String), printer.slave.protectivecover(String), 2021-04-19 06:45:55.0(Timestamp), 1.0(Double), 299999000015(String), printer.slave.lightstrip(String), 2021-04-19 06:45:55.0(Timestamp), 1.0(Double), 299999000015(String), printer.slave.platformstate(String), 2021-04-19 06:45:55.0(Timestamp), 1.0(Double), 299999000015(String), printer.slave.materialtraystate(String), 2021-04-19 06:45:55.0(Timestamp), 1.0(Double), 299999000015(String), printer.slave.filterultravioletlamp(String), 2021-04-19 06:45:55.0(Timestamp), 1.0(Double), 299999000015(String), printer.slave.force(String), 2021-04-19 06:45:55.0(Timestamp), 0.23(Double), 299999000015(String), printer.slave.insidetemperature(String), 2021-04-19 06:45:55.0(Timestamp), 28.41(Double), 299999000015(String), printer.slave.humidity(String), 2021-04-19 06:45:55.0(Timestamp), 49.98(Double), 299999000015(String), printer.slave.emergency(String), 2021-04-19 06:45:55.0(Timestamp), -1.0(Double), 299999000015(String), printer.slave.heaint.heaintstate(String), 2021-04-19 06:45:55.0(Timestamp), 1.0(Double), 299999000015(String), printer.slave.heaint.heaintemperature(String), 2021-04-19 06:45:55.0(Timestamp), 26.96(Double), 299999000015(String), printer.liquid.configed(String), 2021-04-19 06:45:55.0(Timestamp), -1.0(Double), 299999000015(String), printer.liquid.useropened(String), 2021-04-19 06:45:55.0(Timestamp), -1.0(Double), 299999000015(String), printer.liquid.addliquidstate(String), 2021-04-19 06:45:55.0(Timestamp), 1.0(Double), 299999000015(String), printer.liquid.liquidlevelstate(String), 2021-04-19 06:45:55.0(Timestamp), -1.0(Double), 299999000015(String), printer.hive.safetydoor(String), 2021-04-19 06:45:55.0(Timestamp), 1.0(Double), 299999000015(String), printer.hive.emergency(String), 2021-04-19 06:45:55.0(Timestamp), -1.0(Double), 299999000015(String), printer.hive.container(String), 2021-04-19 06:45:55.0(Timestamp), 1.0(Double), 299999000015(String), printer.hive.containerfulled(String), 2021-04-19 06:45:55.0(Timestamp), -1.0(Double), 299999000015(String), printer.hive.plateformlocked(String), 2021-04-19 06:45:55.0(Timestamp), -1.0(Double), 299999000015(String), printer.hive.plateforminplace(String), 2021-04-19 06:45:55.0(Timestamp), 1.0(Double), 299999000015(String), printer.hive.dectection(String), 2021-04-19 06:45:55.0(Timestamp), 1.0(Double), 299999000015(String), printer.projector.projectorstate(String), 2021-04-19 06:45:55.0(Timestamp), 1.0(Double), 299999000015(String), printer.projector.projectorscreen(String), 2021-04-19 06:45:55.0(Timestamp), 1.0(Double), 299999000015(String), printer.projector.projectortemp(String), 2021-04-19 06:45:55.0(Timestamp), -1.0(Double)
2021-04-19 14:36:22.259 ERROR [device-kafka-service,b7e39f5f022e8b0d,b7e39f5f022e8b0d,false] 1 --- [container-0-C-1] .s.s.i.d.WinccStateMsgCommandServiceImpl : 写入TDengine 单列模型 error, winccStateMsg: sn:"299999000015"time:1618814755printerstate:1photometerstate:-1projectorstate{projectorstate:1projectorscreen:1projectortemp:-1.0}hivestate{hivesensorstate{safetydoor:1emergency:-1container:1containerfulled:-1plateformlocked:-1plateforminplace:1dectection:1}}liquidstate{configed:-1useropened:-1addliquidstate:1liquidlevelstate:-1}slavestate{state:1masteraxis:1protectivecover:1lightstrip:1platformstate:1materialtraystate:1filterultravioletlamp:1force:0.23insidetemperature:28.41humidity:49.98heaintmodel{heaintstate:1heaintemperature:26.96}emergency:-1}

org.springframework.jdbc.UncategorizedSQLException: 
### Error updating database.  Cause: java.sql.SQLException: TDengine Error: syntax error near '2021-04-19 06:45:55.0', 1.0)  ,  s_device_pid_num_299999000015_' () expected)
### The error may exist in com/hg/device/kafka/tdengine/mapper/SuperDevicePidNumMapper.java (best guess)
### The error may involve com.hg.device.kafka.tdengine.mapper.SuperDevicePidNumMapper.batchInsert-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO     's_device_pid_num_299999000015_printer_printerstate' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)  ,  's_device_pid_num_299999000015_printer_photometerstate' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)  ,  's_device_pid_num_299999000015_printer_slave_state' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)  ,  's_device_pid_num_299999000015_printer_slave_masteraxis' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)  ,  's_device_pid_num_299999000015_printer_slave_protectivecover' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)  ,  's_device_pid_num_299999000015_printer_slave_lightstrip' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)  ,  's_device_pid_num_299999000015_printer_slave_platformstate' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)  ,  's_device_pid_num_299999000015_printer_slave_materialtraystate' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)  ,  's_device_pid_num_299999000015_printer_slave_filterultravioletlamp' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)  ,  's_device_pid_num_299999000015_printer_slave_force' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)  ,  's_device_pid_num_299999000015_printer_slave_insidetemperature' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)  ,  's_device_pid_num_299999000015_printer_slave_humidity' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)  ,  's_device_pid_num_299999000015_printer_slave_emergency' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)  ,  's_device_pid_num_299999000015_printer_slave_heaint_heaintstate' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)  ,  's_device_pid_num_299999000015_printer_slave_heaint_heaintemperature' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)  ,  's_device_pid_num_299999000015_printer_liquid_configed' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)  ,  's_device_pid_num_299999000015_printer_liquid_useropened' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)  ,  's_device_pid_num_299999000015_printer_liquid_addliquidstate' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)  ,  's_device_pid_num_299999000015_printer_liquid_liquidlevelstate' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)  ,  's_device_pid_num_299999000015_printer_hive_safetydoor' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)  ,  's_device_pid_num_299999000015_printer_hive_emergency' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)  ,  's_device_pid_num_299999000015_printer_hive_container' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)  ,  's_device_pid_num_299999000015_printer_hive_containerfulled' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)  ,  's_device_pid_num_299999000015_printer_hive_plateformlocked' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)  ,  's_device_pid_num_299999000015_printer_hive_plateforminplace' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)  ,  's_device_pid_num_299999000015_printer_hive_dectection' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)  ,  's_device_pid_num_299999000015_printer_projector_projectorstate' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)  ,  's_device_pid_num_299999000015_printer_projector_projectorscreen' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)  ,  's_device_pid_num_299999000015_printer_projector_projectortemp' (ts ,val) USING s_device_pid_num (device_sn, pid) TAGS (?, ?)  VALUES (?, ?)
### Cause: java.sql.SQLException: TDengine Error: syntax error near '2021-04-19 06:45:55.0', 1.0)  ,  s_device_pid_num_299999000015_' () expected)
; uncategorized SQLException; SQL state []; error code [-2147483114]; TDengine Error: syntax error near '2021-04-19 06:45:55.0', 1.0)  ,  s_device_pid_num_299999000015_' () expected); nested exception is java.sql.SQLException: TDengine Error: syntax error near '2021-04-19 06:45:55.0', 1.0)  ,  s_device_pid_num_299999000015_' () expected)
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:89) ~[spring-jdbc-5.2.11.RELEASE.jar!/:5.2.11.RELEASE]
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) ~[spring-jdbc-5.2.11.RELEASE.jar!/:5.2.11.RELEASE]
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) ~[spring-jdbc-5.2.11.RELEASE.jar!/:5.2.11.RELEASE]
    at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73) ~[mybatis-spring-2.0.1.jar!/:2.0.1]
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446) ~[mybatis-spring-2.0.1.jar!/:2.0.1]
    at com.sun.proxy.$Proxy155.insert(Unknown Source) ~[na:na]
    at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:278) ~[mybatis-spring-2.0.1.jar!/:2.0.1]
    at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:58) ~[mybatis-plus-core-3.1.2.jar!/:3.1.2]
    at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:62) ~[mybatis-plus-core-3.1.2.jar!/:3.1.2]
    at com.sun.proxy.$Proxy162.batchInsert(Unknown Source) ~[na:na]
    at com.hg.device.kafka.server.service.impl.deviceCommandService.helper.StateMsgPidNumHelper.insertSinglePidNumAndSaveToRedis(StateMsgPidNumHelper.java:56) ~[classes!/:1.0-RELEASE]
    at com.hg.device.kafka.server.service.impl.deviceCommandService.WinccStateMsgCommandServiceImpl.invoke(WinccStateMsgCommandServiceImpl.java:131) ~[classes!/:1.0-RELEASE]
    at com.hg.device.kafka.server.service.impl.DeviceMessageInputServiceNoThreadPoolImpl.invoke(DeviceMessageInputServiceNoThreadPoolImpl.java:72) [classes!/:1.0-RELEASE]
    at com.hg.device.kafka.core.service.MessageInputServiceWithThreadPool.receive(MessageInputServiceWithThreadPool.java:97) [device-kafka-service-core-1.0-RELEASE.jar!/:1.0-RELEASE]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_282]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_282]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_282]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_282]
    at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:171) [spring-messaging-5.2.11.RELEASE.jar!/:5.2.11.RELEASE]
    at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:120) [spring-messaging-5.2.11.RELEASE.jar!/:5.2.11.RELEASE]
    at org.springframework.cloud.stream.binding.StreamListenerMessageHandler.handleRequestMessage(StreamListenerMessageHandler.java:55) [spring-cloud-stream-3.0.9.RELEASE.jar!/:3.0.9.RELEASE]
    at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:134) [spring-integration-core-5.3.4.RELEASE.jar!/:5.3.4.RELEASE]
    at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:62) [spring-integration-core-5.3.4.RELEASE.jar!/:5.3.4.RELEASE]
    at org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:115) [spring-integration-core-5.3.4.RELEASE.jar!/:5.3.4.RELEASE]
    at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:133) [spring-integration-core-5.3.4.RELEASE.jar!/:5.3.4.RELEASE]
    at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:106) [spring-integration-core-5.3.4.RELEASE.jar!/:5.3.4.RELEASE]
    at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:72) [spring-integration-core-5.3.4.RELEASE.jar!/:5.3.4.RELEASE]
    at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:570) [spring-integration-core-5.3.4.RELEASE.jar!/:5.3.4.RELEASE]
    at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:520) [spring-integration-core-5.3.4.RELEASE.jar!/:5.3.4.RELEASE]
    at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:187) [spring-messaging-5.2.11.RELEASE.jar!/:5.2.11.RELEASE]
    at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:166) [spring-messaging-5.2.11.RELEASE.jar!/:5.2.11.RELEASE]
    at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:47) [spring-messaging-5.2.11.RELEASE.jar!/:5.2.11.RELEASE]
    at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:109) [spring-messaging-5.2.11.RELEASE.jar!/:5.2.11.RELEASE]
    at org.springframework.integration.endpoint.MessageProducerSupport.sendMessage(MessageProducerSupport.java:208) [spring-integration-core-5.3.4.RELEASE.jar!/:5.3.4.RELEASE]
    at org.springframework.integration.kafka.inbound.KafkaMessageDrivenChannelAdapter.sendMessageIfAny(KafkaMessageDrivenChannelAdapter.java:390) [spring-integration-kafka-3.3.1.RELEASE.jar!/:3.3.1.RELEASE]
    at org.springframework.integration.kafka.inbound.KafkaMessageDrivenChannelAdapter.access$300(KafkaMessageDrivenChannelAdapter.java:77) [spring-integration-kafka-3.3.1.RELEASE.jar!/:3.3.1.RELEASE]
    at org.springframework.integration.kafka.inbound.KafkaMessageDrivenChannelAdapter$IntegrationBatchMessageListener.onMessage(KafkaMessageDrivenChannelAdapter.java:543) [spring-integration-kafka-3.3.1.RELEASE.jar!/:3.3.1.RELEASE]
    at org.springframework.integration.kafka.inbound.KafkaMessageDrivenChannelAdapter$IntegrationBatchMessageListener.onMessage(KafkaMessageDrivenChannelAdapter.java:513) [spring-integration-kafka-3.3.1.RELEASE.jar!/:3.3.1.RELEASE]
    at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doInvokeBatchOnMessage(KafkaMessageListenerContainer.java:1724) [spring-kafka-2.5.8.RELEASE.jar!/:2.5.8.RELEASE]
    at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.invokeBatchOnMessageWithRecordsOrList(KafkaMessageListenerContainer.java:1715) [spring-kafka-2.5.8.RELEASE.jar!/:2.5.8.RELEASE]
    at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.invokeBatchOnMessage(KafkaMessageListenerContainer.java:1673) [spring-kafka-2.5.8.RELEASE.jar!/:2.5.8.RELEASE]
    at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doInvokeBatchListener(KafkaMessageListenerContainer.java:1602) [spring-kafka-2.5.8.RELEASE.jar!/:2.5.8.RELEASE]
    at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.invokeBatchListener(KafkaMessageListenerContainer.java:1492) [spring-kafka-2.5.8.RELEASE.jar!/:2.5.8.RELEASE]
    at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.invokeListener(KafkaMessageListenerContainer.java:1475) [spring-kafka-2.5.8.RELEASE.jar!/:2.5.8.RELEASE]
    at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.pollAndInvoke(KafkaMessageListenerContainer.java:1141) [spring-kafka-2.5.8.RELEASE.jar!/:2.5.8.RELEASE]
    at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.run(KafkaMessageListenerContainer.java:1044) [spring-kafka-2.5.8.RELEASE.jar!/:2.5.8.RELEASE]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_282]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_282]
    at java.lang.Thread.run(Thread.java:748) [na:1.8.0_282]
Caused by: java.sql.SQLException: TDengine Error: syntax error near '2021-04-19 06:45:55.0', 1.0)  ,  s_device_pid_num_299999000015_' () expected)
    at com.taosdata.jdbc.TSDBJNIConnector.executeQuery(TSDBJNIConnector.java:135) ~[taos-jdbcdriver-2.0.18.jar!/:na]
    at com.taosdata.jdbc.TSDBStatement.executeUpdate(TSDBStatement.java:100) ~[taos-jdbcdriver-2.0.18.jar!/:na]
    at com.taosdata.jdbc.SavedPreparedStatement.executeSql(SavedPreparedStatement.java:450) ~[taos-jdbcdriver-2.0.18.jar!/:na]
    at com.taosdata.jdbc.SavedPreparedStatement.executeBatchInternal(SavedPreparedStatement.java:259) ~[taos-jdbcdriver-2.0.18.jar!/:na]
    at com.taosdata.jdbc.TSDBPreparedStatement.execute(TSDBPreparedStatement.java:304) ~[taos-jdbcdriver-2.0.18.jar!/:na]
    at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44) ~[HikariCP-3.4.1.jar!/:na]
    at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java) ~[HikariCP-3.4.1.jar!/:na]
    at sun.reflect.GeneratedMethodAccessor150.invoke(Unknown Source) ~[na:na]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_282]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_282]
    at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59) ~[mybatis-3.5.1.jar!/:3.5.1]
    at com.sun.proxy.$Proxy263.execute(Unknown Source) ~[na:na]
    at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74) ~[mybatis-3.5.1.jar!/:3.5.1]
    at sun.reflect.GeneratedMethodAccessor149.invoke(Unknown Source) ~[na:na]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_282]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_282]
    at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63) ~[mybatis-3.5.1.jar!/:3.5.1]
    at com.sun.proxy.$Proxy262.update(Unknown Source) ~[na:na]
    at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.doUpdate(MybatisSimpleExecutor.java:54) ~[mybatis-plus-core-3.1.2.jar!/:3.1.2]
    at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:197) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:184) ~[mybatis-3.5.1.jar!/:3.5.1]
    at sun.reflect.GeneratedMethodAccessor145.invoke(Unknown Source) ~[na:na]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_282]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_282]
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433) ~[mybatis-spring-2.0.1.jar!/:2.0.1]
    ... 44 common frames omitted
xleili commented 3 years ago

do you still meet with this problem after updating the jdbc driver to the latest version.

xleili commented 2 years ago

This issue is stale because it has been open for 30 days with no activity.