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

On 23 September 2016 at 00: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.
>         at org.bson.BsonBinaryWriter.backpatchSize(
> BsonBinaryWriter.java:367)
>         at org.bson.BsonBinaryWriter.doWriteEndDocument(
> BsonBinaryWriter.java:122)
>         at org.bson.AbstractBsonWriter.writeEndDocument(
> AbstractBsonWriter.java:293)
>         at com.mongodb.DBObjectCodec.encodeMap(DBObjectCodec.java:222)
>         at com.mongodb.DBObjectCodec.writeValue(DBObjectCodec.java:196)
>         at com.mongodb.DBObjectCodec.encode(DBObjectCodec.java:128)
>         at com.mongodb.DBObjectCodec.encode(DBObjectCodec.java:61)
>         at org.bson.codecs.BsonDocumentWrapperCodec.encode(
> BsonDocumentWrapperCodec.java:63)
>         at org.bson.codecs.BsonDocumentWrapperCodec.encode(
> BsonDocumentWrapperCodec.java:29)
>         at com.mongodb.connection.UpdateCommandMessage.writeTheWrites(
> UpdateCommandMessage.java:84)
>         at com.mongodb.connection.UpdateCommandMessage.writeTheWrites(
> UpdateCommandMessage.java:42)
>         at com.mongodb.connection.BaseWriteCommandMessage.
> encodeMessageBodyWithMetadata(BaseWriteCommandMessage.java:129)
>         at com.mongodb.connection.RequestMessage.encodeWithMetadata(
> RequestMessage.java:160)
>         at com.mongodb.connection.WriteCommandProtocol.sendMessage(
> WriteCommandProtocol.java:212)
>         at com.mongodb.connection.WriteCommandProtocol.execute(
> WriteCommandProtocol.java:101)
>         at com.mongodb.connection.UpdateCommandProtocol.execute(
> UpdateCommandProtocol.java:64)
>         at com.mongodb.connection.UpdateCommandProtocol.execute(
> UpdateCommandProtocol.java:37)
>         at com.mongodb.connection.DefaultServer$
> DefaultServerProtocolExecutor.execute(DefaultServer.java:159)
>         at com.mongodb.connection.DefaultServerConnection.executeProtocol(
> DefaultServerConnection.java:286)
>         at com.mongodb.connection.DefaultServerConnection.updateCommand(
> DefaultServerConnection.java:140)
>         at com.mongodb.operation.MixedBulkWriteOperation$Run$3.
> executeWriteCommandProtocol(MixedBulkWriteOperation.java:480)
>         at com.mongodb.operation.MixedBulkWriteOperation$Run$
> RunExecutor.execute(MixedBulkWriteOperation.java:646)
>         at com.mongodb.operation.MixedBulkWriteOperation$Run.execute(
> MixedBulkWriteOperation.java:399)
>         at com.mongodb.operation.MixedBulkWriteOperation$1.
> call(MixedBulkWriteOperation.java:179)
>         at com.mongodb.operation.MixedBulkWriteOperation$1.
> call(MixedBulkWriteOperation.java:168)
>         at com.mongodb.operation.OperationHelper.withConnectionSource(
> OperationHelper.java:230)
>         at com.mongodb.operation.OperationHelper.withConnection(
> OperationHelper.java:221)
>         at com.mongodb.operation.MixedBulkWriteOperation.execute(
> MixedBulkWriteOperation.java:168)
>         at com.mongodb.operation.MixedBulkWriteOperation.execute(
> MixedBulkWriteOperation.java:74)
>         at com.mongodb.Mongo.execute(Mongo.java:781)
>         at com.mongodb.Mongo$2.execute(Mongo.java:764)
>         at com.mongodb.DBCollection.executeBulkWriteOperation(
> DBCollection.java:2195)
>         at com.mongodb.DBCollection.executeBulkWriteOperation(
> DBCollection.java:2188)
>         at com.mongodb.BulkWriteOperation.execute(
> BulkWriteOperation.java:121)
>         at org.apache.jackrabbit.oak.plugins.document.mongo.
> MongoDocumentStore.sendBulkUpdate(MongoDocumentStore.java:1088)
>         at org.apache.jackrabbit.oak.plugins.document.mongo.
> MongoDocumentStore.bulkUpdate(MongoDocumentStore.java:989)
>         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 <Robert.Haycock@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 <path to JCR repo> <path to repo xml>
> >>> 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 21600000,
> >>> 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
> >>>       at org.apache.jackrabbit.oak.upgrade.RepositoryUpgrade.
> copy(RepositoryUpgrade.java:525)
> >>>       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: java.lang.NullPointerException
> >>>       at org.apache.jackrabbit.oak.upgrade.RepositoryUpgrade.
> mapSecurityConfig(RepositoryUpgrade.java:615)
> >>>       at org.apache.jackrabbit.oak.upgrade.RepositoryUpgrade.
> copy(RepositoryUpgrade.java:388)
> >>>       ... 3 more
> >>>
> >>> Is there any way to get oak-upgrade to work? Or is there any other
> method of migrating?
> >>>
> >>> Thanks,
> >>> Rob.
> >>>
> >
>
>


-- 
-Tor

Reply via email to