RE: oak-upgrade problems migrating from Jackrabbit 2 to Oak

2016-09-22 Thread Robert Haycock
Ignore that last message. I thought it was logging every node, not every 10,000 
nodes :D

-Original Message-
From: Robert Haycock [mailto:robert.hayc...@artificial-solutions.com] 
Sent: 22 September 2016 16:34
To: oak-dev@jackrabbit.apache.org
Subject: RE: oak-upgrade problems migrating from Jackrabbit 2 to Oak

I've removed (for now) the large strings and now the upgrade has started.

I have to say, it's a lot slower than I anticipated but its running :)

Thanks.

-Original Message-
From: Robert Haycock [mailto:robert.hayc...@artificial-solutions.com] 
Sent: 22 September 2016 15:33
To: oak-dev@jackrabbit.apache.org
Subject: RE: oak-upgrade problems migrating from Jackrabbit 2 to Oak

Hi Tomek,

We are aiming at having a cluster of Oaks . I'll see if I can find the 
offending large string.

Thanks.

-Original Message-
From: Tomek Rekawek [mailto:reka...@adobe.com]
Sent: 22 September 2016 15:29
To: oak-dev@jackrabbit.apache.org
Subject: Re: oak-upgrade problems migrating from Jackrabbit 2 to Oak

Hi Robert,

I think the quoted exception may be caused by some long string stored in the 
Jackrabbit 2 repository. In MongoMK all the strings are inlined in the Mongo 
documents, while the binaries are extracted to the blob store. Therefore, 
string properties longer than ~15MB are not supported. It’s a hard limit of the 
Mongo implementation itself.

Migrating this repository may require changing the repository structure - the 
large properties type should be changed from STRING to BINARY.

As Torgeir noticed, SegmentMK doesn’t have such constraints. If you don’t need 
to create a cluster of Oaks, then SegmentMK is a better choice anyway.

Regards,
Tomek

> On 22 Sep 2016, at 16:08, Robert Haycock 
> <robert.hayc...@artificial-solutions.com> wrote:
> 
> Thanks Tomek,
> 
> Getting closer!
> 
> Looks like a setting somewhere needs increasing...
> 
> Exception in thread "main" java.lang.RuntimeException: 
> javax.jcr.RepositoryException: Failed to copy content
>at com.google.common.io.Closer.rethrow(Closer.java:149)
>at 
> org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.migrate(OakUpgrade.java:58)
>at 
> org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.main(OakUpgrade.java:
> 42) Caused by: javax.jcr.RepositoryException: Failed to copy content
>at 
> org.apache.jackrabbit.oak.upgrade.RepositoryUpgrade.copy(RepositoryUpgrade.java:551)
>at 
> org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.upgrade(OakUpgrade.java:65)
>at 
> org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.migrate(OakUpgrade.java:53)
>... 1 more
> Caused by: org.bson.BsonSerializationException: Size 24184261 is larger than 
> MaxDocumentSize 16793600.

--
Tomek Rękawek | Adobe Research | www.adobe.com reka...@adobe.com




RE: oak-upgrade problems migrating from Jackrabbit 2 to Oak

2016-09-22 Thread Robert Haycock
I've removed (for now) the large strings and now the upgrade has started.

I have to say, it's a lot slower than I anticipated but its running :)

Thanks.

-Original Message-
From: Robert Haycock [mailto:robert.hayc...@artificial-solutions.com] 
Sent: 22 September 2016 15:33
To: oak-dev@jackrabbit.apache.org
Subject: RE: oak-upgrade problems migrating from Jackrabbit 2 to Oak

Hi Tomek,

We are aiming at having a cluster of Oaks . I'll see if I can find the 
offending large string.

Thanks.

-Original Message-
From: Tomek Rekawek [mailto:reka...@adobe.com]
Sent: 22 September 2016 15:29
To: oak-dev@jackrabbit.apache.org
Subject: Re: oak-upgrade problems migrating from Jackrabbit 2 to Oak

Hi Robert,

I think the quoted exception may be caused by some long string stored in the 
Jackrabbit 2 repository. In MongoMK all the strings are inlined in the Mongo 
documents, while the binaries are extracted to the blob store. Therefore, 
string properties longer than ~15MB are not supported. It’s a hard limit of the 
Mongo implementation itself.

Migrating this repository may require changing the repository structure - the 
large properties type should be changed from STRING to BINARY.

As Torgeir noticed, SegmentMK doesn’t have such constraints. If you don’t need 
to create a cluster of Oaks, then SegmentMK is a better choice anyway.

Regards,
Tomek

> On 22 Sep 2016, at 16:08, Robert Haycock 
> <robert.hayc...@artificial-solutions.com> wrote:
> 
> Thanks Tomek,
> 
> Getting closer!
> 
> Looks like a setting somewhere needs increasing...
> 
> Exception in thread "main" java.lang.RuntimeException: 
> javax.jcr.RepositoryException: Failed to copy content
>at com.google.common.io.Closer.rethrow(Closer.java:149)
>at 
> org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.migrate(OakUpgrade.java:58)
>at 
> org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.main(OakUpgrade.java:
> 42) Caused by: javax.jcr.RepositoryException: Failed to copy content
>at 
> org.apache.jackrabbit.oak.upgrade.RepositoryUpgrade.copy(RepositoryUpgrade.java:551)
>at 
> org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.upgrade(OakUpgrade.java:65)
>at 
> org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.migrate(OakUpgrade.java:53)
>... 1 more
> Caused by: org.bson.BsonSerializationException: Size 24184261 is larger than 
> MaxDocumentSize 16793600.

--
Tomek Rękawek | Adobe Research | www.adobe.com reka...@adobe.com




RE: oak-upgrade problems migrating from Jackrabbit 2 to Oak

2016-09-22 Thread Robert Haycock
Hi Tomek,

We are aiming at having a cluster of Oaks . I'll see if I can find the 
offending large string.

Thanks.

-Original Message-
From: Tomek Rekawek [mailto:reka...@adobe.com] 
Sent: 22 September 2016 15:29
To: oak-dev@jackrabbit.apache.org
Subject: Re: oak-upgrade problems migrating from Jackrabbit 2 to Oak

Hi Robert,

I think the quoted exception may be caused by some long string stored in the 
Jackrabbit 2 repository. In MongoMK all the strings are inlined in the Mongo 
documents, while the binaries are extracted to the blob store. Therefore, 
string properties longer than ~15MB are not supported. It’s a hard limit of the 
Mongo implementation itself.

Migrating this repository may require changing the repository structure - the 
large properties type should be changed from STRING to BINARY.

As Torgeir noticed, SegmentMK doesn’t have such constraints. If you don’t need 
to create a cluster of Oaks, then SegmentMK is a better choice anyway.

Regards,
Tomek

