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

Fix random failure on invalid query in ITSearchTabTest.testSearch




      Seen in the context of DAM tests at https://qa.nuxeo.org/jenkins/job/master/job/addons_FT_nuxeo-dam-master/org.nuxeo.marketplace.dam$webdriver/643/testReport/junit/org.nuxeo.ftest.cap/ITSearchTabTest(dam)/testSearch/

      Unexpected modal dialog (text: Error while querying data from server: error): Error while querying data from server: error
      Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 17:00:58'
      System info: host: 'b1fe94115fbe', ip: '', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-24-generic', java.version: '1.8.0_77'
      Driver info: org.openqa.selenium.firefox.FirefoxDriver
      Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=42.0, platform=LINUX, nativeEvents=false, acceptSslCerts=true, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
      Session ID: 28a503bd-cd35-48b2-a4e1-199700c5edfb

      This error is triggered by a suggestion widget in the search form and produces the following stack trace server side:

      Caused by: org.nuxeo.ecm.automation.OperationException: Failed to execute query: SELECT * FROM Document WHERE dc:title ILIKE 'jdoe%' AND ecm:mixinType = 'Collection' AND (ecm:primaryType != 'Favorites' OR (ecm:primaryType = 'Favorites' AND dc:creator = 'ORDER BY dc:title, Syntax error: Invalid token <null> at offset -1

      This looks like a bad replacement of '?' characters in the query produced by the following page provider:

          <coreQueryPageProvider name="default_collection">
            <property name="maxResults">PAGE_SIZE</property>
            <pattern quoteParameters="false" escapeParameters="true">
              SELECT * FROM Document WHERE dc:title ILIKE '?%' AND ecm:mixinType = 'Collection' AND
              (ecm:primaryType != 'Favorites' OR (ecm:primaryType = 'Favorites' AND dc:creator = '?')) AND
              ecm:isProxy = 0 AND ecm:mixinType != 'HiddenInNavigation' AND
              ecm:isCheckedInVersion = 0 AND ecm:currentLifeCycleState != 'deleted'
            <sort column="dc:title" ascending="true" />

      (in https://github.com/nuxeo/nuxeo/blob/master/nuxeo-features/nuxeo-platform-collections/nuxeo-platform-collections-core/src/main/resources/OSGI-INF/collection-pageprovider-contrib.xml)

      Strange thing is that seems to happen randomly...


          Issue Links



              • Votes:
                0 Vote for this issue
                3 Start watching this issue


                • Created: