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

Elasticsearch fail to index document when fulltext is disable

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.8.0-HF18, 5.9.4
    • Fix Version/s: 5.8.0-HF19, 5.9.5
    • Component/s: Elasticsearch
    • Tags:
    • Sprint:
      Sprint RepoTeam 5.9.5-1

      Description

      When the repository is configured with fulltext disabled="true" the elasticsearch fail to index document because it try to extract the binaryFulltext field and create an invalid SQL query

       
      15:35:21,270 ERROR [AbstractWork] Exception during work: IndexingWorker(, Progress(?%, ?/0), null) 
      org.nuxeo.ecm.core.api.ClientException: Unable to create index request for Document ddbd0eb4-69d9-448a-8fd4-d7030a584b32 
      at org.nuxeo.elasticsearch.ElasticSearchComponent.buildEsIndexingRequest(ElasticSearchComponent.java:446) 
      at org.nuxeo.elasticsearch.ElasticSearchComponent.processIndexCommand(ElasticSearchComponent.java:347) 
      at org.nuxeo.elasticsearch.ElasticSearchComponent.indexNow(ElasticSearchComponent.java:334) 
      at org.nuxeo.elasticsearch.work.IndexingWorker.doIndexingWork(IndexingWorker.java:66) 
      at org.nuxeo.elasticsearch.work.AbstractIndexingWorker.work(AbstractIndexingWorker.java:65) 
      at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:66) 
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
      at java.lang.Thread.run(Thread.java:744) 
      Caused by: org.nuxeo.ecm.core.api.ClientException: Failed to get fulltext info on ddbd0eb4-69d9-448a-8fd4-d7030a584b32
      at org.nuxeo.ecm.core.api.AbstractSession.getBinaryFulltext(AbstractSession.java:3470) 
      at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.getBinaryFulltext(DocumentModelImpl.java:1688) 
      at org.nuxeo.ecm.automation.jaxrs.io.documents.JsonESDocumentWriter.writeDoc(JsonESDocumentWriter.java:110) 
      at org.nuxeo.ecm.automation.jaxrs.io.documents.JsonESDocumentWriter.writeESDocument(JsonESDocumentWriter.java:146)
      at org.nuxeo.elasticsearch.ElasticSearchComponent.buildEsIndexingRequest(ElasticSearchComponent.java:440) 
      ... 8 more 
      Caused by: org.nuxeo.ecm.core.api.DocumentException: org.nuxeo.ecm.core.storage.StorageException: Could not select: SELECT FROM fulltext WHERE id=? 
      at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.getBinaryFulltext(SQLSession.java:1415) 
      at org.nuxeo.ecm.core.api.AbstractSession.getBinaryFulltext(AbstractSession.java:3468) 
      ... 12 more 
      Caused by: org.nuxeo.ecm.core.storage.StorageException: Could not select: SELECT FROM fulltext WHERE id=? 
      at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.getBinaryFulltext(JDBCRowMapper.java:961) 
      at org.nuxeo.ecm.core.storage.sql.SoftRefCachingRowMapper.getBinaryFulltext(SoftRefCachingRowMapper.java:450) 
      at org.nuxeo.ecm.core.storage.sql.SessionImpl.getBinaryFulltext(SessionImpl.java:1537) 
      at org.nuxeo.ecm.core.storage.sql.ra.ConnectionImpl.getBinaryFulltext(ConnectionImpl.java:414) 
      at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.getBinaryFulltext(SQLSession.java:1413) 
      ... 13 more 
      Caused by: java.sql.SQLException: Incorrect syntax near the keyword 'FROM'. 
      at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372) 
      at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2893) 
      at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2335) 
      at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:638) 
      at net.sourceforge.jtds.jdbc.MSCursorResultSet.processOutput(MSCursorResultSet.java:943) 
      at net.sourceforge.jtds.jdbc.MSCursorResultSet.cursorCreate(MSCursorResultSet.java:541) 
      at net.sourceforge.jtds.jdbc.MSCursorResultSet.<init>(MSCursorResultSet.java:154) 
      at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:452) 
      at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:1029) 
      at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) 
      at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) 
      at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.getBinaryFulltext(JDBCRowMapper.java:947) 
      ... 17 more 
      Exception in thread "Nuxeo-Work-elasticSearchIndexing-2" java.lang.RuntimeException: org.nuxeo.ecm.core.api.ClientException: Unable to create index request for Document ddbd0eb4-69d9-448a-8fd4-d7030a584b32 
      at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:73) 
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
      at java.lang.Thread.run(Thread.java:744) 
      Caused by: org.nuxeo.ecm.core.api.ClientException: Unable to create index request for Document ddbd0eb4-69d9-448a-8fd4-d7030a584b32 
      at org.nuxeo.elasticsearch.ElasticSearchComponent.buildEsIndexingRequest(ElasticSearchComponent.java:446) 
      at org.nuxeo.elasticsearch.ElasticSearchComponent.processIndexCommand(ElasticSearchComponent.java:347) 
      at org.nuxeo.elasticsearch.ElasticSearchComponent.indexNow(ElasticSearchComponent.java:334) 
      at org.nuxeo.elasticsearch.work.IndexingWorker.doIndexingWork(IndexingWorker.java:66) 
      at org.nuxeo.elasticsearch.work.AbstractIndexingWorker.work(AbstractIndexingWorker.java:65) 
      at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:66) 
      ... 3 more 
      Caused by: org.nuxeo.ecm.core.api.ClientException: Failed to get fulltext info on ddbd0eb4-69d9-448a-8fd4-d7030a584b32
      at org.nuxeo.ecm.core.api.AbstractSession.getBinaryFulltext(AbstractSession.java:3470) 
      at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.getBinaryFulltext(DocumentModelImpl.java:1688) 
      at org.nuxeo.ecm.automation.jaxrs.io.documents.JsonESDocumentWriter.writeDoc(JsonESDocumentWriter.java:110) 
      at org.nuxeo.ecm.automation.jaxrs.io.documents.JsonESDocumentWriter.writeESDocument(JsonESDocumentWriter.java:146)
      at org.nuxeo.elasticsearch.ElasticSearchComponent.buildEsIndexingRequest(ElasticSearchComponent.java:440) 
      ... 8 more 
      Caused by: org.nuxeo.ecm.core.api.DocumentException: org.nuxeo.ecm.core.storage.StorageException: Could not select: SELECT FROM fulltext WHERE id=? 
      at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.getBinaryFulltext(SQLSession.java:1415) 
      at org.nuxeo.ecm.core.api.AbstractSession.getBinaryFulltext(AbstractSession.java:3468) 
      ... 12 more 
      Caused by: org.nuxeo.ecm.core.storage.StorageException: Could not select: SELECT FROM fulltext WHERE id=? 
      at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.getBinaryFulltext(JDBCRowMapper.java:961) 
      at org.nuxeo.ecm.core.storage.sql.SoftRefCachingRowMapper.getBinaryFulltext(SoftRefCachingRowMapper.java:450) 
      at org.nuxeo.ecm.core.storage.sql.SessionImpl.getBinaryFulltext(SessionImpl.java:1537) 
      at org.nuxeo.ecm.core.storage.sql.ra.ConnectionImpl.getBinaryFulltext(ConnectionImpl.java:414) 
      at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.getBinaryFulltext(SQLSession.java:1413) 
      ... 13 more 
      Caused by: java.sql.SQLException: Incorrect syntax near the keyword 'FROM'. 
      at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372) 
      at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2893) 
      at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2335) 
      at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:638) 
      at net.sourceforge.jtds.jdbc.MSCursorResultSet.processOutput(MSCursorResultSet.java:943) 
      at net.sourceforge.jtds.jdbc.MSCursorResultSet.cursorCreate(MSCursorResultSet.java:541) 
      at net.sourceforge.jtds.jdbc.MSCursorResultSet.<init>(MSCursorResultSet.java:154) 
      at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:452) 
      at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:1029) 
      at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) 
      at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) 
      at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.getBinaryFulltext(JDBCRowMapper.java:947) 
      ... 17 more 
      
      

        Attachments

        1. nuxeo-core-storage-sql-5.8.0-HF18-NXP-14825.patch
          0.9 kB
          Benoit Delbosc

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: