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

Improve Oracle error message when "wildcard query expansion resulted in too many terms"

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Detail
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Postponed
    • Environment:
      oracle

      Description

      When Oracle fulltext is used with a query like ecm:fulltext LIKE 'foo*' and the foo* part has too many indexed candidates, Oracle fails with the following message. We should improve error reporting in that case.

      2018-04-16 09:10:11,382 WARN  [http-apr-0.0.0.0-8444-exec-8] [org.nuxeo.ecm.platform.query.nxql.CoreQueryDocumentPageProvider] Invalid query: SELECT * FROM Document WHERE ecm:primaryType = 'OGI__RES_TYP-Policy' AND ecm:fulltext LIKE 'WING SANG PO*' AND ecm:mixinType != 'HiddenInNavigation' AND ecm:currentLifeCycleState != 'deleted' ORDER BY dc:title
      org.nuxeo.ecm.core.api.NuxeoException: Invalid query: SELECT * FROM Document WHERE ecm:primaryType = 'OGI__RES_TYP-Policy' AND ecm:fulltext LIKE 'WING SANG PO*' AND ecm:mixinType != 'HiddenInNavigation' AND ecm:currentLifeCycleState != 'deleted' ORDER BY dc:title
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapper.queryProjection(JDBCMapper.java:916)
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapper.query(JDBCMapper.java:761)
      	at sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.doInvoke(JDBCMapperConnector.java:111)
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.lambda$doConnectAndInvoke$0(JDBCMapperConnector.java:98)
      	at org.nuxeo.runtime.transaction.TransactionHelper.runInTransaction(TransactionHelper.java:559)
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.doConnectAndInvoke(JDBCMapperConnector.java:95)
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.invoke(JDBCMapperConnector.java:84)
      	at com.sun.proxy.$Proxy51.query(Unknown Source)
      	at org.nuxeo.ecm.core.storage.sql.SoftRefCachingMapper.query(SoftRefCachingMapper.java:104)
      	at org.nuxeo.ecm.core.storage.sql.SessionImpl.query(SessionImpl.java:1263)
      	at org.nuxeo.ecm.core.storage.sql.ra.ConnectionImpl.query(ConnectionImpl.java:335)
      	at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.query(SQLSession.java:404)
      	at org.nuxeo.ecm.core.api.AbstractSession.query(AbstractSession.java:1204)
      	at org.nuxeo.ecm.core.api.AbstractSession.query(AbstractSession.java:1137)
      	at org.nuxeo.ecm.core.api.AbstractSession.query(AbstractSession.java:1130)
      	at org.nuxeo.ecm.platform.query.nxql.CoreQueryDocumentPageProvider.getCurrentPage(CoreQueryDocumentPageProvider.java:159)
      	at org.nuxeo.ecm.automation.core.util.PaginablePageProvider.<init>(PaginablePageProvider.java:43)
      	at org.nuxeo.ecm.automation.jaxrs.io.documents.PaginableDocumentModelListImpl.<init>(PaginableDocumentModelListImpl.java:49)
      	at org.nuxeo.ecm.automation.core.operations.services.DocumentPageProviderOperation.run(DocumentPageProviderOperation.java:283)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.nuxeo.ecm.automation.core.impl.InvokableMethod.doInvoke(InvokableMethod.java:164)
      	at org.nuxeo.ecm.automation.core.impl.InvokableMethod.invoke(InvokableMethod.java:177)
      	at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.doInvoke(CompiledChainImpl.java:130)
      	at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.invoke(CompiledChainImpl.java:116)
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:214)
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:110)
      	at org.nuxeo.ecm.automation.seam.operations.RunOperationInSeam.runChain(RunOperationInSeam.java:88)
      	at org.nuxeo.ecm.automation.seam.operations.RunOperationInSeam.run(RunOperationInSeam.java:72)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.nuxeo.ecm.automation.core.impl.InvokableMethod.doInvoke(InvokableMethod.java:164)
      	at org.nuxeo.ecm.automation.core.impl.InvokableMethod.invoke(InvokableMethod.java:177)
      	at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.doInvoke(CompiledChainImpl.java:130)
      	at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.invoke(CompiledChainImpl.java:116)
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:214)
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:121)
      	at org.nuxeo.ecm.automation.server.jaxrs.OperationResource.execute(OperationResource.java:58)
      	at org.nuxeo.ecm.automation.server.jaxrs.ExecutableResource.doPost(ExecutableResource.java:68)
      Caused by: java.sql.SQLException: ORA-29902: error in executing ODCIIndexStart() routine
      ORA-20000: Oracle Text error:
      DRG-51030: wildcard query expansion resulted in too many terms
      	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450)
      	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)
      	at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1059)
      	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:522)
      	at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:257)
      	at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:587)
      	at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:225)
      	at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:53)
      	at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:774)
      	at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:925)
      	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1111)
      	at oracle.jdbc.driver.OracleStatement.doScrollExecuteCommon(OracleStatement.java:5179)
      	at oracle.jdbc.driver.OraclePreparedStatement.doScrollPstmtExecuteUpdate(OraclePreparedStatement.java:12485)
      	at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:4793)
      	at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:4845)
      	at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1501)
      	at org.tranql.connector.jdbc.PreparedStatementHandle.executeQuery(PreparedStatementHandle.java:52)
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapper.queryProjection(JDBCMapper.java:864)
      	... 135 more
      

        Attachments

          Activity

            People

            • Assignee:
              fguillaume Florent Guillaume
              Reporter:
              fguillaume Florent Guillaume
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: