Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Solr DataImportHandler logs into SQL but never fetches any data

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.

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>  

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 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 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: Issues have been reported with Java 1.6.0_29 - which I am running! http://blogs.msdn.com/b/jdbcteam/archive/2011/11/07/supported-java-versions-november-2011.aspx

like image 247
Ian Grainger Avatar asked Nov 25 '11 12:11

Ian Grainger


1 Answers

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

like image 161
Ian Grainger Avatar answered Sep 29 '22 17:09

Ian Grainger