Also according to 
https://github.com/apache/jackrabbit/blob/b23d6734381e49f236c3705820126803555608b5/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Name.java#L39
 the default namespace URI is the empty one!

> On 11. Feb 2020, at 11:43, Konrad Windszus <konra...@gmx.de> wrote:
> 
> But I am generating this expanded form via 
> DefaultNamePathResolver.getQName("newnode")
> 
> This returns a org.apache.jackrabbit.spi.Name, whose toString() returns 
> "{}newnode".
> Is the Name being returned by getQName then being wrong?
> 
>> On 11. Feb 2020, at 10:10, Julian Reschke <julian.resc...@gmx.de> wrote:
>> 
>> On 11.02.2020 10:01, Konrad Windszus wrote:
>>> Thanks for the quick response.
>>> Indeed there seems to be an issue in Oak:
>>> After creating a node with its expanded form with system view format import 
>>> below the root node I try to call
>>> node = rootNode.getNode("{}newnode");
>>> 
>>> which throws
>>> javax.jcr.PathNotFoundException: newnode
>>>     at 
>>> org.apache.jackrabbit.oak.jcr.session.NodeImpl$7.perform(NodeImpl.java:558)
>>>     at 
>>> org.apache.jackrabbit.oak.jcr.session.NodeImpl$7.perform(NodeImpl.java:552)
>>>     at 
>>> org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.perform(SessionDelegate.java:207)
>>>     at 
>>> org.apache.jackrabbit.oak.jcr.session.ItemImpl.perform(ItemImpl.java:112)
>>>     at 
>>> org.apache.jackrabbit.oak.jcr.session.NodeImpl.getNode(NodeImpl.java:552)
>>> 
>>> The same works fine in Jackrabbit 2.x
>>> ...
>> 
>> That actually looks like a bug in Jackrabbit, not Oak. See
>> <https://docs.adobe.com/docs/en/spec/jcr/2.0/3_Repository_Model.html#3.2.5.1%20Expanded%20Form>:
>> 
>>> ExpandedName ::= '{' Namespace '}' LocalName
>> 
>> The empty string is not a valid Namespace, so this parses as qualified
>> name instead.
>> 
>> Best regards, Julian
> 

Reply via email to