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] [Commented] (OAK-3846) Add parameter to skip SNS nodes
Date Thu, 14 Jan 2016 09:46:40 GMT

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

Tomek Rękawek commented on OAK-3846:
------------------------------------

[~tuerkben], SNS are generally supported by the Oak, so I'm not sure whether we should allow
to skip it during migration, especially that sometimes they are required for the repository
to work correctly (eg. in the {{/jcr:system/jcr:nodeTypes}}). In this particular case the
content doesn't match the JCR nodetype schema and that's the reason of failure, as [~kwin]
noticed.

What I can suggest is an extra CommitHook in the oak-upgrade that checks if there's a SNS
node under a parent that doesn't allow it - if so, the node will be renamed. WDYT?

> Add parameter to skip SNS nodes
> -------------------------------
>
>                 Key: OAK-3846
>                 URL: https://issues.apache.org/jira/browse/OAK-3846
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: upgrade
>    Affects Versions: 1.3.13
>            Reporter: Ilyas Türkben
>
> Add a parameter to skip migration of SNS nodes.
> Currently SNS nodes break the upgrade process with an error similar to the following:
> {code:java}
> 31.08.2015 13:18:56.121 *ERROR* [FelixFrameworkWiring] org.apache.sling.jcr.base.internal.loader.Loader
Error loading node types SLING-INF/nodetypes/folder.cnd from bundle org.apache.sling.jcr.resource:
{}
> javax.jcr.nodetype.ConstraintViolationException: Failed to register node types.
> 	at org.apache.jackrabbit.oak.api.CommitFailedException.asRepositoryException(CommitFailedException.java:225)
> 	at org.apache.jackrabbit.oak.plugins.nodetype.write.ReadWriteNodeTypeManager.registerNodeTypes(ReadWriteNodeTypeManager.java:156)
> 	at org.apache.jackrabbit.commons.cnd.CndImporter.registerNodeTypes(CndImporter.java:162)
> 	at org.apache.sling.jcr.base.NodeTypeLoader.registerNodeType(NodeTypeLoader.java:124)
> 	at org.apache.sling.jcr.base.internal.loader.Loader.registerNodeTypes(Loader.java:296)
> 	at org.apache.sling.jcr.base.internal.loader.Loader.registerBundleInternal(Loader.java:237)
> 	at org.apache.sling.jcr.base.internal.loader.Loader.registerBundle(Loader.java:166)
> 	at org.apache.sling.jcr.base.internal.loader.Loader.<init>(Loader.java:78)
> 	at org.apache.sling.jcr.base.NamespaceMappingSupport.setup(NamespaceMappingSupport.java:81)
> 	at org.apache.sling.jcr.base.AbstractSlingRepositoryManager.start(AbstractSlingRepositoryManager.java:313)
> 	at com.adobe.granite.repository.impl.SlingRepositoryManager.activate(SlingRepositoryManager.java:267)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:497)
> 	at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
> 	at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
> 	at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)
> 	at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)
> 	at org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:295)
> 	at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:302)
> 	at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:113)
> 	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:832)
> 	at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:799)
> 	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:724)
> 	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:927)
> 	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:891)
> 	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1492)
> 	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1413)
> 	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:1222)
> 	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:1158)
> 	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1444)
> 	at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:987)
> 	at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
> 	at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
> 	at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4547)
> 	at org.apache.felix.framework.Felix.registerService(Felix.java:3521)
> 	at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348)
> 	at org.apache.sling.commons.threads.impl.Activator.start(Activator.java:55)
> 	at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
> 	at org.apache.felix.framework.Felix.activateBundle(Felix.java:2223)
> 	at org.apache.felix.framework.Felix.startBundle(Felix.java:2141)
> 	at org.apache.felix.framework.Felix$RefreshHelper.restart(Felix.java:5051)
> 	at org.apache.felix.framework.Felix.refreshPackages(Felix.java:4243)
> 	at org.apache.felix.framework.FrameworkWiringImpl.run(FrameworkWiringImpl.java:188)
> 	at java.lang.Thread.run(Thread.java:745)
> Caused by: org.apache.jackrabbit.oak.api.CommitFailedException: OakConstraint0001: /var/audit/com.day.cq.wcm.core.page/content/dam/mc_test_mw/Bilder[[sling:Folder]]:
No matching definition found for child node Social Media Icons[2] with effective type [sling:Folder]
> 	at org.apache.jackrabbit.oak.plugins.nodetype.TypeEditor.constraintViolation(TypeEditor.java:150)
> 	at org.apache.jackrabbit.oak.plugins.nodetype.TypeEditor.childNodeChanged(TypeEditor.java:259)
> 	at org.apache.jackrabbit.oak.plugins.nodetype.TypeEditor.childNodeAdded(TypeEditor.java:210)
> 	at org.apache.jackrabbit.oak.spi.commit.VisibleEditor.childNodeAdded(VisibleEditor.java:93)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.java:116)
> 	at org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstEmptyState(EmptyNodeState.java:161)
> 	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:434)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.java:125)
> 	at org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstEmptyState(EmptyNodeState.java:161)
> 	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:434)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.java:125)
> 	at org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstEmptyState(EmptyNodeState.java:161)
> 	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:434)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.java:125)
> 	at org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstEmptyState(EmptyNodeState.java:161)
> 	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:434)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.java:125)
> 	at org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstEmptyState(EmptyNodeState.java:161)
> 	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:434)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.java:125)
> 	at org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstEmptyState(EmptyNodeState.java:161)
> 	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:434)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.java:125)
> 	at org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstEmptyState(EmptyNodeState.java:161)
> 	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:434)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.java:125)
> 	at org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstEmptyState(EmptyNodeState.java:161)
> 	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:434)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:52)
> 	at org.apache.jackrabbit.oak.plugins.nodetype.TypeEditorProvider.getRootEditor(TypeEditorProvider.java:101)
> 	at org.apache.jackrabbit.oak.spi.commit.CompositeEditorProvider.getRootEditor(CompositeEditorProvider.java:80)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorHook.processCommit(EditorHook.java:53)
> 	at org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:61)
> 	at org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:61)
> 	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore$Commit.prepare(SegmentNodeStore.java:397)
> 	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore$Commit.optimisticMerge(SegmentNodeStore.java:428)
> 	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore$Commit.execute(SegmentNodeStore.java:484)
> 	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore.merge(SegmentNodeStore.java:162)
> 	at org.apache.jackrabbit.oak.spi.state.ProxyNodeStore.merge(ProxyNodeStore.java:43)
> 	at org.apache.jackrabbit.oak.core.MutableRoot.commit(MutableRoot.java:247)
> 	at org.apache.jackrabbit.oak.core.MutableRoot.commit(MutableRoot.java:258)
> 	at org.apache.jackrabbit.oak.plugins.nodetype.write.ReadWriteNodeTypeManager.registerNodeTypes(ReadWriteNodeTypeManager.java:145)
> 	... 44 common frames omitted
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message