SOLR Index

Posted on 2015-01-16
Last Modified: 2015-05-18
I am trying to configure SOLR on my machine for the first time. I am trying to index one of the tables from the sql server and keep on getting the following errors

1/16/2015, 1:29:06 PM
Exception while processing: PolicyIndex document : SolrInputDocument(fields: []):org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to execute query: select ID,​Name from PolicyIndex Processing Document # 1
1/16/2015, 1:29:06 PM
Full Import failed:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to execute query: select ID,​Name from PolicyIndex Processing Document # 1

Inside the logs I see this error : Caused by: java.lang.NullPointerException

Here is the xml from my data-config file.

  <dataSource type="JdbcDataSource"

    <entity name="PolicyIndex"  
      query="select ID,Name from PolicyIndex"
       <field column="ID" name="ID"/>
       <field column="Name" name="Name"/>      

I think i have the datasource tag wrong.

can someone please help.
Question by:pratikshahse
  • 3
LVL 62

Expert Comment

ID: 40556520
Apparently you need to understand jdbc connection strings.
It is absolutely unlikely microsoft jdbc driver understands postgresql connect string.
I suggest you use jTDS right away to avoid confusion and grief.

Author Comment

ID: 40562091
no luck
LVL 62

Expert Comment

ID: 40562102
LVL 47

Accepted Solution

Vitor Montalvão earned 500 total points
ID: 40562249
Unable to execute query: select ID,​Name from PolicyIndex Processing Document # 1

You are running with integrated security and you didn't define any database so means that the current user need to have as default database the same database where table PolicyIndex is.
LVL 62

Expert Comment

ID: 40562481
Lets start with basics.... PostgreSQL driver will not connect to SQL server... If it was sybase there was some hope...

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Can > be used for a Text field 6 47
SQL view 2 27
ms sql + get number in list out of total 7 29
Selenium docs api java index 3 14
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question