> On 22 Sep 2016, at 16:08, Robert Haycock 
> <robert.hayc...@artificial-solutions.com> wrote:
> 
> Thanks Tomek,
> 
> Getting closer!
> 
> Looks like a setting somewhere needs increasing...
> 
> Exception in thread "main" java.lang.RuntimeException: 
> javax.jcr.RepositoryException: Failed to copy content
>at com.google.common.io.Closer.rethrow(Closer.java:149)
>at 
> org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.migrate(OakUpgrade.java:58)
>at 
> org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.main(OakUpgrade.java:42)
> Caused by: javax.jcr.RepositoryException: Failed to copy content
>at 
> org.apache.jackrabbit.oak.upgrade.RepositoryUpgrade.copy(RepositoryUpgrade.java:551)
>at 
> org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.upgrade(OakUpgrade.java:65)
>at 
> org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.migrate(OakUpgrade.java:53)
>... 1 more
> Caused by: org.bson.BsonSerializationException: Size 24184261 is larger than 
> MaxDocumentSize 16793600.

-- 
Tomek Rękawek | Adobe Research | www.adobe.com
reka...@adobe.com




Re: oak-upgrade problems migrating from Jackrabbit 2 to Oak

2016-09-22 Thread Tomek Rekawek
Hi Robert,

I think the quoted exception may be caused by some long string stored in the 
Jackrabbit 2 repository. In MongoMK all the strings are inlined in the Mongo 
documents, while the binaries are extracted to the blob store. Therefore, 
string properties longer than ~15MB are not supported. It’s a hard limit of the 
Mongo implementation itself.

Migrating this repository may require changing the repository structure - the 
large properties type should be changed from STRING to BINARY.

As Torgeir noticed, SegmentMK doesn’t have such constraints. If you don’t need 
to create a cluster of Oaks, then SegmentMK is a better choice anyway.

Regards,
Tomek

> On 22 Sep 2016, at 16:08, Robert Haycock 
>  wrote:
> 
> Thanks Tomek,
> 
> Getting closer!
> 
> Looks like a setting somewhere needs increasing...
> 
> Exception in thread "main" java.lang.RuntimeException: 
> javax.jcr.RepositoryException: Failed to copy content
>at com.google.common.io.Closer.rethrow(Closer.java:149)
>at 
> org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.migrate(OakUpgrade.java:58)
>at 
> org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.main(OakUpgrade.java:42)
> Caused by: javax.jcr.RepositoryException: Failed to copy content
>at 
> org.apache.jackrabbit.oak.upgrade.RepositoryUpgrade.copy(RepositoryUpgrade.java:551)
>at 
> org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.upgrade(OakUpgrade.java:65)
>at 
> org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.migrate(OakUpgrade.java:53)
>... 1 more
> Caused by: org.bson.BsonSerializationException: Size 24184261 is larger than 
> MaxDocumentSize 16793600.

-- 
Tomek Rękawek | Adobe Research | www.adobe.com
reka...@adobe.com




smime.p7s
Description: S/MIME cryptographic signature


RE: oak-upgrade problems migrating from Jackrabbit 2 to Oak

2016-09-22 Thread Robert Haycock
I can't find any docs either under the project or online regarding this.

-Original Message-
From: Torgeir Veimo [mailto:torgeir.ve...@gmail.com] 
Sent: 22 September 2016 15:10
To: oak-dev@jackrabbit.apache.org
Subject: Re: oak-upgrade problems migrating from Jackrabbit 2 to Oak

Maybe you can work around it by upgrading using tarmk, then copying to a 
mongodb repository when it's all done.




Re: oak-upgrade problems migrating from Jackrabbit 2 to Oak

2016-09-22 Thread Torgeir Veimo
9)
> at org.apache.jackrabbit.oak.plugins.document.mongo.
> MongoDocumentStore.createOrUpdate(MongoDocumentStore.java:927)
> at org.apache.jackrabbit.oak.plugins.document.util.
> LeaseCheckDocumentStoreWrapper.createOrUpdate(
> LeaseCheckDocumentStoreWrapper.java:135)
> at org.apache.jackrabbit.oak.plugins.document.Commit.
> applyToDocumentStore(Commit.java:294)
> at org.apache.jackrabbit.oak.plugins.document.Commit.
> applyToDocumentStore(Commit.java:231)
> at org.apache.jackrabbit.oak.plugins.document.Commit.
> applyInternal(Commit.java:200)
> at org.apache.jackrabbit.oak.plugins.document.Commit.apply(
> Commit.java:189)
> at org.apache.jackrabbit.oak.plugins.document.
> DocumentNodeStoreBranch.persist(DocumentNodeStoreBranch.java:298)
> at org.apache.jackrabbit.oak.plugins.document.
> DocumentNodeStoreBranch.persist(DocumentNodeStoreBranch.java:268)
> at org.apache.jackrabbit.oak.plugins.document.
> DocumentNodeStoreBranch.access$300(DocumentNodeStoreBranch.java:58)
> at org.apache.jackrabbit.oak.plugins.document.
> DocumentNodeStoreBranch$Persisted.persistTransientHead(
> DocumentNodeStoreBranch.java:630)
> at org.apache.jackrabbit.oak.plugins.document.
> DocumentNodeStoreBranch$Persisted.setRoot(DocumentNodeStoreBranch.java:
> 576)
> at org.apache.jackrabbit.oak.plugins.document.
> DocumentNodeStoreBranch.setRoot(DocumentNodeStoreBranch.java:111)
> at org.apache.jackrabbit.oak.plugins.document.
> DocumentRootBuilder.purge(DocumentRootBuilder.java:174)
> at org.apache.jackrabbit.oak.plugins.document.
> DocumentRootBuilder.updated(DocumentRootBuilder.java:99)
> at org.apache.jackrabbit.oak.plugins.memory.
> MemoryNodeBuilder.updated(MemoryNodeBuilder.java:214)
> at org.apache.jackrabbit.oak.plugins.memory.
> MemoryNodeBuilder.setProperty(MemoryNodeBuilder.java:508)
> at org.apache.jackrabbit.oak.plugins.document.
> AbstractDocumentNodeBuilder.setChildNode(AbstractDocumentNodeBuilder.
> java:59)
> at org.apache.jackrabbit.oak.plugins.document.
> AbstractDocumentNodeBuilder.setChildNode(AbstractDocumentNodeBuilder.
> java:62)
> at org.apache.jackrabbit.oak.plugins.document.
> AbstractDocumentNodeBuilder.setChildNode(AbstractDocumentNodeBuilder.
> java:62)
> at org.apache.jackrabbit.oak.plugins.document.
> AbstractDocumentNodeBuilder.setChildNode(AbstractDocumentNodeBuilder.
> java:62)
> at org.apache.jackrabbit.oak.plugins.document.
> AbstractDocumentNodeBuilder.setChildNode(AbstractDocumentNodeBuilder.
> java:62)
> at org.apache.jackrabbit.oak.plugins.document.
> AbstractDocumentNodeBuilder.setChildNode(AbstractDocumentNodeBuilder.
> java:62)
> at org.apache.jackrabbit.oak.plugins.document.
> AbstractDocumentNodeBuilder.setChildNode(AbstractDocumentNodeBuilder.
> java:62)
> at org.apache.jackrabbit.oak.plugins.document.
> AbstractDocumentNodeBuilder.setChildNode(AbstractDocumentNodeBuilder.
> java:62)
> at org.apache.jackrabbit.oak.upgrade.nodestate.
> NodeStateCopier.copyNodeState(NodeStateCopier.java:192)
> at org.apache.jackrabbit.oak.upgrade.nodestate.
> NodeStateCopier.copyNodeState(NodeStateCopier.java:150)
> at org.apache.jackrabbit.oak.upgrade.nodestate.
> NodeStateCopier.access$200(NodeStateCopier.java:72)
> at org.apache.jackrabbit.oak.upgrade.nodestate.
> NodeStateCopier$Builder.copy(NodeStateCopier.java:397)
> at org.apache.jackrabbit.oak.upgrade.RepositoryUpgrade.
> copyWorkspace(RepositoryUpgrade.java:951)
> at org.apache.jackrabbit.oak.upgrade.RepositoryUpgrade.
> copy(RepositoryUpgrade.java:492)
> ... 3 more
>
> -Original Message-
> From: Tomek Rekawek [mailto:reka...@adobe.com]
> Sent: 22 September 2016 12:19
> To: oak-dev@jackrabbit.apache.org
> Subject: Re: oak-upgrade problems migrating from Jackrabbit 2 to Oak
>
> Hi Robert,
>
> thanks for noticing this. It seems you’ve run into another bug:
> OAK-4842[1]. I fixed it. Also, I backported the previous fix to the 1.4
> branch. Feel free to try the SNAPSHOTs:
>
> 1.4 (preferred if you want to use Oak 1.4.x):
> https://repository.apache.org/content/repositories/snapshots/org/apache/
> jackrabbit/oak-upgrade/1.4.8-SNAPSHOT/oak-upgrade-1.4.8-
> 20160922.111319-1.jar
> 1.6: https://repository.apache.org/content/repositories/
> snapshots/org/apache/jackrabbit/oak-upgrade/1.6-SNAPSHOT/oak-upgrade-1.6-
> 20160922.111809-6.jar
>
> Best regards,
> Tomek
>
> [1] https://issues.apache.org/jira/browse/OAK-4842
>
> --
> Tomek Rękawek | Adobe Research | www.adobe.com
> reka...@adobe.com
>
> > On 21 Sep 2016, at 17:36, Robert Haycock <

RE: oak-upgrade problems migrating from Jackrabbit 2 to Oak

2016-09-22 Thread Robert Haycock
t.java:189)
at 
org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.persist(DocumentNodeStoreBranch.java:298)
at 
org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.persist(DocumentNodeStoreBranch.java:268)
at 
org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.access$300(DocumentNodeStoreBranch.java:58)
at 
org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch$Persisted.persistTransientHead(DocumentNodeStoreBranch.java:630)
at 
org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch$Persisted.setRoot(DocumentNodeStoreBranch.java:576)
at 
org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.setRoot(DocumentNodeStoreBranch.java:111)
at 
org.apache.jackrabbit.oak.plugins.document.DocumentRootBuilder.purge(DocumentRootBuilder.java:174)
at 
org.apache.jackrabbit.oak.plugins.document.DocumentRootBuilder.updated(DocumentRootBuilder.java:99)
at 
org.apache.jackrabbit.oak.plugins.memory.MemoryNodeBuilder.updated(MemoryNodeBuilder.java:214)
at 
org.apache.jackrabbit.oak.plugins.memory.MemoryNodeBuilder.setProperty(MemoryNodeBuilder.java:508)
at 
org.apache.jackrabbit.oak.plugins.document.AbstractDocumentNodeBuilder.setChildNode(AbstractDocumentNodeBuilder.java:59)
at 
org.apache.jackrabbit.oak.plugins.document.AbstractDocumentNodeBuilder.setChildNode(AbstractDocumentNodeBuilder.java:62)
at 
org.apache.jackrabbit.oak.plugins.document.AbstractDocumentNodeBuilder.setChildNode(AbstractDocumentNodeBuilder.java:62)
at 
org.apache.jackrabbit.oak.plugins.document.AbstractDocumentNodeBuilder.setChildNode(AbstractDocumentNodeBuilder.java:62)
at 
org.apache.jackrabbit.oak.plugins.document.AbstractDocumentNodeBuilder.setChildNode(AbstractDocumentNodeBuilder.java:62)
at 
org.apache.jackrabbit.oak.plugins.document.AbstractDocumentNodeBuilder.setChildNode(AbstractDocumentNodeBuilder.java:62)
at 
org.apache.jackrabbit.oak.plugins.document.AbstractDocumentNodeBuilder.setChildNode(AbstractDocumentNodeBuilder.java:62)
at 
org.apache.jackrabbit.oak.plugins.document.AbstractDocumentNodeBuilder.setChildNode(AbstractDocumentNodeBuilder.java:62)
at 
org.apache.jackrabbit.oak.upgrade.nodestate.NodeStateCopier.copyNodeState(NodeStateCopier.java:192)
at 
org.apache.jackrabbit.oak.upgrade.nodestate.NodeStateCopier.copyNodeState(NodeStateCopier.java:150)
at 
org.apache.jackrabbit.oak.upgrade.nodestate.NodeStateCopier.access$200(NodeStateCopier.java:72)
at 
org.apache.jackrabbit.oak.upgrade.nodestate.NodeStateCopier$Builder.copy(NodeStateCopier.java:397)
at 
org.apache.jackrabbit.oak.upgrade.RepositoryUpgrade.copyWorkspace(RepositoryUpgrade.java:951)
at 
org.apache.jackrabbit.oak.upgrade.RepositoryUpgrade.copy(RepositoryUpgrade.java:492)
... 3 more

-Original Message-
From: Tomek Rekawek [mailto:reka...@adobe.com] 
Sent: 22 September 2016 12:19
To: oak-dev@jackrabbit.apache.org
Subject: Re: oak-upgrade problems migrating from Jackrabbit 2 to Oak

Hi Robert,

thanks for noticing this. It seems you’ve run into another bug: OAK-4842[1]. I 
fixed it. Also, I backported the previous fix to the 1.4 branch. Feel free to 
try the SNAPSHOTs:

1.4 (preferred if you want to use Oak 1.4.x): 
https://repository.apache.org/content/repositories/snapshots/org/apache/jackrabbit/oak-upgrade/1.4.8-SNAPSHOT/oak-upgrade-1.4.8-20160922.111319-1.jar
1.6: 
https://repository.apache.org/content/repositories/snapshots/org/apache/jackrabbit/oak-upgrade/1.6-SNAPSHOT/oak-upgrade-1.6-20160922.111809-6.jar

Best regards,
Tomek

[1] https://issues.apache.org/jira/browse/OAK-4842

-- 
Tomek Rękawek | Adobe Research | www.adobe.com
reka...@adobe.com

