jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomek Rękawek (JIRA) <j...@apache.org>
Subject [jira] [Comment Edited] (OAK-7779) Ignore copying of namespace index node in InitialContentMigrator
Date Wed, 03 Oct 2018 16:44:00 GMT

    [ https://issues.apache.org/jira/browse/OAK-7779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16637174#comment-16637174
] 

Tomek Rękawek edited comment on OAK-7779 at 10/3/18 4:43 PM:
-------------------------------------------------------------

I'm not sure about this approach. It seems that not all the namespaces are regenerated. As
a result, there are nodes with node types having invalid namespaces.

{noformat}
03.10.2018 03:21:58.550 *ERROR* [qtp162975365-1555] org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage
Error during install.
javax.jcr.NamespaceException: internal error: failed to resolve namespace prefix
        at org.apache.jackrabbit.spi.commons.namespace.SessionNamespaceResolver.getURI(SessionNamespaceResolver.java:62)
[org.apache.jackrabbit.jackrabbit-spi-commons:2.17.5]
        at org.apache.jackrabbit.spi.commons.conversion.NameParser.parse(NameParser.java:187)
[org.apache.jackrabbit.jackrabbit-spi-commons:2.17.5]
        at org.apache.jackrabbit.spi.commons.conversion.ParsingNameResolver.getQName(ParsingNameResolver.java:64)
[org.apache.jackrabbit.jackrabbit-spi-commons:2.17.5]
        at org.apache.jackrabbit.spi.commons.conversion.DefaultNamePathResolver.getQName(DefaultNamePathResolver.java:74)
[org.apache.jackrabbit.jackrabbit-spi-commons:2.17.5]
        at org.apache.jackrabbit.vault.fs.spi.impl.jcr20.JcrNodeTypeInstaller.install(JcrNodeTypeInstaller.java:83)
[org.apache.jackrabbit.vault:3.2.1.R1840174]
        at org.apache.jackrabbit.vault.fs.io.Importer.installNodeTypes(Importer.java:518)
[org.apache.jackrabbit.vault:3.2.1.R1840174]
        at org.apache.jackrabbit.vault.fs.io.Importer.run(Importer.java:416) [org.apache.jackrabbit.vault:3.2.1.R1840174]
        at org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage.extract(ZipVaultPackage.java:233)
[org.apache.jackrabbit.vault:3.2.1.R1840174]
        at org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:400)
[org.apache.jackrabbit.vault:3.2.1.R1840174]
        at org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:359)
[org.apache.jackrabbit.vault:3.2.1.R1840174]
        at org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.install(JcrPackageImpl.java:353)
[org.apache.jackrabbit.vault:3.2.1.R1840174]
        at com.day.crx.packmgr.impl.servlets.ServiceServlet.doInstall(ServiceServlet.java:437)
[com.adobe.granite.crx-packagemgr:1.2.68]
        at com.day.crx.packmgr.impl.servlets.ServiceServlet.install(ServiceServlet.java:395)
[com.adobe.granite.crx-packagemgr:1.2.68]
        at com.day.crx.packmgr.impl.servlets.ServiceServlet.doService(ServiceServlet.java:159)
[com.adobe.granite.crx-packagemgr:1.2.68]
        at com.day.crx.packmgr.impl.AbstractServlet.service(AbstractServlet.java:54) [com.adobe.granite.crx-packagemgr:1.2.68]
...
Caused by: javax.jcr.NamespaceException: Unknown namespace prefix: oauth
        at org.apache.jackrabbit.oak.jcr.session.SessionNamespaces.getNamespaceURI(SessionNamespaces.java:132)
[org.apache.jackrabbit.oak-jcr:1.9.8.R1842422]
        at org.apache.jackrabbit.oak.jcr.session.SessionImpl.getNamespaceURI(SessionImpl.java:747)
[org.apache.jackrabbit.oak-jcr:1.9.8.R1842422]
        at org.apache.jackrabbit.spi.commons.namespace.SessionNamespaceResolver.getURI(SessionNamespaceResolver.java:59)
[org.apache.jackrabbit.jackrabbit-spi-commons:2.17.5]
        ... 69 common frames omitted
{noformat}

The other problem which seems to be related to this:

