You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Ivan Vasiliev (JIRA)" <ji...@apache.org> on 2012/10/15 14:48:05 UTC

[jira] [Commented] (CMIS-588) Xpath query errors

    [ https://issues.apache.org/jira/browse/CMIS-588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13476114#comment-13476114 ] 

Ivan Vasiliev commented on CMIS-588:
------------------------------------

It looks like an issue only for modeshape implementation. The modeshape doesn't support more than two criteria within the xpath query. Anyway the xpath searching is deprecated for JCR 2.0 and the issue can be marked somehow as ignored. 
Inside org.modeshape.jcr.xpath.XPathParser#parseExpr(..) you can see unsupported exception.

Original JCR statement: 
{quote}
SELECT cmis:baseTypeId,cmis:creationDate,cmis:name,cmis:objectId,cmis:objectTypeId FROM cmis:document WHERE cmis:name LIKE 'a%' ORDER BY cmis:creationDate
{quote}

Converted statement to xpath format: 
{quote}
/jcr:root//element(*,nt:file)[(@jcr:mixinTypes = 'mix:simpleVersionable') and jcr:like(fn:name(), 'a%')]order by jcr:content/@jcr:created ascending
{quote}

                
> Xpath query errors
> ------------------
>
>                 Key: CMIS-588
>                 URL: https://issues.apache.org/jira/browse/CMIS-588
>             Project: Chemistry
>          Issue Type: Sub-task
>          Components: opencmis-server-jcr
>    Affects Versions: OpenCMIS 0.9.0
>            Reporter: Ivan Vasiliev
>
> FAILURE: The query should return exactly one result but returned 0! (QueryRootFolderTest.java:89)
>     INFO: expected: 1 / actual: 0
> FAILURE: The query should return the root folder but does not! (QueryRootFolderTest.java:134)
> {code}
> UNEXPECTED_EXCEPTION: Exception: org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: 
> The xpath query 
> "/jcr:root//element(*,nt:file)[(@jcr:mixinTypes = 'mix:simpleVersionable') 
> and jcr:like(fn:name(), 'a%')]order by jcr:content/@jcr:created ascending" 
> is not well-formed: Multiple XPath expressions are not supported (AbstractSessionTest.java:153)
> {code} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira