一、该问题的重现步骤是什么?
1. 物模型编辑后已重新发布;
2. 无法初始化 device_logger_jkerjk97oub_27oy29bmmln;
3. 对应测试设备产品物模型无数据;
二、你期待的结果是什么?实际看到的又是什么?
正常加载物模型历史数据
三、你正在使用的是什么产品,什么版本?在什么操作系统上?
物联网平台 1.3.0 macos
四、请提供详细的错误堆栈信息,这很重要。
org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?) `device_command_jkerjk97oub_27oy29bmmln` USING `device_command` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `input`, `identifier`, `commandName`) VALUES (?, ?, ?, ?, ?) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?) `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (?, ?, ?) `device_event_jkerjk97oub_27oy29bmmln` USING `device_event` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `identifier`, `eventName`, `eventType`) VALUES (?, ?, ?, ?, ?) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?);]; SQL state []; error code [9730]; TDengine ERROR (0x2602): sql: INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1736422427276, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/property/post', '{"id":"02c84d0adc07d916d5092306cea3fedd","version":"1.0","params":{"LightSwitch":"1","BatteryLevel":20}}') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1736422427276, '/blade/ext/ntp/JkerjK97oub/27OY29BMmLn/response', '{"deviceSendTime":"1736415473897","serverRecvTime":"1736422427276","serverSendTime":"1736422427276"}') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1736422427276, '/blade/ext/ntp/JkerjK97oub/27OY29BMmLn/request', '{"deviceSendTime":"1736415473897"}') `device_command_jkerjk97oub_27oy29bmmln` USING `device_command` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `input`, `identifier`, `commandName`) VALUES (1736422427276, '{"RebootTime":1736415473890}', '{"RebootStatus":"true"}', 'Reboot', '重启服务') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1736422427276, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/service/Reboot', '{"id":"9d07408f7b8479d15402115ff831100b","version":"1.0","params":{"output":"{\"RebootTime\":1736415473890}","input":"{\"RebootStatus\":\"true\"}","commandName":"重启服务"}}') `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (1736422427276, '1', 20) `device_event_jkerjk97oub_27oy29bmmln` USING `device_event` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `identifier`, `eventName`, `eventType`) VALUES (1736422427276, '{"BatteryLevel":20}', 'LowBatteyEvent', '电量低事件', 'alert') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1736422427276, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/LowBatteyEvent/post', '{"id":"ad8e0f9f8138958cd9d697f1421767d6","version":"1.0","params":{"output":"{\"BatteryLevel\":20}","eventName":"电量低事件","eventType":"alert"}}');, desc: Invalid column name: BatteryLevel
at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1549)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:677)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:970)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1014)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1024)
at org.springblade.iot.tsdb.tdengine.dao.TDEngineTemplate.saveBatch(TDEngineTemplate.java:83)
at org.springblade.iot.core.task.BaseBatchTask.consumerQueueData(BaseBatchTask.java:72)
at org.springblade.iot.core.task.BaseBatchTask$1.run(BaseBatchTask.java:53)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.sql.SQLException: TDengine ERROR (0x2602): sql: INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1736422427276, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/property/post', '{"id":"02c84d0adc07d916d5092306cea3fedd","version":"1.0","params":{"LightSwitch":"1","BatteryLevel":20}}') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1736422427276, '/blade/ext/ntp/JkerjK97oub/27OY29BMmLn/response', '{"deviceSendTime":"1736415473897","serverRecvTime":"1736422427276","serverSendTime":"1736422427276"}') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1736422427276, '/blade/ext/ntp/JkerjK97oub/27OY29BMmLn/request', '{"deviceSendTime":"1736415473897"}') `device_command_jkerjk97oub_27oy29bmmln` USING `device_command` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `input`, `identifier`, `commandName`) VALUES (1736422427276, '{"RebootTime":1736415473890}', '{"RebootStatus":"true"}', 'Reboot', '重启服务') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1736422427276, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/service/Reboot', '{"id":"9d07408f7b8479d15402115ff831100b","version":"1.0","params":{"output":"{\"RebootTime\":1736415473890}","input":"{\"RebootStatus\":\"true\"}","commandName":"重启服务"}}') `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (1736422427276, '1', 20) `device_event_jkerjk97oub_27oy29bmmln` USING `device_event` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `identifier`, `eventName`, `eventType`) VALUES (1736422427276, '{"BatteryLevel":20}', 'LowBatteyEvent', '电量低事件', 'alert') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1736422427276, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/LowBatteyEvent/post', '{"id":"ad8e0f9f8138958cd9d697f1421767d6","version":"1.0","params":{"output":"{\"BatteryLevel\":20}","eventName":"电量低事件","eventType":"alert"}}');, desc: Invalid column name: BatteryLevel
五、若有更多详细信息,请在下面提供。
扫一扫访问 Blade技术社区 移动端