Solved

SOLR Index

Posted on 2015-01-16
5
200 Views
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
ERROR
DocBuilder
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
ERROR
DataImporter
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.

<dataConfig>
  <dataSource type="JdbcDataSource"
              driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
              url="jdbc:postgresql:\\servername\dbname;integratedsecurity=true;"

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

I think i have the datasource tag wrong.

can someone please help.
0
Comment
Question by:pratikshahse
  • 3
5 Comments
 
LVL 61

Expert Comment

by:gheist
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.
0
 

Author Comment

by:pratikshahse
ID: 40562091
no luck
0
 
LVL 61

Expert Comment

by:gheist
ID: 40562102
0
 
LVL 46

Accepted Solution

by:
Vitor Montalvão earned 500 total points
ID: 40562249
Unable to execute query: select ID,​Name from PolicyIndex Processing Document # 1
(...)
url="jdbc:postgresql:\\servername\dbname;integratedsecurity=true;"

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.
0
 
LVL 61

Expert Comment

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

Featured Post

[Webinar] Disaster Recovery and Cloud Management

Learn from Unigma and CloudBerry industry veterans which providers are best for certain use cases and how to lower cloud costs, how to grow your Managed Services practice in IaaS clouds, and how to utilize public cloud for Disaster Recovery

Question has a verified solution.

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

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
I have a large data set and a SSIS package. How can I load this file in multi threading?
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.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

896 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now