You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Torgeir Veimo <to...@pobox.com> on 2007/04/25 18:15:22 UTC
malformedpathexception
Upgraded to jackrabbit 1.3, and I can no longer do
Item item = session.getItem("/nen:content/pages/news/" );
which results in
org.apache.jackrabbit.name.MalformedPathException: Empty path
element: /nen:content/pages/news/
Is there a new limitation that a node path cannot end in / anymore?
--
Torgeir Veimo
torgeir@pobox.com
Re: malformedpathexception
Posted by Torgeir Veimo <to...@pobox.com>.
On 25 Apr 2007, at 17:23, Stefan Guggisberg wrote:
> On 4/25/07, Torgeir Veimo <to...@pobox.com> wrote:
>> Upgraded to jackrabbit 1.3, and I can no longer do
>>
>> Item item = session.getItem("/nen:content/pages/news/" );
>>
>> which results in
>>
>> org.apache.jackrabbit.name.MalformedPathException: Empty path
>> element: /nen:content/pages/news/
>>
>> Is there a new limitation that a node path cannot end in / anymore?
>
> afaik trailing slashes are illegal according to the spec (4.6 Path
> Syntax):
>
> path ::= abspath | relpath
> abspath ::= '/' relpath | '/'
> relpath ::= pathelement | relpath '/' pathelement
> pathelement ::= name | name '[' number ']' | '..' | '.'
>
>
> so if you were able to pass something like "/foo/bar/" in a previous
> release i'd argue that this was due to a bug in the path parser.
> however
> i am not aware of recent changes in the Path implemention.
Ok, that's fine, I can see the logic. I only have to more carefully
preprocess the urls that are coming in.
--
Torgeir Veimo
torgeir@pobox.com
Re: malformedpathexception
Posted by Stefan Guggisberg <st...@gmail.com>.
On 4/25/07, Torgeir Veimo <to...@pobox.com> wrote:
> Upgraded to jackrabbit 1.3, and I can no longer do
>
> Item item = session.getItem("/nen:content/pages/news/" );
>
> which results in
>
> org.apache.jackrabbit.name.MalformedPathException: Empty path
> element: /nen:content/pages/news/
>
> Is there a new limitation that a node path cannot end in / anymore?
afaik trailing slashes are illegal according to the spec (4.6 Path Syntax):
path ::= abspath | relpath
abspath ::= '/' relpath | '/'
relpath ::= pathelement | relpath '/' pathelement
pathelement ::= name | name '[' number ']' | '..' | '.'
so if you were able to pass something like "/foo/bar/" in a previous
release i'd argue that this was due to a bug in the path parser. however
i am not aware of recent changes in the Path implemention.
cheers
stefan
>
> --
> Torgeir Veimo
> torgeir@pobox.com
>
>
>
>