2 Replies Latest reply on Nov 25, 2014 8:53 AM by Vitali Belenki

    A literal is not supported in the primary path expression; therefore '1' is not valid

    Vitali Belenki Newbie

      Dear Modeshape community team,

       

      we figured out following error by using of CMIS queries with Modeshape:

       

      - Create a folder with a literal as name (e.g.: '1')

      - Create sub-folder in this folder (e.g.: 'subfolder')

      - Create a document in this subfolder

      - Execute following CMiS query to search for the document

      SELECT * FROM cmis:document WHERE IN_FOLDER (<OBJECT ID OF THE SUB FOLDER>)

       

      As result following exception is thrown:

      The xpath query &quot;/jcr:root/1/subfolder/element(*,nt:file)[(@jcr:mixinTypes = 'mix:simpleVersionable')]&quot; has one or more errors: A literal is not supported in the primary path expression; therefore '1' is not valid

       

      The problem is, that I don't even have a chance to escape something, as the path is generated by Modeshape api (I just provide the object id of the sub folder).

       

      Should I create JIRA ticket for this issue?

       

      Best regards

      Vitali