Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.4
-
None
-
Mac OSX 10.6.8, possibly others
Description
Running an XPath query against a path with "as" in it, such as:
/jcr:root/content/dam/imp/campaigns/IN/as/global/hotmail_for_skydrive//*[jcr:content/@sling:resourceType = 'imp/components/offermapping']
The "IN/as" is a locale that we built into our node path.
The error we get is :
16.07.2012 16:51:18.249 WARN [127.0.0.1 [1342482674243] POST /bin/imp/campaignPermissions HTTP/1.1] com.day.cq.search.impl.builder.QueryImpl Could not run xpath query javax.jcr.query.InvalidQueryException: Encountered "as" at line 1, column 50.
Was expecting one of:
<IntegerLiteral> ...
<DecimalLiteral> ...
<DoubleLiteral> ...
<StringLiteral> ...
"<?" ...
"<?" ...
<AxisChild> ...
<AxisDescendant> ...
<AxisParent> ...
<AxisAttribute> ...
<AxisSelf> ...
<AxisDescendantOrSelf> ...
<AxisAncestor> ...
<AxisFollowingSibling> ...
<AxisPrecedingSibling> ...
<AxisFollowing> ...
<AxisPreceding> ...
<AxisAncestorOrSelf> ...
"$" ...
<ElementType> ...
<AttributeType> ...
<SchemaElementType> ...
<SchemaAttributeType> ...
<OrderedOpen> ...
<UnorderedOpen> ...
<ElementQNameLbrace> ...
<AttributeQNameLbrace> ...
<PINCNameLbrace> ...
<PILbrace> ...
<CommentLbrace> ...
<ElementLbrace> ...
<AttributeLbrace> ...
<TextLbrace> ...
"*" ...
<NCNameColonStar> ...
<StarColonNCName> ...
"(" ...
"@" ...
<DocumentLpar> ...
<DocumentLparForKindTest> ...
<DocumentLbrace> ...
<NodeLpar> ...
<CommentLpar> ...
<TextLpar> ...
<ProcessingInstructionLpar> ...
<ElementTypeForKindTest> ...
<ElementTypeForDocumentTest> ...
<AttributeTypeForKindTest> ...
<SchemaElementTypeForKindTest> ...
<SchemaElementTypeForDocumentTest> ...
<SchemaAttributeTypeForKindTest> ...
<ProcessingInstructionLparForKindTest> ...
<TextLparForKindTest> ...
<CommentLparForKindTest> ...
<NodeLparForKindTest> ...
"." ...
".." ...
<QNameLpar> ...
"<" ...
"<" ...
"<!--" ...
"<!--" ...
<QName> ...
for statement: for $v in /jcr:root/content/dam/imp/campaigns/IN/as/global/hotmail_for_skydrive//*[jcr:content/@sling:resourceType = 'imp/components/offermapping'] return $v
at org.apache.jackrabbit.spi.commons.query.xpath.XPathQueryBuilder.<init>(XPathQueryBuilder.java:299)
at org.apache.jackrabbit.spi.commons.query.xpath.XPathQueryBuilder.createQuery(XPathQueryBuilder.java:331)
at org.apache.jackrabbit.spi.commons.query.xpath.QueryBuilder.createQueryTree(QueryBuilder.java:39)
at org.apache.jackrabbit.spi.commons.query.QueryParser.parse(QueryParser.java:57)
at org.apache.jackrabbit.core.query.lucene.QueryImpl.<init>(QueryImpl.java:91)
at org.apache.jackrabbit.core.query.lucene.SearchIndex.createExecutableQuery(SearchIndex.java:712)
at org.apache.jackrabbit.core.query.QueryImpl.init(QueryImpl.java:115)
at org.apache.jackrabbit.core.SearchManager.createQuery(SearchManager.java:243)
at org.apache.jackrabbit.core.query.QueryManagerImpl$QueryFactoryImpl$2.createQuery(QueryManagerImpl.java:222)
at org.apache.jackrabbit.core.query.CompoundQueryFactory.createQuery(CompoundQueryFactory.java:67)
at org.apache.jackrabbit.core.query.QueryManagerImpl$2.perform(QueryManagerImpl.java:95)
at org.apache.jackrabbit.core.query.QueryManagerImpl$2.perform(QueryManagerImpl.java:91)
at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216)
at org.apache.jackrabbit.core.query.QueryManagerImpl.perform(QueryManagerImpl.java:197)
at org.apache.jackrabbit.core.query.QueryManagerImpl.createQuery(QueryManagerImpl.java:91)