I did actually convert the content using oak-run. We don't actually
need SNS support, we only need to migrate existing content, and it
would be preferable if oak-run uses a pattern for renaming them that
allows later editing of said nodes.

On 8 August 2014 17:59, Michael Dürig <[email protected]> wrote:
>
>
> On 5.8.14 12:56 , Torgeir Veimo wrote:
>>
>> Two questions: Is there any technical reason jcr clients can't use the
>> name[index] name pattern, similar to oak internal?
>
>
> The only reason I see is that there didn't seem to be much of a need so far.
> That's probably also why OAK-203 is still open.
>
>
>>
>> When importing content from jackrabbit which contains content with
>> SNS, what't the recommended approach to edit such nodes? Now I'm
>> getting exceptions like
>
>
> How do you import that content? It is recommended to go through the upgrade
> functionality of oak-run. See
> https://github.com/apache/jackrabbit-oak/tree/trunk/oak-run.
>
> Michael
>
>
>>
>> 20:38:35,833 ERROR services.RepositoryAdminService.addProperty() -
>> line 331 [127.0.0.1] - unable to add property;
>> javax.jcr.PathNotFoundException: /nen:content[2]
>> at
>> org.apache.jackrabbit.oak.jcr.session.SessionContext.getOakPathOrThrowNotFound(SessionContext.java:358)
>> at
>> org.apache.jackrabbit.oak.jcr.version.VersionManagerImpl.getOakPathOrThrowNotFound(VersionManagerImpl.java:248)
>> at
>> org.apache.jackrabbit.oak.jcr.version.VersionManagerImpl.access$000(VersionManagerImpl.java:53)
>>
>> Is it expected that all content imported from jackrabbit is to fixup
>> all existing node names to avoid SNS and avoid using the name[index]
>> name pattern, before such content can be modified in oak?
>>
>>
>>
>> On 5 August 2014 17:13, Michael Dürig <[email protected]> wrote:
>>>
>>>
>>>
>>> On 5.8.14 2:56 , Torgeir Veimo wrote:
>>>>
>>>>
>>>> So since that issue is unresolved, I assume I have to add the index
>>>> manually. If I then use a naming scheme like name[index], I get an
>>>> exception;
>>>>
>>>> javax.jcr.RepositoryException: Cannot create a new node using a name
>>>> including an index
>>>
>>>
>>>
>>> AFAIR you currently can't do that through the JCR API with Oak. This is
>>> only
>>> supported on Oak's internal interfaces: "the underlying oak-core and
>>> microkernel -level SNS nodes simply used the "name[index]" naming pattern
>>> with no extra semantics associated with it." [1]. We added this so Oak
>>> can
>>> cope with e.g. node type definitions, which make use of SNSs.
>>>
>>> Michael
>>>
>>> [1] https://issues.apache.org/jira/browse/OAK-203
>>
>>
>>
>>
>



-- 
-Tor

Reply via email to