当使用带有备份目录的 Microstream 数据库时,除了“PersistenceTypeDictionary.ptd”之外的所有文件都被克隆到备份目录中。
尝试将备份目录用作原始数据库时,Microstream 尝试重现此丢失的文件,但出现 NullPointerException:
Exception in thread "main" java.lang.RuntimeException: Problem in channel 0
at one.microstream.storage.types.StorageChannelTask$Abstract.checkForProblems(StorageChannelTask.java:61)
at one.microstream.storage.types.StorageChannelTask$Abstract.waitOnCompletion(StorageChannelTask.java:123)
at one.microstream.storage.types.StorageManager$Default.startThreads(StorageManager.java:280)
at one.microstream.storage.types.StorageManager$Default.internalStartUp(StorageManager.java:449)
at one.microstream.storage.types.StorageManager$Default.start(StorageManager.java:519)
at one.microstream.storage.types.StorageManager$Default.start(StorageManager.java:1)
at one.microstream.storage.types.EmbeddedStorageManager$Default.start(EmbeddedStorageManager.java:233)
at one.microstream.storage.types.EmbeddedStorageManager$Default.start(EmbeddedStorageManager.java:1)
at one.microstream.storage.types.EmbeddedStorage.createAndStartStorageManager(EmbeddedStorage.java:580)
at one.microstream.storage.types.EmbeddedStorage.start(EmbeddedStorage.java:464)
at com.packenius.book.microstream.examples.backup.Backup_03_CountBackupListEntries.main(Backup_03_CountBackupListEntries.java:12)
Caused by: java.lang.NullPointerException
at one.microstream.storage.types.StorageFileManager$Default.clearRegisteredFiles(StorageFileManager.java:299)
at one.microstream.storage.types.StorageFileManager$Default.clearState(StorageFileManager.java:1186)
at one.microstream.storage.types.StorageFileManager$Default.initializeStorage(StorageFileManager.java:871)
at one.microstream.storage.types.StorageChannel$Default.initializeStorage(StorageChannel.java:621)
at one.microstream.storage.types.StorageChannelTaskInitialize$Default.succeed(StorageChannelTaskInitialize.java:197)
at one.microstream.storage.types.StorageChannelTaskInitialize$Default.succeed(StorageChannelTaskInitialize.java:1)
at one.microstream.storage.types.StorageChannelSynchronizingTask$AbstractCompletingTask.synchronizedComplete(StorageChannelSynchronizingTask.java:61)
at one.microstream.storage.types.StorageChannelSynchronizingTask$AbstractCompletingTask.complete(StorageChannelSynchronizingTask.java:109)
at one.microstream.storage.types.StorageChannelTask$Abstract.processBy(StorageChannelTask.java:213)
at one.microstream.storage.types.StorageChannel$Default.work(StorageChannel.java:281)
at one.microstream.storage.types.StorageChannel$Default.run(StorageChannel.java:351)
at java.lang.Thread.run(Thread.java:748)
我的行为有什么问题?