{noformat}
03.10.2018 03:21:43.328 *INFO* [qtp162975365-73] com.day.cq.replication.impl.ReplicatorImpl
Setting up replication with options: ReplicationOptions{synchronous=false, revision='null',
suppressStatusUpdate=false, suppressVersions=false, filter=null, aggregateHandler=null}
03.10.2018 03:21:43.329 *ERROR* [qtp162975365-73] com.day.cq.replication.impl.ReplicatorImpl
Error while evaluating user privileges.
javax.jcr.security.AccessControlException: Cannot resolve privilege name {http://www.day.com/crx/1.0}replicate
    at org.apache.jackrabbit.oak.security.privilege.PrivilegeManagerImpl.getOakName(PrivilegeManagerImpl.java:121)
[org.apache.jackrabbit.oak-core:1.9.8.R1842422]
    at org.apache.jackrabbit.oak.security.privilege.PrivilegeManagerImpl.getPrivilege(PrivilegeManagerImpl.java:67)
[org.apache.jackrabbit.oak-core:1.9.8.R1842422]
    at org.apache.jackrabbit.oak.spi.security.authorization.accesscontrol.AbstractAccessControlManager.privilegeFromName(AbstractAccessControlManager.java:84)
[org.apache.jackrabbit.oak-security-spi:1.9.8.R1842422]
{noformat}

Both problems goes away after reverting this patch. It seems that OAK-7786 fixed the original
issue described here (*Namespace modification not allowed*).

I think we should revert this commit and investigate how to make the "strict" NamespaceEditor
work with the Composite Node Store.


was (Author: tomek.rekawek):
I'm not sure about this approach. It seems that not all the namespaces are regenerated. As
a result, there are nodes with node types having invalid namespaces.

{noformat}
03.10.2018 03:21:58.550 *ERROR* [qtp162975365-1555] org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage
Error during install.
javax.jcr.NamespaceException: internal error: failed to resolve namespace prefix
        at org.apache.jackrabbit.spi.commons.namespace.SessionNamespaceResolver.getURI(SessionNamespaceResolver.java:62)
[org.apache.jackrabbit.jackrabbit-spi-commons:2.17.5]
        at org.apache.jackrabbit.spi.commons.conversion.NameParser.parse(NameParser.java:187)
[org.apache.jackrabbit.jackrabbit-spi-commons:2.17.5]
        at org.apache.jackrabbit.spi.commons.conversion.ParsingNameResolver.getQName(ParsingNameResolver.java:64)
[org.apache.jackrabbit.jackrabbit-spi-commons:2.17.5]
        at org.apache.jackrabbit.spi.commons.conversion.DefaultNamePathResolver.getQName(DefaultNamePathResolver.java:74)
[org.apache.jackrabbit.jackrabbit-spi-commons:2.17.5]
        at org.apache.jackrabbit.vault.fs.spi.impl.jcr20.JcrNodeTypeInstaller.install(JcrNodeTypeInstaller.java:83)
[org.apache.jackrabbit.vault:3.2.1.R1840174]
        at org.apache.jackrabbit.vault.fs.io.Importer.installNodeTypes(Importer.java:518)
[org.apache.jackrabbit.vault:3.2.1.R1840174]
        at org.apache.jackrabbit.vault.fs.io.Importer.run(Importer.java:416) [org.apache.jackrabbit.vault:3.2.1.R1840174]
        at org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage.extract(ZipVaultPackage.java:233)
[org.apache.jackrabbit.vault:3.2.1.R1840174]
        at org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:400)
[org.apache.jackrabbit.vault:3.2.1.R1840174]
        at org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:359)
[org.apache.jackrabbit.vault:3.2.1.R1840174]
        at org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.install(JcrPackageImpl.java:353)
[org.apache.jackrabbit.vault:3.2.1.R1840174]
        at com.day.crx.packmgr.impl.servlets.ServiceServlet.doInstall(ServiceServlet.java:437)
[com.adobe.granite.crx-packagemgr:1.2.68]
        at com.day.crx.packmgr.impl.servlets.ServiceServlet.install(ServiceServlet.java:395)
[com.adobe.granite.crx-packagemgr:1.2.68]
        at com.day.crx.packmgr.impl.servlets.ServiceServlet.doService(ServiceServlet.java:159)
