TDengine
TDengine copied to clipboard
Error reported for Springboot TDengine subscription
Bug Description java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer; at com.taosdata.jdbc.TSDBResultSetBlockData.setByteArray(TSDBResultSetBlockData.java:106) ~[taos-jdbcdriver-3.0.1.jar:na] at com.taosdata.jdbc.tmq.TMQConnector.fetchRawBlockImp(Native Method) ~[taos-jdbcdriver-3.0.1.jar:na] at com.taosdata.jdbc.tmq.TMQConnector.fetchBlock(TMQConnector.java:237) ~[taos-jdbcdriver-3.0.1.jar:na] at com.taosdata.jdbc.tmq.TMQResultSet.next(TMQResultSet.java:32) ~[taos-jdbcdriver-3.0.1.jar:na] at com.taosdata.jdbc.tmq.TaosConsumer.poll(TaosConsumer.java:143) ~[taos-jdbcdriver-3.0.1.jar:na] at com.example.demo.handler.ConsumerHandler.execute(ConsumerHandler.java:97) ~[classes/:na] at com.example.demo.DemoApplication.test(DemoApplication.java:25) ~[classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_151] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_151] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_151] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_151]
To Reproduce Steps to reproduce the behavior:
- 在application.yml配置好RestfulDriver数据源
- 参考博客https://blog.csdn.net/weixin_42194695/article/details/126823147,唯一的区别是把他写的配置参数在类中写死;
- 超级表message,子表login,topic是user_message。
- 启动项目成功,往子表中插入数据报错。
Environment (please complete the following information): -TDengine Server OS: [CentOS 7.0]
- Memory, CPU, current Disk Space
- Project Running OS: [win 10]
- TDengine Server Version [3.0.1.5]
- JAVA Version: 1.8.0.151
- Springboot Version: 2.7.5
- Maven Version: 3.6.1
- taos-jdbcdriver: 3.0.1
请升级下 jdbc 版本,3.0.1 是打包时使用 jdk 11 在 jdk 8 上使用存在问题。请使用 jdbc 3.0.2