Thanks Marcel, I looked up OAK-1947, and it's interesting that someone called it an 'improvement' instead of a bug. The exception itself, or code, or documentation should at least mention somewhere that MongoDB is not supported. This problem will consume many hours of anyone's time who tries do backup/restore from MongoDB, because we are expecting it to work, and will wonder what we are doing wrong. Especially since we are doing *exactly* what the examples do. Your own examples. Your code-base clearly shows restores from MongoDB being done (in the code), but the problem is that code just fails. Maybe putting a big comment in there saying "THIS CODE DOESN'T WORK. DON'T USE FOR MONGO" would be a great "improvement" to the code as well.
Best regards, Clay Ferguson [email protected] On Mon, Aug 24, 2015 at 3:48 AM, Marcel Reutegger <[email protected]> wrote: > Hi, > > this is a known issue: > https://issues.apache.org/jira/browse/OAK-1947 > > > but see also other work, which makes it possible to > migrate from TarMK to MongoMK: > https://issues.apache.org/jira/browse/OAK-1859 > > Regards > Marcel > > On 24/08/15 00:39, "Clay Ferguson" wrote: > > >I think there is a problem with the restore method. Exception below > >happens when I try to run a restore: > > > > > >It's this method: > >org.apache.jackrabbit.oak.plugins.backup.FileStoreRestore.restore > > > > > >What happens is the Compactor.process always returns a > >SegmentNodeBuilder, and then later in the DocumetNodeStore.merge this > >SegmentNodeBuilder object is checked to see if it's a DocumentRootBuilder > > instance or not, and throws an exception because it's not. I can't see > >how the restore can ever work the way the code is written now, because > >this instanceof check will always fail, right? ...or am I making some > >stupid mistake? > > > > > >By the way when I look at the DocumentNodeStore.asDocumentRootBuilder I > >believe something better can be done there. That's just not great code. > >Or at least put documentation in there about > > why such a bad/ugly thing had to be done. > > > > > >java.lang.IllegalArgumentException: builder must be a > >org.apache.jackrabbit.oak.plugins.document.DocumentRootBuilder > >at > >org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.asDocumentRoo > >tBuilder(DocumentNodeStore.java:2366) > >at > >org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.merge(Documen > >tNodeStore.java:1515) > >at > >org.apache.jackrabbit.oak.plugins.backup.FileStoreRestore.restore(FileStor > >eRestore.java:71) > >at > >org.apache.jackrabbit.oak.plugins.backup.FileStoreRestore.restore(FileStor > >eRestore.java:59) > >at com.meta64.mobile.service.BackupService.restore(BackupService.java:106) > >at > >com.meta64.mobile.service.BackupService.runCommandLine(BackupService.java: > >66) > >at com.meta64.mobile.BackupUtil.main(BackupUtil.java:31) > > > > > > > >Best regards, > >Clay Ferguson > >[email protected] > > > > > > > > > > > > > > > > > >
