我正在尝试通过/ dataimport?command = full-import导入数据库。这是(我理解的)相关信息:
使用Solr Tomcat6 在Xubuntu 12.04上 我最初通过apt-get install solr-tomcat安装了solr 我通过服务tomcat6 start
运行solrSolr规格版本:3.6.1.2012.09.06.10.36.26 Solr实现版本:3.6.1 debian - buildd - 2012-09-06 10:36:26 Lucene规范版本:3.6.1 Lucene实现版本:3.6.1 debian - buildd - 2012-09-06 10:34:37 当前时间:2013年3月28日星期四14:13:45 PDT 服务器开始时间:2013年3月28日星期三13:41:30
我的data-config.xml:
<dataConfig>
<dataSource type="JdbcDataSource"
driver="org.postgresql.Driver"
url="jdbc:postgresql://<ip>:<port>;databaseName=<myDB>"
user="<user>"
password="<password>"
readOnly="True"/>
<document>
<entity name="library" query="<query that works everywhere but via solr for 'id' and 'value'>">
<field column="id" name="id" />
<field column="value" name="title" />
</entity>
</document>
</dataConfig>
日志:
Mar 28, 2013 1:41:36 PM org.apache.solr.common.SolrException log
SEVERE: Full Import failed:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to execute query: SELECT id, value FROM pg_evergreen.metabib.title_field_entry Processing Document # 1
at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:264)
at org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:375)
at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:445)
at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:426)
Caused by: java.lang.RuntimeException: org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to execute query: SELECT id, value FROM pg_evergreen.metabib.title_field_entry Processing Document # 1
at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:621)
at org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:327)
at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:225)
... 3 more
Caused by: org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to execute query: SELECT id, value FROM pg_evergreen.metabib.title_field_entry Processing Document # 1
at org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow(DataImportHandlerException.java:72)
at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<init>(JdbcDataSource.java:253)
at org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:210)
at org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:39)
at org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEntityProcessor.java:59)
at org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEntityProcessor.java:73)
at org.apache.solr.handler.dataimport.EntityProcessorWrapper.pullRow(EntityProcessorWrapper.java:330)
at org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(EntityProcessorWrapper.java:296)
at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:683)
at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:619)
... 5 more
Caused by: java.lang.NullPointerException
at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<init>(JdbcDataSource.java:241)
... 13 more
Mar 28, 2013 1:41:36 PM org.apache.solr.update.DirectUpdateHandler2 rollback
INFO: start rollback
Mar 28, 2013 1:41:36 PM org.apache.solr.update.DirectUpdateHandler2 rollback
INFO: end_rollback
我试过了:
有关为什么dataimport无法执行我的查询的任何想法?