> On 21 Sep 2016, at 17:36, Robert Haycock 
> <robert.hayc...@artificial-solutions.com> wrote:
> 
> I just noticed the skip-name-check option!!
> 
> However, when I set the option...
> 
> java ^
> -jar target/oak-upgrade-1.6-SNAPSHOT.jar ^
> --skip-name-check ^
> c://work/MyComp-repository ^
> c://work/MyComp/MyComp-backend/ MyComp-repository.xml ^
> mongodb://localhost:27017/oak2
> 
> 
> ... I got the message:
> 
> 'skip-name-check' is not a recognized option
> joptsimple.UnrecognizedOptionException: 'skip-name-check' is not a recognized 
> option
>at 
> joptsimple.OptionException.unrecognizedOption(OptionException.java:89)
> 
> 
> 
> -Original Message-
> From: Robert Haycock [mailto:robert.hayc...@artificial-solutions.com] 
> Sent: 21 September 2016 16:26
> To: oak-dev@jackrabbit.apache.org
> Subject: RE: oak-upgrade problems migrating from Jackrabbit 2 to Oak
> 
> Hi,
> 
> So after configuring  the SecurityManager with the jackrabbit simple 
> implementations, I ran into another NPE as I'd commented out the SearchIndex.
> (
> Exception in threa

Re: oak-upgrade problems migrating from Jackrabbit 2 to Oak

2016-09-22 Thread Tomek Rekawek
Hi Robert,

thanks for noticing this. It seems you’ve run into another bug: OAK-4842[1]. I 
fixed it. Also, I backported the previous fix to the 1.4 branch. Feel free to 
try the SNAPSHOTs:

1.4 (preferred if you want to use Oak 1.4.x): 
https://repository.apache.org/content/repositories/snapshots/org/apache/jackrabbit/oak-upgrade/1.4.8-SNAPSHOT/oak-upgrade-1.4.8-20160922.111319-1.jar
1.6: 
https://repository.apache.org/content/repositories/snapshots/org/apache/jackrabbit/oak-upgrade/1.6-SNAPSHOT/oak-upgrade-1.6-20160922.111809-6.jar

Best regards,
Tomek

[1] https://issues.apache.org/jira/browse/OAK-4842

-- 
Tomek Rękawek | Adobe Research | www.adobe.com
reka...@adobe.com

> On 21 Sep 2016, at 17:36, Robert Haycock 
> <robert.hayc...@artificial-solutions.com> wrote:
> 
> I just noticed the skip-name-check option!!
> 
> However, when I set the option...
> 
> java ^
> -jar target/oak-upgrade-1.6-SNAPSHOT.jar ^
> --skip-name-check ^
> c://work/MyComp-repository ^
> c://work/MyComp/MyComp-backend/ MyComp-repository.xml ^
> mongodb://localhost:27017/oak2
> 
> 
> ... I got the message:
> 
> 'skip-name-check' is not a recognized option
> joptsimple.UnrecognizedOptionException: 'skip-name-check' is not a recognized 
> option
>at 
> joptsimple.OptionException.unrecognizedOption(OptionException.java:89)
> 
> 
> 
> -Original Message-
> From: Robert Haycock [mailto:robert.hayc...@artificial-solutions.com] 
> Sent: 21 September 2016 16:26
> To: oak-dev@jackrabbit.apache.org
> Subject: RE: oak-upgrade problems migrating from Jackrabbit 2 to Oak
> 
> Hi,
> 
> So after configuring  the SecurityManager with the jackrabbit simple 
> implementations, I ran into another NPE as I'd commented out the SearchIndex.
> (
> Exception in thread "main" java.lang.NullPointerException
>at 
> org.apache.jackrabbit.core.IndexAccessor.getReader(IndexAccessor.java:34)
>at 
> org.apache.jackrabbit.oak.upgrade.RepositoryUpgrade.assertNoLongNames(RepositoryUpgrade.java:977)
>at 
> org.apache.jackrabbit.oak.upgrade.RepositoryUpgrade.copy(RepositoryUpgrade.java:402)
>at 
> org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.upgrade(OakUpgrade.java:65)
>at 
> org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.migrate(OakUpgrade.java:53)
>at 
> org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.main(OakUpgrade.java:42)
> )
> 
> Looking at RepositoryUpgrade.java, I'm guessing the upgrade tool only works 
> if you use the default SearchIndex? For certain reasons, we had to implement 
> our own.
> 
> Rob.
> 
> -Original Message-----
> From: Tomek Rekawek [mailto:reka...@adobe.com]
> Sent: 21 September 2016 10:25
> To: oak-dev@jackrabbit.apache.org
> Subject: Re: oak-upgrade problems migrating from Jackrabbit 2 to Oak
> 
> Hi Robert & Marcel,
> 
> thanks for the report. I created OAK-4832[1] to track it.
> 
> Robert, could you check if the problem exists on the recent SNAPSHOT[2]? If 
> it’s fine, I’ll backport the fix to the 1.4 branch.
> 
> Marcel, do you think using ConfigurationParameters.EMPTY for userConfig is 
> enough if the SecurityManager is not present?
> 
> Regards,
> Tomek
> 
> [1] https://issues.apache.org/jira/browse/OAK-4832
> [2] 
> https://repository.apache.org/content/repositories/snapshots/org/apache/jackrabbit/oak-upgrade/1.6-SNAPSHOT/oak-upgrade-1.6-20160921.092314-5.jar
> 
> --
> Tomek Rękawek | Adobe Research | www.adobe.com reka...@adobe.com
> 
>> On 20 Sep 2016, at 17:46, Marcel Reutegger <mreut...@adobe.com> wrote:
>> 
>> Hi Robert,
>> 
>> I'm not too familiar with the upgrade module, but I think it doesn't 
>> support security configuration via JAAS. The NPE also indicates your 
>> repository.xml does not have security manager set. Can you try to set 
>> your SecurityManager in the repository.xml?
>> 
>> See also: 
>> http://jackrabbit.apache.org/jcr/jackrabbit-configuration.html#securit
>> y-configuration
>> 
>> Though, it would probably be better to fix the RepositoryUpgrade code 
>> because the SecurityManager element is actually optional.
>> 
>> Regards
>> Marcel
>> 
>> On 20/09/16 16:40, Robert Haycock wrote:
>>> Hi,
>>> 
>>> I have a jackrabbit repository (2.6.4) and I want to migrate to oak.
>>> 
>>> I tried...
>>> Java -jar oak-upgrade-1.4.7.jar   
>>> mongodb://localhost:27017/oak
>>> 
>>> It complained about the mysql driver missing. So I copied the oak-upgrade 
>>> project and added the mysql dependency. Then it couldn't find my custom 
>>> search index class, so

RE: oak-upgrade problems migrating from Jackrabbit 2 to Oak

2016-09-21 Thread Robert Haycock
I just noticed the skip-name-check option!!

However, when I set the option...

java ^
 -jar target/oak-upgrade-1.6-SNAPSHOT.jar ^
 --skip-name-check ^
 c://work/MyComp-repository ^
 c://work/MyComp/MyComp-backend/ MyComp-repository.xml ^
 mongodb://localhost:27017/oak2


... I got the message:

'skip-name-check' is not a recognized option
joptsimple.UnrecognizedOptionException: 'skip-name-check' is not a recognized 
option
at 
joptsimple.OptionException.unrecognizedOption(OptionException.java:89)



-Original Message-
From: Robert Haycock [mailto:robert.hayc...@artificial-solutions.com] 
Sent: 21 September 2016 16:26
To: oak-dev@jackrabbit.apache.org
Subject: RE: oak-upgrade problems migrating from Jackrabbit 2 to Oak

Hi,

So after configuring  the SecurityManager with the jackrabbit simple 
implementations, I ran into another NPE as I'd commented out the SearchIndex.
(
Exception in thread "main" java.lang.NullPointerException
at 
org.apache.jackrabbit.core.IndexAccessor.getReader(IndexAccessor.java:34)
at 
org.apache.jackrabbit.oak.upgrade.RepositoryUpgrade.assertNoLongNames(RepositoryUpgrade.java:977)
at 
org.apache.jackrabbit.oak.upgrade.RepositoryUpgrade.copy(RepositoryUpgrade.java:402)
at 
org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.upgrade(OakUpgrade.java:65)
at 
org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.migrate(OakUpgrade.java:53)
at 
org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.main(OakUpgrade.java:42)
)

Looking at RepositoryUpgrade.java, I'm guessing the upgrade tool only works if 
you use the default SearchIndex? For certain reasons, we had to implement our 
own.

Rob.

-Original Message-
From: Tomek Rekawek [mailto:reka...@adobe.com]
Sent: 21 September 2016 10:25
To: oak-dev@jackrabbit.apache.org
Subject: Re: oak-upgrade problems migrating from Jackrabbit 2 to Oak

Hi Robert & Marcel,

thanks for the report. I created OAK-4832[1] to track it.

Robert, could you check if the problem exists on the recent SNAPSHOT[2]? If 
it’s fine, I’ll backport the fix to the 1.4 branch.

Marcel, do you think using ConfigurationParameters.EMPTY for userConfig is 
enough if the SecurityManager is not present?

Regards,
Tomek

[1] https://issues.apache.org/jira/browse/OAK-4832
[2] 
https://repository.apache.org/content/repositories/snapshots/org/apache/jackrabbit/oak-upgrade/1.6-SNAPSHOT/oak-upgrade-1.6-20160921.092314-5.jar

--
Tomek Rękawek | Adobe Research | www.adobe.com reka...@adobe.com

> On 20 Sep 2016, at 17:46, Marcel Reutegger <mreut...@adobe.com> wrote:
> 
> Hi Robert,
> 
> I'm not too familiar with the upgrade module, but I think it doesn't 
> support security configuration via JAAS. The NPE also indicates your 
> repository.xml does not have security manager set. Can you try to set 
> your SecurityManager in the repository.xml?
> 
> See also: 
> http://jackrabbit.apache.org/jcr/jackrabbit-configuration.html#securit
> y-configuration
> 
> Though, it would probably be better to fix the RepositoryUpgrade code 
> because the SecurityManager element is actually optional.
> 
> Regards
> Marcel
> 
> On 20/09/16 16:40, Robert Haycock wrote:
>> Hi,
>> 
>> I have a jackrabbit repository (2.6.4) and I want to migrate to oak.
>> 
>> I tried...
>> Java -jar oak-upgrade-1.4.7.jar   
>> mongodb://localhost:27017/oak
>> 
>> It complained about the mysql driver missing. So I copied the oak-upgrade 
>> project and added the mysql dependency. Then it couldn't find my custom 
>> search index class, so I commented it out of the xml. Then it couldn't find 
>> the security manager class configured in my JAAS config so I created one, a 
>> blank implementation where all methods returned true.
>> 
>> Just as I thought it was doing something I ran into this
>> C:\work\MyCompToOakUpgrader>java 
>> -Djava.security.auth.login.config=c:/work/MyComp/MyComp-backend/jaas.
>> config  -jar target/MyComp-to-oak-upgrader-1.4.7.jar  
>> c://work/MyComp-repository  
>> c://work/MyComp/MyComp-backend/MyComp-repository.xml  
>> mongodb://localhost:27017/oak
>> 20.09.2016 15:36:10.936 [main] *INFO*  
>> org.apache.jackrabbit.oak.upgrade.cli.parser.MigrationOptions - 
>> DataStore needs to be shared with new repository
>> 20.09.2016 15:36:10.937 [main] *INFO*  
>> org.apache.jackrabbit.oak.upgrade.cli.parser.MigrationOptions - 
>> copyVersions parameter set to 1970-01-01
>> 20.09.2016 15:36:10.940 [main] *INFO*  
>> org.apache.jackrabbit.oak.upgrade.cli.parser.MigrationOptions - 
>> copyOrphanedVersions parameter set to 1970-01-01
>> 20.09.2016 15:36:10.941 [main] *INFO*  
>> org.apache.jackrabbit.oak.upgrade.cli.parser.MigrationOptions - Cache 

RE: oak-upgrade problems migrating from Jackrabbit 2 to Oak

2016-09-21 Thread Robert Haycock
Hi,

So after configuring  the SecurityManager with the jackrabbit simple 
implementations, I ran into another NPE as I'd commented out the SearchIndex.
(
Exception in thread "main" java.lang.NullPointerException
at 
org.apache.jackrabbit.core.IndexAccessor.getReader(IndexAccessor.java:34)
at 
org.apache.jackrabbit.oak.upgrade.RepositoryUpgrade.assertNoLongNames(RepositoryUpgrade.java:977)
at 
org.apache.jackrabbit.oak.upgrade.RepositoryUpgrade.copy(RepositoryUpgrade.java:402)
at 
org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.upgrade(OakUpgrade.java:65)
at 
org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.migrate(OakUpgrade.java:53)
at 
org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.main(OakUpgrade.java:42)
)

Looking at RepositoryUpgrade.java, I'm guessing the upgrade tool only works if 
you use the default SearchIndex? For certain reasons, we had to implement our 
own.

Rob.

-Original Message-
From: Tomek Rekawek [mailto:reka...@adobe.com] 
Sent: 21 September 2016 10:25
To: oak-dev@jackrabbit.apache.org
Subject: Re: oak-upgrade problems migrating from Jackrabbit 2 to Oak

Hi Robert & Marcel,

thanks for the report. I created OAK-4832[1] to track it.

Robert, could you check if the problem exists on the recent SNAPSHOT[2]? If 
it’s fine, I’ll backport the fix to the 1.4 branch.

Marcel, do you think using ConfigurationParameters.EMPTY for userConfig is 
enough if the SecurityManager is not present?

Regards,
Tomek

[1] https://issues.apache.org/jira/browse/OAK-4832
[2] 
https://repository.apache.org/content/repositories/snapshots/org/apache/jackrabbit/oak-upgrade/1.6-SNAPSHOT/oak-upgrade-1.6-20160921.092314-5.jar

-- 
Tomek Rękawek | Adobe Research | www.adobe.com
reka...@adobe.com

> On 20 Sep 2016, at 17:46, Marcel Reutegger <mreut...@adobe.com> wrote:
> 
> Hi Robert,
> 
> I'm not too familiar with the upgrade module, but I think it
> doesn't support security configuration via JAAS. The NPE also
> indicates your repository.xml does not have security manager
> set. Can you try to set your SecurityManager in the repository.xml?
> 
> See also: 
> http://jackrabbit.apache.org/jcr/jackrabbit-configuration.html#security-configuration
> 
> Though, it would probably be better to fix the RepositoryUpgrade
> code because the SecurityManager element is actually optional.
> 
> Regards
> Marcel
> 
> On 20/09/16 16:40, Robert Haycock wrote:
>> Hi,
>> 
>> I have a jackrabbit repository (2.6.4) and I want to migrate to oak.
>> 
>> I tried...
>> Java -jar oak-upgrade-1.4.7.jar   
>> mongodb://localhost:27017/oak
>> 
>> It complained about the mysql driver missing. So I copied the oak-upgrade 
>> project and added the mysql dependency. Then it couldn't find my custom 
>> search index class, so I commented it out of the xml. Then it couldn't find 
>> the security manager class configured in my JAAS config so I created one, a 
>> blank implementation where all methods returned true.
>> 
>> Just as I thought it was doing something I ran into this
>> C:\work\MyCompToOakUpgrader>java 
>> -Djava.security.auth.login.config=c:/work/MyComp/MyComp-backend/jaas.config  
>> -jar target/MyComp-to-oak-upgrader-1.4.7.jar  c://work/MyComp-repository  
>> c://work/MyComp/MyComp-backend/MyComp-repository.xml  
>> mongodb://localhost:27017/oak
>> 20.09.2016 15:36:10.936 [main] *INFO*  
>> org.apache.jackrabbit.oak.upgrade.cli.parser.MigrationOptions - DataStore 
>> needs to be shared with new repository
>> 20.09.2016 15:36:10.937 [main] *INFO*  
>> org.apache.jackrabbit.oak.upgrade.cli.parser.MigrationOptions - copyVersions 
>> parameter set to 1970-01-01
>> 20.09.2016 15:36:10.940 [main] *INFO*  
>> org.apache.jackrabbit.oak.upgrade.cli.parser.MigrationOptions - 
>> copyOrphanedVersions parameter set to 1970-01-01
>> 20.09.2016 15:36:10.941 [main] *INFO*  
>> org.apache.jackrabbit.oak.upgrade.cli.parser.MigrationOptions - Cache size: 
>> 256 MB
>> 20.09.2016 15:36:10.952 [main] *INFO*  
>> org.apache.jackrabbit.oak.upgrade.cli.parser.StoreArguments - Source: 
>> JCR2_DIR_XML[c://work/MyComp-repository, 
>> c://work/MyComp/MyComp-backend/MyComp-repository.xml]
>> 20.09.2016 15:36:10.954 [main] *INFO*  
>> org.apache.jackrabbit.oak.upgrade.cli.parser.StoreArguments - Destination: 
>> MONGO[mongodb://localhost:27017/oak]
>> 20.09.2016 15:36:11.042 [main] *INFO*  
>> org.apache.jackrabbit.core.RepositoryImpl - Starting repository...
>> 20.09.2016 15:36:11.482 [main] *INFO*  
>> org.apache.jackrabbit.core.RepositoryImpl - initializing workspace 
>> 'default'...
>> 20.09.2016 15:36:11.550 [main] *INFO*  
>> org.apache.jackrabbi

Re: oak-upgrade problems migrating from Jackrabbit 2 to Oak

2016-09-21 Thread Marcel Reutegger

On 21/09/16 11:25, Tomek Rekawek wrote:

Marcel, do you think using ConfigurationParameters.EMPTY for
userConfig is enough if the SecurityManager is not present?


I'm not that familiar with the security part.

@Angela, do you know?

Regards
 Marcel


Re: oak-upgrade problems migrating from Jackrabbit 2 to Oak

2016-09-21 Thread Tomek Rekawek
Hi Robert & Marcel,

thanks for the report. I created OAK-4832[1] to track it.

Robert, could you check if the problem exists on the recent SNAPSHOT[2]? If 
it’s fine, I’ll backport the fix to the 1.4 branch.

Marcel, do you think using ConfigurationParameters.EMPTY for userConfig is 
enough if the SecurityManager is not present?

Regards,
Tomek

[1] https://issues.apache.org/jira/browse/OAK-4832
[2] 
https://repository.apache.org/content/repositories/snapshots/org/apache/jackrabbit/oak-upgrade/1.6-SNAPSHOT/oak-upgrade-1.6-20160921.092314-5.jar

-- 
Tomek Rękawek | Adobe Research | www.adobe.com
reka...@adobe.com

> On 20 Sep 2016, at 17:46, Marcel Reutegger  wrote:
> 
> Hi Robert,
> 
> I'm not too familiar with the upgrade module, but I think it
> doesn't support security configuration via JAAS. The NPE also
> indicates your repository.xml does not have security manager
> set. Can you try to set your SecurityManager in the repository.xml?
> 
> See also: 
> http://jackrabbit.apache.org/jcr/jackrabbit-configuration.html#security-configuration
> 
> Though, it would probably be better to fix the RepositoryUpgrade
> code because the SecurityManager element is actually optional.
> 
> Regards
> Marcel
> 
> On 20/09/16 16:40, Robert Haycock wrote:
>> Hi,
>> 
>> I have a jackrabbit repository (2.6.4) and I want to migrate to oak.
>> 
>> I tried...
>> Java -jar oak-upgrade-1.4.7.jar   
>> mongodb://localhost:27017/oak
>> 
>> It complained about the mysql driver missing. So I copied the oak-upgrade 
>> project and added the mysql dependency. Then it couldn't find my custom 
>> search index class, so I commented it out of the xml. Then it couldn't find 
>> the security manager class configured in my JAAS config so I created one, a 
>> blank implementation where all methods returned true.
>> 
>> Just as I thought it was doing something I ran into this
>> C:\work\MyCompToOakUpgrader>java 
>> -Djava.security.auth.login.config=c:/work/MyComp/MyComp-backend/jaas.config  
>> -jar target/MyComp-to-oak-upgrader-1.4.7.jar  c://work/MyComp-repository  
>> c://work/MyComp/MyComp-backend/MyComp-repository.xml  
>> mongodb://localhost:27017/oak
>> 20.09.2016 15:36:10.936 [main] *INFO*  
>> org.apache.jackrabbit.oak.upgrade.cli.parser.MigrationOptions - DataStore 
>> needs to be shared with new repository
>> 20.09.2016 15:36:10.937 [main] *INFO*  
>> org.apache.jackrabbit.oak.upgrade.cli.parser.MigrationOptions - copyVersions 
>> parameter set to 1970-01-01
>> 20.09.2016 15:36:10.940 [main] *INFO*  
>> org.apache.jackrabbit.oak.upgrade.cli.parser.MigrationOptions - 
>> copyOrphanedVersions parameter set to 1970-01-01
>> 20.09.2016 15:36:10.941 [main] *INFO*  
>> org.apache.jackrabbit.oak.upgrade.cli.parser.MigrationOptions - Cache size: 
>> 256 MB
>> 20.09.2016 15:36:10.952 [main] *INFO*  
>> org.apache.jackrabbit.oak.upgrade.cli.parser.StoreArguments - Source: 
>> JCR2_DIR_XML[c://work/MyComp-repository, 
>> c://work/MyComp/MyComp-backend/MyComp-repository.xml]
>> 20.09.2016 15:36:10.954 [main] *INFO*  
>> org.apache.jackrabbit.oak.upgrade.cli.parser.StoreArguments - Destination: 
>> MONGO[mongodb://localhost:27017/oak]
>> 20.09.2016 15:36:11.042 [main] *INFO*  
>> org.apache.jackrabbit.core.RepositoryImpl - Starting repository...
>> 20.09.2016 15:36:11.482 [main] *INFO*  
>> org.apache.jackrabbit.core.RepositoryImpl - initializing workspace 
>> 'default'...
>> 20.09.2016 15:36:11.550 [main] *INFO*  
>> org.apache.jackrabbit.core.RepositoryImpl - workspace 'default' initialized
>> 20.09.2016 15:36:11.552 [main] *INFO*  
>> org.apache.jackrabbit.core.RepositoryImpl - SecurityManager = class 
>> org.apache.jackrabbit.core.security.simple.SimpleSecurityManager
>> 20.09.2016 15:36:11.560 [main] *INFO*  
>> org.apache.jackrabbit.core.security.simple.SimpleSecurityManager - init: 
>> using JAAS LoginModule configuration for MyCompManagerLoginModule
>> 20.09.2016 15:36:11.565 [main] *INFO*  
>> org.apache.jackrabbit.core.RepositoryImpl - Repository started (523ms)
>> 20.09.2016 15:36:11.842 [main] *INFO*  
>> org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStore - 
>> Configuration maxReplicationLagMillis 2160, maxDeltaForModTimeIdxSecs 
>> 60, disableIndexHint false, WriteConcern { "getlasterror" : 1} / (Continue 
>> on error? false)
>> 20.09.2016 15:36:12.136 [main] *INFO*  
>> org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore - Initialized 
>> DocumentNodeStore with clusterNodeId: 1 (id: 1, startTime: 1474382172101, 
>> machineId: mac:00ff1377ebc4, instanceId: C:\work\MyCompToOakUpgrader, pid: 
>> 7212, uuid: a8599b2e-f2c1-48d7-8804-113d11275191, readWriteMode: null, 
>> state: NONE, revLock: NONE, oakVersion: 1.4.7)
>> 20.09.2016 15:36:12.154 [main] *INFO*  
>> org.apache.jackrabbit.oak.upgrade.RepositoryUpgrade - Copying repository 
>> content from c:\work\MyComp-repository to Oak
>> 20.09.2016 15:36:12.167 [main] *INFO*  
>> 

Re: oak-upgrade problems migrating from Jackrabbit 2 to Oak

2016-09-20 Thread Marcel Reutegger

Hi Robert,

I'm not too familiar with the upgrade module, but I think it
doesn't support security configuration via JAAS. The NPE also
indicates your repository.xml does not have security manager
set. Can you try to set your SecurityManager in the repository.xml?

See also: 
http://jackrabbit.apache.org/jcr/jackrabbit-configuration.html#security-configuration


Though, it would probably be better to fix the RepositoryUpgrade
code because the SecurityManager element is actually optional.

Regards
 Marcel

On 20/09/16 16:40, Robert Haycock wrote:

Hi,

I have a jackrabbit repository (2.6.4) and I want to migrate to oak.

I tried...
Java -jar oak-upgrade-1.4.7.jar   
mongodb://localhost:27017/oak

It complained about the mysql driver missing. So I copied the oak-upgrade 
project and added the mysql dependency. Then it couldn't find my custom search 
index class, so I commented it out of the xml. Then it couldn't find the 
security manager class configured in my JAAS config so I created one, a blank 
implementation where all methods returned true.

Just as I thought it was doing something I ran into this
C:\work\MyCompToOakUpgrader>java 
-Djava.security.auth.login.config=c:/work/MyComp/MyComp-backend/jaas.config  -jar 
target/MyComp-to-oak-upgrader-1.4.7.jar  c://work/MyComp-repository  
c://work/MyComp/MyComp-backend/MyComp-repository.xml  mongodb://localhost:27017/oak
20.09.2016 15:36:10.936 [main] *INFO*  
org.apache.jackrabbit.oak.upgrade.cli.parser.MigrationOptions - DataStore needs 
to be shared with new repository
20.09.2016 15:36:10.937 [main] *INFO*  
org.apache.jackrabbit.oak.upgrade.cli.parser.MigrationOptions - copyVersions 
parameter set to 1970-01-01
20.09.2016 15:36:10.940 [main] *INFO*  
org.apache.jackrabbit.oak.upgrade.cli.parser.MigrationOptions - 
copyOrphanedVersions parameter set to 1970-01-01
20.09.2016 15:36:10.941 [main] *INFO*  
org.apache.jackrabbit.oak.upgrade.cli.parser.MigrationOptions - Cache size: 256 
MB
20.09.2016 15:36:10.952 [main] *INFO*  
org.apache.jackrabbit.oak.upgrade.cli.parser.StoreArguments - Source: 
JCR2_DIR_XML[c://work/MyComp-repository, 
c://work/MyComp/MyComp-backend/MyComp-repository.xml]
20.09.2016 15:36:10.954 [main] *INFO*  
org.apache.jackrabbit.oak.upgrade.cli.parser.StoreArguments - Destination: 
MONGO[mongodb://localhost:27017/oak]
20.09.2016 15:36:11.042 [main] *INFO*  
org.apache.jackrabbit.core.RepositoryImpl - Starting repository...
20.09.2016 15:36:11.482 [main] *INFO*  
org.apache.jackrabbit.core.RepositoryImpl - initializing workspace 'default'...
20.09.2016 15:36:11.550 [main] *INFO*  
org.apache.jackrabbit.core.RepositoryImpl - workspace 'default' initialized
20.09.2016 15:36:11.552 [main] *INFO*  
org.apache.jackrabbit.core.RepositoryImpl - SecurityManager = class 
org.apache.jackrabbit.core.security.simple.SimpleSecurityManager
20.09.2016 15:36:11.560 [main] *INFO*  
org.apache.jackrabbit.core.security.simple.SimpleSecurityManager - init: using 
JAAS LoginModule configuration for MyCompManagerLoginModule
20.09.2016 15:36:11.565 [main] *INFO*  
org.apache.jackrabbit.core.RepositoryImpl - Repository started (523ms)
20.09.2016 15:36:11.842 [main] *INFO*  
org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStore - Configuration 
maxReplicationLagMillis 2160, maxDeltaForModTimeIdxSecs 60, disableIndexHint false, 
WriteConcern { "getlasterror" : 1} / (Continue on error? false)
20.09.2016 15:36:12.136 [main] *INFO*  
org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore - Initialized 
DocumentNodeStore with clusterNodeId: 1 (id: 1, startTime: 1474382172101, 
machineId: mac:00ff1377ebc4, instanceId: C:\work\MyCompToOakUpgrader, pid: 
7212, uuid: a8599b2e-f2c1-48d7-8804-113d11275191, readWriteMode: null, state: 
NONE, revLock: NONE, oakVersion: 1.4.7)
20.09.2016 15:36:12.154 [main] *INFO*  
org.apache.jackrabbit.oak.upgrade.RepositoryUpgrade - Copying repository 
content from c:\work\MyComp-repository to Oak
20.09.2016 15:36:12.167 [main] *INFO*  
org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore - Starting 
disposal of DocumentNodeStore with clusterNodeId: 1 (id: 1, startTime: 
1474382172101, machineId: mac:00ff1377ebc4, instanceId: 
C:\work\MyCompToOakUpgrader, pid: 7212, uuid: 
a8599b2e-f2c1-48d7-8804-113d11275191, readWriteMode: null, state: NONE, 
revLock: NONE, oakVersion: 1.4.7)
20.09.2016 15:36:12.171 [main] *INFO*  
org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore - Disposed 
DocumentNodeStore with clusterNodeId: 1
20.09.2016 15:36:12.171 [main] *INFO*  
org.apache.jackrabbit.core.RepositoryImpl - Shutting down repository...
20.09.2016 15:36:12.174 [main] *INFO*  
org.apache.jackrabbit.core.RepositoryImpl - shutting down workspace 'default'...
20.09.2016 15:36:12.174 [main] *INFO*  
org.apache.jackrabbit.core.observation.ObservationDispatcher - Notification of 
EventListeners stopped.
20.09.2016 15:36:12.178 [main] *INFO*  
org.apache.jackrabbit.core.RepositoryImpl - workspace 'default' has 

oak-upgrade problems migrating from Jackrabbit 2 to Oak

2016-09-20 Thread Robert Haycock
Hi,

I have a jackrabbit repository (2.6.4) and I want to migrate to oak.

I tried...
Java -jar oak-upgrade-1.4.7.jar   
mongodb://localhost:27017/oak

It complained about the mysql driver missing. So I copied the oak-upgrade 
project and added the mysql dependency. Then it couldn't find my custom search 
index class, so I commented it out of the xml. Then it couldn't find the 
security manager class configured in my JAAS config so I created one, a blank 
implementation where all methods returned true.

Just as I thought it was doing something I ran into this
C:\work\MyCompToOakUpgrader>java 
-Djava.security.auth.login.config=c:/work/MyComp/MyComp-backend/jaas.config  
-jar target/MyComp-to-oak-upgrader-1.4.7.jar  c://work/MyComp-repository  
c://work/MyComp/MyComp-backend/MyComp-repository.xml  
mongodb://localhost:27017/oak
20.09.2016 15:36:10.936 [main] *INFO*  
org.apache.jackrabbit.oak.upgrade.cli.parser.MigrationOptions - DataStore needs 
to be shared with new repository
20.09.2016 15:36:10.937 [main] *INFO*  
org.apache.jackrabbit.oak.upgrade.cli.parser.MigrationOptions - copyVersions 
parameter set to 1970-01-01
20.09.2016 15:36:10.940 [main] *INFO*  
org.apache.jackrabbit.oak.upgrade.cli.parser.MigrationOptions - 
copyOrphanedVersions parameter set to 1970-01-01
20.09.2016 15:36:10.941 [main] *INFO*  
org.apache.jackrabbit.oak.upgrade.cli.parser.MigrationOptions - Cache size: 256 
MB
20.09.2016 15:36:10.952 [main] *INFO*  
org.apache.jackrabbit.oak.upgrade.cli.parser.StoreArguments - Source: 
JCR2_DIR_XML[c://work/MyComp-repository, 
c://work/MyComp/MyComp-backend/MyComp-repository.xml]
20.09.2016 15:36:10.954 [main] *INFO*  
org.apache.jackrabbit.oak.upgrade.cli.parser.StoreArguments - Destination: 
MONGO[mongodb://localhost:27017/oak]
20.09.2016 15:36:11.042 [main] *INFO*  
org.apache.jackrabbit.core.RepositoryImpl - Starting repository...
20.09.2016 15:36:11.482 [main] *INFO*  
org.apache.jackrabbit.core.RepositoryImpl - initializing workspace 'default'...
20.09.2016 15:36:11.550 [main] *INFO*  
org.apache.jackrabbit.core.RepositoryImpl - workspace 'default' initialized
20.09.2016 15:36:11.552 [main] *INFO*  
org.apache.jackrabbit.core.RepositoryImpl - SecurityManager = class 
org.apache.jackrabbit.core.security.simple.SimpleSecurityManager
20.09.2016 15:36:11.560 [main] *INFO*  
org.apache.jackrabbit.core.security.simple.SimpleSecurityManager - init: using 
JAAS LoginModule configuration for MyCompManagerLoginModule
20.09.2016 15:36:11.565 [main] *INFO*  
org.apache.jackrabbit.core.RepositoryImpl - Repository started (523ms)
20.09.2016 15:36:11.842 [main] *INFO*  
org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStore - 
Configuration maxReplicationLagMillis 2160, maxDeltaForModTimeIdxSecs 60, 
disableIndexHint false, WriteConcern { "getlasterror" : 1} / (Continue on 
error? false)
20.09.2016 15:36:12.136 [main] *INFO*  
org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore - Initialized 
DocumentNodeStore with clusterNodeId: 1 (id: 1, startTime: 1474382172101, 
machineId: mac:00ff1377ebc4, instanceId: C:\work\MyCompToOakUpgrader, pid: 
7212, uuid: a8599b2e-f2c1-48d7-8804-113d11275191, readWriteMode: null, state: 
NONE, revLock: NONE, oakVersion: 1.4.7)
20.09.2016 15:36:12.154 [main] *INFO*  
org.apache.jackrabbit.oak.upgrade.RepositoryUpgrade - Copying repository 
content from c:\work\MyComp-repository to Oak
20.09.2016 15:36:12.167 [main] *INFO*  
org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore - Starting 
disposal of DocumentNodeStore with clusterNodeId: 1 (id: 1, startTime: 
1474382172101, machineId: mac:00ff1377ebc4, instanceId: 
C:\work\MyCompToOakUpgrader, pid: 7212, uuid: 
a8599b2e-f2c1-48d7-8804-113d11275191, readWriteMode: null, state: NONE, 
revLock: NONE, oakVersion: 1.4.7)
20.09.2016 15:36:12.171 [main] *INFO*  
org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore - Disposed 
DocumentNodeStore with clusterNodeId: 1
20.09.2016 15:36:12.171 [main] *INFO*  
org.apache.jackrabbit.core.RepositoryImpl - Shutting down repository...
20.09.2016 15:36:12.174 [main] *INFO*  
org.apache.jackrabbit.core.RepositoryImpl - shutting down workspace 'default'...
20.09.2016 15:36:12.174 [main] *INFO*  
org.apache.jackrabbit.core.observation.ObservationDispatcher - Notification of 
EventListeners stopped.
20.09.2016 15:36:12.178 [main] *INFO*  
org.apache.jackrabbit.core.RepositoryImpl - workspace 'default' has been 
shutdown
20.09.2016 15:36:12.182 [main] *INFO*  
org.apache.jackrabbit.core.RepositoryImpl - Repository has been shutdown
Exception in thread "main" java.lang.RuntimeException: 
javax.jcr.RepositoryException: Failed to copy content
at com.google.common.io.Closer.rethrow(Closer.java:149)
at 
org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.migrate(OakUpgrade.java:58)
at 
org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.main(OakUpgrade.java:42)
Caused by: javax.jcr.RepositoryException: Failed to copy content