You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Torgeir Veimo <to...@gmail.com> on 2015/05/04 15:26:44 UTC

Fwd: builder must be a org.apache.jackrabbit.oak.plugins.document.DocumentRootBuilder

I didn't have much luck on the users list with this problem. Is there
any work towards upgrading from tarmk to documentmk easier?

I'm trying to move a repository from tarmk to mongodb, and am using
the oak-run restore command, but am getting an exception;

spazzo:oak-run torgeir$ java -jar ./target/oak-run-1.2.1.jar restore
mongodb://localhost/oak ~/oak-repository-backup-20150427a

Apache Jackrabbit Oak 1.2.1
Exception in thread "main" java.lang.IllegalArgumentException: builder
must be a org.apache.jackrabbit.oak.plugins.document.DocumentRootBuilder
at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.asDocumentRootBuilder(DocumentNodeStore.java:2232)
at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.merge(DocumentNodeStore.java:1490)
[...]

Looking at the mailing list it might be due to OAK-2049. I've tried
running the node count script in oak console to find the offending
node, but it detects no errors.

http://oak-dev.jackrabbit.apache.narkive.com/KVUViR6K/cannot-backup-and-restore-aem-tar-repository

Are there any other things I need to fix in the repository? I've run
the check, compact and then backup commands on the repository prior to
trying to restore it to mongodb.

-- 
-Tor

Re: builder must be a org.apache.jackrabbit.oak.plugins.document.DocumentRootBuilder

Posted by Julian Sedding <js...@gmail.com>.
Glad to be of help!

Regards
Julian

On Tuesday, May 5, 2015, Torgeir Veimo <to...@gmail.com> wrote:

> Excellent, this was just what I needed!
>
> I had to add a null check condition on .withBlobStore(blobStore) and
> builder.setBlobStore(blobStore) so that it didn't fail on NPE when no
> blob store was configured, but otherwise it worked flawlessly on
> converting my 800MB test repository.
>
>
> On 5 May 2015 at 19:56, Julian Sedding <jsedding@gmail.com <javascript:;>>
> wrote:
> > Hi Torgeir
> >
> > Take a look at OAK-2643[0], that may help. You can copy the repository
> > on the NodeStore level, similar to the upgrade scenario.
> >
> > Regards
> > Julian
> >
> > [0] https://issues.apache.org/jira/browse/OAK-2643
> >
> > On Tue, May 5, 2015 at 2:20 AM, Torgeir Veimo <torgeir.veimo@gmail.com
> <javascript:;>> wrote:
> >> Had a look in the source, and it appears this is due to the merge()
> >> method only being available in the DocumentRootBuilder, not in the
> >> NodeBuilder interface?
> >>
> >> Is there any other way to move a repository from tar storage to
> >> mongodb without regenerating UUID / identifier values?
> >>
> >> On 4 May 2015 at 23:26, Torgeir Veimo <torgeir.veimo@gmail.com
> <javascript:;>> wrote:
> >>> I didn't have much luck on the users list with this problem. Is there
> >>> any work towards upgrading from tarmk to documentmk easier?
> >>>
> >>> I'm trying to move a repository from tarmk to mongodb, and am using
> >>> the oak-run restore command, but am getting an exception;
> >>>
> >>> spazzo:oak-run torgeir$ java -jar ./target/oak-run-1.2.1.jar restore
> >>> mongodb://localhost/oak ~/oak-repository-backup-20150427a
> >>>
> >>> Apache Jackrabbit Oak 1.2.1
> >>> Exception in thread "main" java.lang.IllegalArgumentException: builder
> >>> must be a
> org.apache.jackrabbit.oak.plugins.document.DocumentRootBuilder
> >>> at
> org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.asDocumentRootBuilder(DocumentNodeStore.java:2232)
> >>> at
> org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.merge(DocumentNodeStore.java:1490)
> >>> [...]
> >>>
> >>> Looking at the mailing list it might be due to OAK-2049. I've tried
> >>> running the node count script in oak console to find the offending
> >>> node, but it detects no errors.
> >>>
> >>>
> http://oak-dev.jackrabbit.apache.narkive.com/KVUViR6K/cannot-backup-and-restore-aem-tar-repository
> >>>
> >>> Are there any other things I need to fix in the repository? I've run
> >>> the check, compact and then backup commands on the repository prior to
> >>> trying to restore it to mongodb.
> >>>
> >>> --
> >>> -Tor
> >>
> >>
> >>
> >> --
> >> -Tor
>
>
>
> --
> -Tor
>

Re: builder must be a org.apache.jackrabbit.oak.plugins.document.DocumentRootBuilder

Posted by Torgeir Veimo <to...@gmail.com>.
Excellent, this was just what I needed!

I had to add a null check condition on .withBlobStore(blobStore) and
builder.setBlobStore(blobStore) so that it didn't fail on NPE when no
blob store was configured, but otherwise it worked flawlessly on
converting my 800MB test repository.


