一、该问题的重现步骤是什么?
1. BladeX-Links,合并1.1.0版本代码
2. 执行maven的clean install
3.提示
There are test failures.
Please refer to H:\Project\bladex_dev\blade-core\blade-tsdb-iotdb\target\surefire-reports for the individual test results.
二、你期待的结果是什么?实际看到的又是什么?
三、你正在使用的是什么产品,什么版本?在什么操作系统上?
使用BladeX-Links,更新到1.1.0版本
四、请提供详细的错误堆栈信息,这很重要。
五、若有更多详细信息,请在下面提供。
启动broker提示:
2024-09-25 09:35:38.499 INFO 11916 --- [ main] o.s.i.t.tdengine.dao.TDEngineTemplate : TdEngine create database sql:CREATE DATABASE IF NOT EXISTS links PRECISION 'ms' CACHEMODEL 'last_value' KEEP 3650 DURATION 10 BUFFER 16 WAL_LEVEL 1
2024-09-25 09:35:43.983 INFO 11916 --- [ main] o.s.i.t.tdengine.dao.TDEngineTemplate : TdEngine create STable sql:CREATE STABLE IF NOT EXISTS device_logger (`time` timestamp, `topic` NCHAR(128), `message` NCHAR(8192)) TAGS (`product_key` NCHAR(64), `device_name` NCHAR(64));
2024-09-25 09:35:43.987 INFO 11916 --- [ main] com.alibaba.druid.pool.DruidDataSource : {dataSource-2} inited
2024-09-25 09:35:44.101 ERROR 11916 --- [ main] o.s.i.t.tdengine.dao.TDEngineTemplate : TdEngine create STable error
org.springframework.jdbc.UncategorizedSQLException: StatementCallback; uncategorized SQLException for SQL [CREATE STABLE IF NOT EXISTS device_logger (`time` timestamp, `topic` NCHAR(128), `message` NCHAR(8192)) TAGS (`product_key` NCHAR(64), `device_name` NCHAR(64));]; SQL state []; error code [9794]; TDengine ERROR (0x2642): sql: CREATE STABLE IF NOT EXISTS device_logger (`time` timestamp, `topic` NCHAR(128), `message` NCHAR(8192)) TAGS (`product_key` NCHAR(64), `device_name` NCHAR(64));, desc: Invalid binary/nchar column length
at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1549)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:408)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:444)
at org.springblade.iot.tsdb.tdengine.dao.TDEngineTemplate.createSTable(TDEngineTemplate.java:318)
at org.springblade.iot.tsdb.tdengine.dao.TDEngineTemplate.afterSingletonsInstantiated(TDEngineTemplate.java:449)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:986)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:971)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:625)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:335)
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:149)
at org.springblade.core.launch.BladeApplication.run(BladeApplication.java:49)
at org.springblade.mqtt.broker.BrokerApplication.main(BrokerApplication.java:43)
Caused by: java.sql.SQLException: TDengine ERROR (0x2642): sql: CREATE STABLE IF NOT EXISTS device_logger (`time` timestamp, `topic` NCHAR(128), `message` NCHAR(8192)) TAGS (`product_key` NCHAR(64), `device_name` NCHAR(64));, desc: Invalid binary/nchar column length
at com.taosdata.jdbc.TSDBError.createSQLException(TSDBError.java:95)
at com.taosdata.jdbc.rs.RestfulStatement.execute(RestfulStatement.java:97)
at com.taosdata.jdbc.rs.RestfulStatement.execute(RestfulStatement.java:78)
at com.alibaba.druid.pool.DruidPooledStatement.execute(DruidPooledStatement.java:635)
at org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:435)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:393)
... 13 common frames omitted
扫一扫访问 Blade技术社区 移动端