[
https://issues.apache.org/jira/browse/SLING-9844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17218073#comment-17218073
]
Dan Klco commented on SLING-9844:
---------------------------------
Pull request created:
https://github.com/apache/sling-org-apache-sling-jcr-contentloader/pull/4
> JCR ContentLoader - Import Breaks on Complex Node Structures
> ------------------------------------------------------------
>
> Key: SLING-9844
> URL: https://issues.apache.org/jira/browse/SLING-9844
> Project: Sling
> Issue Type: Bug
> Affects Versions: JCR ContentLoader 2.4.0
> Reporter: Dan Klco
> Assignee: Dan Klco
> Priority: Major
> Fix For: JCR ContentLoader 2.4.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The save in the finishNode method causes issues on complex node types (e.g.
> when child nodes are required). This is exhibited in Oak Index's which fail
> with the following (deceptive) exception:
> {{20.10.2020 21:33:20.958 *ERROR* [Apache Sling Repository Startup Thread #1]
> org.apache.sling.jcr.contentloader.internal.BundleContentLoader Cannot load
> initial content for bundle org.apache.sling.cms.ui : This builder is
> read-only.
> javax.jcr.RepositoryException: This builder is read-only.
> at
> org.apache.sling.jcr.contentloader.internal.BundleContentLoader.createNode(BundleContentLoader.java:503)
> [org.apache.sling.jcr.contentloader:2.4.0.SNAPSHOT]
> at
> org.apache.sling.jcr.contentloader.internal.BundleContentLoader.handleFile(BundleContentLoader.java:427)
> [org.apache.sling.jcr.contentloader:2.4.0.SNAPSHOT]}}
> After tracing through the code, I found this is where it was attempting to
> add the indexRules child node. Also, when you have a required standard child
> node where the operation will fail indicating the missing child node.
> [~jeb] -- Looks like you made the change here, any concerns with removing
> this save? It seems to also save at the path level.
> https://github.com/apache/sling-org-apache-sling-jcr-contentloader/commit/e1509c5c4c73bbade952a118e04cb645c36aa5da
--
This message was sent by Atlassian Jira
(v8.3.4#803005)