On 5 May 2015 at 19:56, Julian Sedding <js...@gmail.com> wrote:
> Hi Torgeir
>
> Take a look at OAK-2643[0], that may help. You can copy the repository
> on the NodeStore level, similar to the upgrade scenario.
>
> Regards
> Julian
>
> [0] https://issues.apache.org/jira/browse/OAK-2643
>
> On Tue, May 5, 2015 at 2:20 AM, Torgeir Veimo <to...@gmail.com> wrote:
>> Had a look in the source, and it appears this is due to the merge()
>> method only being available in the DocumentRootBuilder, not in the
>> NodeBuilder interface?
>>
>> Is there any other way to move a repository from tar storage to
>> mongodb without regenerating UUID / identifier values?
>>
>> On 4 May 2015 at 23:26, Torgeir Veimo <to...@gmail.com> wrote:
>>> I didn't have much luck on the users list with this problem. Is there
>>> any work towards upgrading from tarmk to documentmk easier?
>>>
>>> I'm trying to move a repository from tarmk to mongodb, and am using
>>> the oak-run restore command, but am getting an exception;
>>>
>>> spazzo:oak-run torgeir$ java -jar ./target/oak-run-1.2.1.jar restore
>>> mongodb://localhost/oak ~/oak-repository-backup-20150427a
>>>
>>> Apache Jackrabbit Oak 1.2.1
>>> Exception in thread "main" java.lang.IllegalArgumentException: builder
>>> must be a org.apache.jackrabbit.oak.plugins.document.DocumentRootBuilder
>>> at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.asDocumentRootBuilder(DocumentNodeStore.java:2232)
>>> at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.merge(DocumentNodeStore.java:1490)
>>> [...]
>>>
>>> Looking at the mailing list it might be due to OAK-2049. I've tried
>>> running the node count script in oak console to find the offending
>>> node, but it detects no errors.
>>>
>>> http://oak-dev.jackrabbit.apache.narkive.com/KVUViR6K/cannot-backup-and-restore-aem-tar-repository
>>>
>>> Are there any other things I need to fix in the repository? I've run
>>> the check, compact and then backup commands on the repository prior to
>>> trying to restore it to mongodb.
>>>
>>> --
>>> -Tor
>>
>>
>>
>> --
>> -Tor



-- 
-Tor

Re: builder must be a org.apache.jackrabbit.oak.plugins.document.DocumentRootBuilder

Posted by Julian Sedding <js...@gmail.com>.
Hi Torgeir

Take a look at OAK-2643[0], that may help. You can copy the repository
on the NodeStore level, similar to the upgrade scenario.

Regards
Julian

[0] https://issues.apache.org/jira/browse/OAK-2643

On Tue, May 5, 2015 at 2:20 AM, Torgeir Veimo <to...@gmail.com> wrote:
> Had a look in the source, and it appears this is due to the merge()
> method only being available in the DocumentRootBuilder, not in the
> NodeBuilder interface?
>
> Is there any other way to move a repository from tar storage to
> mongodb without regenerating UUID / identifier values?
>
> On 4 May 2015 at 23:26, Torgeir Veimo <to...@gmail.com> wrote:
>> I didn't have much luck on the users list with this problem. Is there
>> any work towards upgrading from tarmk to documentmk easier?
>>
>> I'm trying to move a repository from tarmk to mongodb, and am using
>> the oak-run restore command, but am getting an exception;
>>
>> spazzo:oak-run torgeir$ java -jar ./target/oak-run-1.2.1.jar restore
>> mongodb://localhost/oak ~/oak-repository-backup-20150427a
>>
>> Apache Jackrabbit Oak 1.2.1
>> Exception in thread "main" java.lang.IllegalArgumentException: builder
>> must be a org.apache.jackrabbit.oak.plugins.document.DocumentRootBuilder
>> at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.asDocumentRootBuilder(DocumentNodeStore.java:2232)
>> at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.merge(DocumentNodeStore.java:1490)
>> [...]
>>
>> Looking at the mailing list it might be due to OAK-2049. I've tried
>> running the node count script in oak console to find the offending
>> node, but it detects no errors.
>>
>> http://oak-dev.jackrabbit.apache.narkive.com/KVUViR6K/cannot-backup-and-restore-aem-tar-repository
>>
>> Are there any other things I need to fix in the repository? I've run
>> the check, compact and then backup commands on the repository prior to
>> trying to restore it to mongodb.
>>
>> --
>> -Tor
>
>
>
> --
> -Tor

Re: builder must be a org.apache.jackrabbit.oak.plugins.document.DocumentRootBuilder

Posted by Torgeir Veimo <to...@gmail.com>.
Had a look in the source, and it appears this is due to the merge()
method only being available in the DocumentRootBuilder, not in the
NodeBuilder interface?

Is there any other way to move a repository from tar storage to
mongodb without regenerating UUID / identifier values?

On 4 May 2015 at 23:26, Torgeir Veimo <to...@gmail.com> wrote:
> I didn't have much luck on the users list with this problem. Is there
> any work towards upgrading from tarmk to documentmk easier?
>
> I'm trying to move a repository from tarmk to mongodb, and am using
> the oak-run restore command, but am getting an exception;
>
> spazzo:oak-run torgeir$ java -jar ./target/oak-run-1.2.1.jar restore
> mongodb://localhost/oak ~/oak-repository-backup-20150427a
>
> Apache Jackrabbit Oak 1.2.1
> Exception in thread "main" java.lang.IllegalArgumentException: builder
> must be a org.apache.jackrabbit.oak.plugins.document.DocumentRootBuilder
> at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.asDocumentRootBuilder(DocumentNodeStore.java:2232)
> at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.merge(DocumentNodeStore.java:1490)
> [...]
>
> Looking at the mailing list it might be due to OAK-2049. I've tried
> running the node count script in oak console to find the offending
> node, but it detects no errors.
>
> http://oak-dev.jackrabbit.apache.narkive.com/KVUViR6K/cannot-backup-and-restore-aem-tar-repository
>
> Are there any other things I need to fix in the repository? I've run
> the check, compact and then backup commands on the repository prior to
> trying to restore it to mongodb.
>
> --
> -Tor



-- 
-Tor