Description
The query
/jcr:root/home/users/1//element(*,rep:User)
fails with the following error:
Caused by: javax.jcr.query.InvalidQueryException: Parse error: data is not a RelationQueryNode at org.apache.jackrabbit.spi.commons.query.xpath.XPathQueryBuilder.visit(XPathQueryBuilder.java:517) at org.apache.jackrabbit.spi.commons.query.xpath.SimpleNode.jjtAccept(SimpleNode.java:81) at org.apache.jackrabbit.spi.commons.query.xpath.SimpleNode.childrenAccept(SimpleNode.java:90) at org.apache.jackrabbit.spi.commons.query.xpath.XPathQueryBuilder.visit(XPathQueryBuilder.java:575) at org.apache.jackrabbit.spi.commons.query.xpath.SimpleNode.jjtAccept(SimpleNode.java:81) at org.apache.jackrabbit.spi.commons.query.xpath.SimpleNode.childrenAccept(SimpleNode.java:90) at org.apache.jackrabbit.spi.commons.query.xpath.XPathQueryBuilder.visit(XPathQueryBuilder.java:575)
If you change the node "1" to "1a", the error is even more obscure:
Encountered "//" at line 1, column 34. Was expecting one of: ... ... ... ... " ... ... ... ... ... ... ... ... ... ... ... ... "$" ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... "*" ... ... ... "(" ... "@" ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... "." ... ".." ... ... "<" ... "<" ... "
Everything works fine if the node starts with a letter, for example "a1".