Solr上的数据导入失败,带有SQLException:单行子查询返回多行

时间:2018-03-01 05:39:30

标签: solr

当我尝试在Solr中完全导入时遇到异常:

SEVERE:getNext()查询失败'SELECT * from my_app.my_solr_app_vw':org.apache.solr.handler.dataimport.DataImportHandlerException:java.sql.SQLException:ORA-01427:单行子查询返回多个行

    at org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow(DataImportHandlerException.java:63)
    at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.hasnext(JdbcDataSource.java:338)
    at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.access$600(JdbcDataSource.java:227)
    at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator$1.hasNext(JdbcDataSource.java:261)
    at org.apache.solr.handler.dataimport.EntityProcessorBase.getNext(EntityProcessorBase.java:116)
    at org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEntityProcessor.java:75)
    at org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(EntityProcessorWrapper.java:243)
    at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:472)
    at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:411)
    at org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:326)
    at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:234)
    at org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:382)
    at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:448)
    at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:429)

    Caused by: java.sql.SQLException: ORA-01427: single-row subquery returns more than one row

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)

1 个答案:

答案 0 :(得分:0)

查询中的错误。像

这样的东西
select ... from ... where field = (select ... from ... where ...)

但是子查询返回了多行。