[com.adobe.granite.crx-packagemgr:1.2.68]
        at com.day.crx.packmgr.impl.AbstractServlet.service(AbstractServlet.java:54) [com.adobe.granite.crx-packagemgr:1.2.68]
...
Caused by: javax.jcr.NamespaceException: Unknown namespace prefix: oauth
        at org.apache.jackrabbit.oak.jcr.session.SessionNamespaces.getNamespaceURI(SessionNamespaces.java:132)
[org.apache.jackrabbit.oak-jcr:1.9.8.R1842422]
        at org.apache.jackrabbit.oak.jcr.session.SessionImpl.getNamespaceURI(SessionImpl.java:747)
[org.apache.jackrabbit.oak-jcr:1.9.8.R1842422]
        at org.apache.jackrabbit.spi.commons.namespace.SessionNamespaceResolver.getURI(SessionNamespaceResolver.java:59)
[org.apache.jackrabbit.jackrabbit-spi-commons:2.17.5]
        ... 69 common frames omitted
{noformat}

The other problem which seems to be related to this:

{noformat}
03.10.2018 03:21:43.328 *INFO* [qtp162975365-73] com.day.cq.replication.impl.ReplicatorImpl
Setting up replication with options: ReplicationOptions{synchronous=false, revision='null',
suppressStatusUpdate=false, suppressVersions=false, filter=null, aggregateHandler=null}
03.10.2018 03:21:43.329 *ERROR* [qtp162975365-73] com.day.cq.replication.impl.ReplicatorImpl
Error while evaluating user privileges.
javax.jcr.security.AccessControlException: Cannot resolve privilege name {http://www.day.com/crx/1.0}replicate
    at org.apache.jackrabbit.oak.security.privilege.PrivilegeManagerImpl.getOakName(PrivilegeManagerImpl.java:121)
[org.apache.jackrabbit.oak-core:1.9.8.R1842422]
    at org.apache.jackrabbit.oak.security.privilege.PrivilegeManagerImpl.getPrivilege(PrivilegeManagerImpl.java:67)
[org.apache.jackrabbit.oak-core:1.9.8.R1842422]
    at org.apache.jackrabbit.oak.spi.security.authorization.accesscontrol.AbstractAccessControlManager.privilegeFromName(AbstractAccessControlManager.java:84)
[org.apache.jackrabbit.oak-security-spi:1.9.8.R1842422]
{noformat}

Both problems goes away after reverting this patch. It seems that OAK-7786 fixed the issue
described here (Namespace modification not allowed).

I think we should revert this commit and investigate how to make the "strict" NamespaceEditor
work with the Composite Node Store.

> Ignore copying of namespace index node in InitialContentMigrator
> ----------------------------------------------------------------
>
>                 Key: OAK-7779
>                 URL: https://issues.apache.org/jira/browse/OAK-7779
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core, store-composite
>            Reporter: Amit Jain
>            Assignee: Amit Jain
>            Priority: Blocker
>             Fix For: 1.10, 1.9.9
>
>         Attachments: OAK-7779-v3.patch, OAK-7779.patch, OAK-7779_v2.patch
>
>
> The namespace index node {{/jcr:system/rep:namespaces/rep:nsdata}} copied from a seed
repository for CompositeNodeStore leads to error in the NamespaceEditor.
> This should be ignored as the rep:nsdata should be regenerated.
> {noformat}
> java.lang.RuntimeException: org.apache.jackrabbit.oak.api.CommitFailedException: OakNamespace0005:
Namespace modification not allowed: rep:nsdata
>  at org.apache.jackrabbit.oak.OakInitializer.initialize(OakInitializer.java:50) [org.apache.jackrabbit.oak-core:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.Oak.initialContent(Oak.java:672) [org.apache.jackrabbit.oak-core:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.Oak.createNewContentRepository(Oak.java:715) [org.apache.jackrabbit.oak-core:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.Oak.createContentRepository(Oak.java:660) [org.apache.jackrabbit.oak-core:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.jcr.Jcr.createContentRepository(Jcr.java:376) [org.apache.jackrabbit.oak-jcr:1.10.0.SNAPSHOT]
> .....
> org.apache.sling.jcr.base.AbstractSlingRepositoryManager.initializeAndRegisterRepositoryService(AbstractSlingRepositoryManager.java:471)
[org.apache.sling.jcr.base:3.0.4]
>  at org.apache.sling.jcr.base.AbstractSlingRepositoryManager.access$300(AbstractSlingRepositoryManager.java:85)
[org.apache.sling.jcr.base:3.0.4]
>  at org.apache.sling.jcr.base.AbstractSlingRepositoryManager$4.run(AbstractSlingRepositoryManager.java:455)
[org.apache.sling.jcr.base:3.0.4]
> Caused by: org.apache.jackrabbit.oak.api.CommitFailedException: OakNamespace0005: Namespace
modification not allowed: rep:nsdata
>  at org.apache.jackrabbit.oak.plugins.name.NamespaceEditor.modificationNotAllowed(NamespaceEditor.java:122)
[org.apache.jackrabbit.oak-core:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.plugins.name.NamespaceEditor.childNodeChanged(NamespaceEditor.java:140)
[org.apache.jackrabbit.oak-core:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.spi.commit.CompositeEditor.childNodeChanged(CompositeEditor.java:121)
[org.apache.jackrabbit.oak-store-spi:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:142)
[org.apache.jackrabbit.oak-store-spi:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.compareAgainstBaseState(ModifiedNodeState.java:416)
[org.apache.jackrabbit.oak-store-spi:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147)
[org.apache.jackrabbit.oak-store-spi:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.composite.CompositeNodeState$WrappingDiff.childNodeChanged(CompositeNodeState.java:309)
[org.apache.jackrabbit.oak-store-composite:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.composite.CompositeNodeState$ChildrenDiffFilter.childNodeChanged(CompositeNodeState.java:256)
[org.apache.jackrabbit.oak-store-composite:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.compareAgainstBaseState(ModifiedNodeState.java:416)
[org.apache.jackrabbit.oak-store-spi:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.composite.CompositeNodeState.compareAgainstBaseState(CompositeNodeState.java:163)
[org.apache.jackrabbit.oak-store-composite:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147)
[org.apache.jackrabbit.oak-store-spi:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.composite.CompositeNodeState$WrappingDiff.childNodeChanged(CompositeNodeState.java:309)
[org.apache.jackrabbit.oak-store-composite:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.composite.CompositeNodeState$ChildrenDiffFilter.childNodeChanged(CompositeNodeState.java:256)
[org.apache.jackrabbit.oak-store-composite:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.compareAgainstBaseState(ModifiedNodeState.java:416)
[org.apache.jackrabbit.oak-store-spi:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.plugins.document.ModifiedDocumentNodeState.compareAgainstBaseState(ModifiedDocumentNodeState.java:135)
[org.apache.jackrabbit.oak-store-document:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.composite.CompositeNodeState.compareAgainstBaseState(CompositeNodeState.java:163)
[org.apache.jackrabbit.oak-store-composite:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:51) [org.apache.jackrabbit.oak-store-spi:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.spi.commit.EditorHook.processCommit(EditorHook.java:54)
[org.apache.jackrabbit.oak-store-spi:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:60)
[org.apache.jackrabbit.oak-store-spi:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.composite.CommitHookEnhancer.processCommit(CommitHookEnhancer.java:67)
[org.apache.jackrabbit.oak-store-composite:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch$InMemory.merge(DocumentNodeStoreBranch.java:526)
[org.apache.jackrabbit.oak-store-document:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.merge0(DocumentNodeStoreBranch.java:194)
[org.apache.jackrabbit.oak-store-document:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.merge(DocumentNodeStoreBranch.java:119)
[org.apache.jackrabbit.oak-store-document:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.plugins.document.DocumentRootBuilder.merge(DocumentRootBuilder.java:170)
[org.apache.jackrabbit.oak-store-document:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.merge(DocumentNodeStore.java:1830)
[org.apache.jackrabbit.oak-store-document:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.composite.CompositeNodeStore.merge(CompositeNodeStore.java:155)
[org.apache.jackrabbit.oak-store-composite:1.10.0.SNAPSHOT]
>  at org.apache.jackrabbit.oak.OakInitializer.initialize(OakInitializer.java:48) [org.apache.jackrabbit.oak-core:1.10.0.SNAPSHOT]
>  ... 9 common frames omitted
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message