Solr DataImportHandler登录到SQL,但从不获取任何数据 [英] Solr DataImportHandler logs into SQL but never fetches any data

查看:326
本文介绍了Solr DataImportHandler登录到SQL,但从不获取任何数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我已经将我的Solr配置从一个工作的Windows服务器复制到一个新的,它似乎无法运行导入。

Hi I have copied my Solr config from a working windows server to a new one, and it can't seem to run an import.

使用win server 2008和SQL 2008R2。这是数据导入配置:

They're both using win server 2008 and SQL 2008R2. This is the data import config:

<dataConfig>  
  <dataSource type="JdbcDataSource"  name="ds1"
        driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"  
        url="jdbc:sqlserver://localhost;databaseName=DB"   
        user="Solr"  
        password="pwd"/>  
  <document name="datas">  
    <entity name="data" dataSource="ds1" pk="key"
    query="EXEC SOLR_COMPANY_SEARCH_DATA"
    deltaImportQuery="SELECT * FROM Company_Search_Data WHERE [key]='${dataimporter.delta.key}'"
    deltaQuery="SELECT [key] FROM Company_Search_Data WHERE modify_dt > '${dataimporter.last_index_time}'">  
          <field column="WorkDesc_Comments" name="WorkDesc_Comments_Split" />
          <field column="WorkDesc_Comments" name="WorkDesc_Comments_Edge" />
    </entity>  
  </document>  
</dataConfig>  

我可以使用MS SQL Profiler成功地观察Solr用户日志,它似乎甚至不尝试和执行存储过程。任何想法为什么这将工作在一个服务器,而不是在另一个?

I can use MS SQL Profiler to watch the Solr user log in successfully, but then nothing. It doesn't seem to even try and execute the stored procedure. Any ideas why this would be working one server and not on another?

FTR只有在tomcat catalina日志是:

FTR the only thing in the tomcat catalina log is:

org.apache.solr.handler.dataimport.JdbcDataSource$1 call
INFO: Creating a connection for entity data with URL: jdbc:sqlserver://localhost;databaseName=CATLive

UPDATE:
Me and Yavar Husain from Solr邮件列表提出了用开放源代码替换MS JDBC驱动程序的解决方案 - 这似乎可行,这意味着这必须是最新版本的Java,DIH和MS JDBC驱动程序之间的兼容性问题。

UPDATE: Me and Yavar Husain from the Solr Mailing list both came up with the solution of replacing the MS JDBC Driver with an open source one - this seems to work, and means this must be a compatibility problem between the latest versions of Java, the DIH and the MS JDBC driver.

UPDATE 2:
使用我正在运行的Java 1.6.0_29 - 报告问题
http:// blogs .msdn.com / b / jdbcteam / archive / 2011/11/07 / supported-java-versions-november-2011.aspx

推荐答案

这看起来是由一个版本的Java 1.6.0_29 - 我正在运行:
http://blogs.msdn.com/b/jdbcteam/archive/2011/11/07/supported- java-versions-november-2011.aspx

This looks to have been caused by a release of Java 1.6.0_29 - which I was running: http://blogs.msdn.com/b/jdbcteam/archive/2011/11/07/supported-java-versions-november-2011.aspx

这篇关于Solr DataImportHandler登录到SQL,但从不获取任何数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