Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-17512

Fix CMIS query with CONTAINS qualifier

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.0-HF16, 7.4
    • Component/s: CMIS

      Description

      The following CMIS query fails when executed in CMISQL -> SQL mode:

      SELECT f.* FROM File f WHERE CONTAINS(f, 'title1')
      
      org.nuxeo.ecm.core.api.NuxeoException: Invalid query: CMISQL: SELECT f.* FROM File f WHERE CONTAINS(f, 'title1')
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapper.queryAndFetch(JDBCMapper.java:862)
      	at org.nuxeo.ecm.core.storage.sql.SoftRefCachingMapper.queryAndFetch(SoftRefCachingMapper.java:93)
      	at org.nuxeo.ecm.core.storage.sql.SessionImpl.queryAndFetch(SessionImpl.java:1188)
      	at org.nuxeo.ecm.core.storage.sql.ra.ConnectionImpl.queryAndFetch(ConnectionImpl.java:330)
      	at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.queryAndFetch(SQLSession.java:455)
      	at org.nuxeo.ecm.core.api.AbstractSession.queryAndFetch(AbstractSession.java:1185)
      	at org.nuxeo.ecm.core.opencmis.impl.server.NuxeoCmisService.queryAndFetch(NuxeoCmisService.java:1500)
      	at org.nuxeo.ecm.core.opencmis.impl.server.NuxeoCmisService.query(NuxeoCmisService.java:1429)
      	at org.apache.chemistry.opencmis.server.support.wrapper.ConformanceCmisServiceWrapper.query(ConformanceCmisServiceWrapper.java:1142)
      	at org.nuxeo.ecm.core.opencmis.impl.TestCmisBinding.query(TestCmisBinding.java:240)
      	at org.nuxeo.ecm.core.opencmis.impl.TestCmisBinding.testQueryContainsQualifier(TestCmisBinding.java:2158)
      Caused by: org.postgresql.util.PSQLException: ERROR: missing FROM-clause entry for table "_f_hierarchy"
        Position: 1352
      	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
      	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
      	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
      	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
      	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
      	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:302)
      	at org.nuxeo.ecm.core.storage.sql.jdbc.ResultSetQueryResult.<init>(ResultSetQueryResult.java:69)
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapper.queryAndFetch(JDBCMapper.java:859)
      	... 48 more
      

      Note that the query without qualifier works:

      SELECT * FROM File WHERE CONTAINS('title1')
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: