pratikshahse
asked on
SOLR Index
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.handle r.dataimpo rt.DataImp ortHandler Exception: 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.RuntimeEx ception: java.lang.RuntimeException : org.apache.solr.handler.da taimport.D ataImportH andlerExce ption: Unable to execute query: select ID,Name from PolicyIndex Processing Document # 1
Inside the logs I see this error : Caused by: java.lang.NullPointerExcep tion
Here is the xml from my data-config file.
<dataConfig>
<dataSource type="JdbcDataSource"
driver="com.microsoft.sqls erver.jdbc .SQLServer Driver"
url="jdbc:postgresql:\\ser vername\db name;integ ratedsecur ity=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.
1/16/2015, 1:29:06 PM
ERROR
DocBuilder
Exception while processing: PolicyIndex document : SolrInputDocument(fields: []):org.apache.solr.handle
1/16/2015, 1:29:06 PM
ERROR
DataImporter
Full Import failed:java.lang.RuntimeEx
Inside the logs I see this error : Caused by: java.lang.NullPointerExcep
Here is the xml from my data-config file.
<dataConfig>
<dataSource type="JdbcDataSource"
driver="com.microsoft.sqls
url="jdbc:postgresql:\\ser
/>
<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.
ASKER
no luck
More fortune cookie?
http://jtds.sourceforge.net/faq.html#driverImplementation
http://jtds.sourceforge.net/faq.html#driverImplementation
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Lets start with basics.... PostgreSQL driver will not connect to SQL server... If it was sybase there was some hope...
It is absolutely unlikely microsoft jdbc driver understands postgresql connect string.
I suggest you use jTDS right away to avoid confusion and grief.