jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Guggisberg" <stefan.guggisb...@gmail.com>
Subject Re: Problem with session.move
Date Wed, 28 Mar 2007 09:52:29 GMT
hi sridhar,

On 3/28/07, Sridhar Raman <sridhar.raman@gmail.com> wrote:
> I am using session.move() for renaming nodes.  This is the problem I face.
> I have a node at this path: /CONTENT/ENTITIES/ABC [1]
> Note: The [1] is not the index of the node, but the actual node name.  That
> is, I escape the box brackets and import the XML file, and the node gets
> created.  The node name in the XML file would be this -
> ABC_x0020__x005B_1_x005D_
> Now, I want to move this node from its existing path to a new path:
> How do I do it?
> If I give the escaped node name in the session.move parameters, I get a
> PathNotFound exception.  If I give the path as it is, I get an
> "/CONTENT/ENTITIES/ABC [1]: invalid path " exception.

the xml element ABC_x0020__x005B_1_x005D_ got imported as
"ABC [1]" which is an illegal name and therefore a bug.

i created a jira issue:

> What is the solution to this?

if possible try to avoid using characters that lead to illegal jcr names.
square brackets are reserved in jcr as they're used for the index notation.
for more details please refer to "4.6 Path Syntax" in the jsr 170 specification.


> Thanks in advance,
> Sridhar

View raw message