javax.jcr.query.InvalidQueryException: Encountered “{“

I was querying the jcr using query builder interface and by mistake supplied the type as NodeType.NT_UNSTRUCTURED in the query builder map. But when i supplied the constant String to QueryBuilder, it fixed the problem. Could not run xpath query javax.jcr.query.InvalidQueryException: Encountered “{” at line 1, column 54.
Was expecting:
<QNameForItemType> …
for statement: for $v in /jcr:root/home/users/consumers//element(*, {}unstructured)[(@userGuid = ‘s3r5E8OLEQ3cMuVqNX’)] return $v
at org.apache.jackrabbit.spi.commons.query.xpath.XPathQueryBuilder.<init>(
at org.apache.jackrabbit.spi.commons.query.xpath.XPathQueryBuilder.createQuery(
at org.apache.jackrabbit.spi.commons.query.xpath.QueryBuilder.createQueryTree(
at org.apache.jackrabbit.spi.commons.query.QueryParser.parse(
at org.apache.jackrabbit.core.query.lucene.QueryImpl.<init>(
at org.apache.jackrabbit.core.query.lucene.SearchIndex.createExecutableQuery(
at org.apache.jackrabbit.core.query.QueryImpl.init(
at org.apache.jackrabbit.core.SearchManager.createQuery(
at org.apache.jackrabbit.core.query.QueryManagerImpl$QueryFactoryImpl$2.createQuery(
at org.apache.jackrabbit.core.query.CompoundQueryFactory.createQuery(
at org.apache.jackrabbit.core.query.QueryManagerImpl$2.perform(


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s