1
votes

Is the following path a valid JCR path :

a/b /c

'coz when performing a lookup :

Node.getNode( "a/b /c")

I receive the exception :

Trailing slashes not allowed in prefixes and names.

Looking at the code of Jackrabbit, this is the trailing space after the 'b' that cause this exception. I thought trailing space was allowed in a node name as I could saved it.

PS : I'm using Jackrabbit 2.2.9

2

2 Answers

1
votes

You should try to escape the space:

Node.getNode( "a/b%20/c") 

More information can be found here http://wiki.apache.org/jackrabbit/EncodingAndEscaping

0
votes

Try:

Node n = ...
n.getNode("a").getNode("b ").getNode("c");