iotdb-tsfile-viewer icon indicating copy to clipboard operation
iotdb-tsfile-viewer copied to clipboard

Cannot invoke "String.getBytes(java.nio.charset.Charset)" because "deviceId" is null.

Open Inky19 opened this issue 7 months ago • 2 comments

I am trying to open a TsFile generated with org.apache.tsfile 2.0.2 (from the Maven repo). However, when I load the file via the web interface, it hangs at 5% and the console contains the following error:

2025-06-03 10:09:21 [WARN] [org.apache.iotdb.tsfile.common.conf.TSFileDescriptor:126] - not found iotdb-engine.properties, use the default configs.
2025-06-03 10:09:21 [WARN] [org.apache.iotdb.tool.core.service.TsFileAnalyserV13:286] - TsFile /home/<user>/test.tsfile self-check cannot proceed at position 9, recovered, because : Cannot invoke "String.getBytes((java.nio.charset.Charset)" because "deviceId" is null.
2025-06-03 10:09:21 [ERROR] [org.apache.iotdb.tsfile.read.TsFileSequenceReader:280] - Something error happened while reading file metadata of file /home/<user>/test.tsfile

Exception in thread "Thread-2" java.lang.IllegalArgumentException: Invalid input: 34
    at org.apache iotdb.tsfile,file.metadata.enums.MetadataIndexNodeType.deserialize(MetadataIndexNodeType,java: 70)
    at org.apache.iotdb.tsfile.file.metadata.MetadataIndexNode.deserializeFrom(MetadataIndexNode.java:107)
    at org.apache.iotdb.tsfile.file.metadata.TsFileMetadata.deserializeFrom(TsFileMetadata.java:55)
    at org.apache.iotdb.tsfile.read.TsFileSequenceReader.readFileMetadata(TsFileSequenceReader.java:275)
    at org.apache.iotdb.tool.core.service.TsFileAnalyserV13$TsFileAnalysedToolReader.getAllTimeseriesMetadataWithOffset(TsFileAnalyserV13.java:1566)
    at org.apache.iotdb.tool.core.service.TsFileAnalyserV13.initTimeSeriesMetadataNodeAnalysed(TsFileAnalyserV13.java:330)
    at org.apache.iotdb.tool.core.service.TsFileAnalyserV13.lambda$new$0(TsFileAnalyserV13.java:116)
    at java.base/java.lang.Thread.run(Thread.java: 840)

Inky19 avatar Jun 03 '25 12:06 Inky19

The new version of tsfile is currently not supported. You can use the relevant scripts in the tools/tsfile directory of the iotdb project to view the tsfile file

CritasWang avatar Jun 04 '25 01:06 CritasWang

@CritasWang thanks for your reply! I'll take a look at those scripts.
It might be a good idea to add a warning somewhere in the Readme about the lack of support for v4 files in the meantime.

Inky19 avatar Jun 04 '25 13:06 Inky19