Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 884789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:48:07+00:00 2026-05-15T12:48:07+00:00

I’m having a problem getting Solr to talk to Microsoft SQL Server via the

  • 0

I’m having a problem getting Solr to talk to Microsoft SQL Server via the Microsoft JDBC Driver. I have the handler registered in solrconfig.xml:

<requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
  <lst name="defaults">
    <str name="config">C:\Program Files\Apache Software Foundation\Tomcat 6.0\Solr\conf\data-config.xml</str>
  </lst>
</requestHandler>

In data-config.xml I have a data source and a document defined:

<?xml version="1.0" encoding="UTF-8" ?>
<dataConfig>
  <dataSource type="JdbcDataSource" name="ds1"
    driver="com.microsoft.sqlserver.jdbc.SQLServerDriver" 
    url="jdbc:sqlserver://localhost;databaseName=myDB;responseBuffering=adaptive;"
    user="xxxx"
    password="xxxx"
    readOnly="true"
  />

  <document name="members">
    <entity name="member" datasource="ds1" pk="id"
      query = "select 
        MemberID as id,
        UserName as userName,
        FirstName as firstName,
        LastName as lastName,
        Birthday as birthday,
        PrimaryEmail as primaryEmail,
        PersonalStatement as personalStatement
        from member"
      transformer="DateFormatTransformer">
      <field column="Birthday" name="birthday" dateTimeFormat="yyyy-MM-dd" />
    </entity>      
  </document>
</dataConfig>

The columns are fairly irrelevant – I just wanted to start with a few items, including a date column. The Solr schema.xml has some fields defined:

<field name="id" type="tlong" indexed="true" stored="true" required="true" /> 
<field name="userName" type="text" indexed="true" stored="true" />
<field name="firstName" type="text" indexed="true" stored="true" />
<field name="lastName" type="text" indexed="true" stored="true" />
<field name="birthday" type="tdate" indexed="true" stored="true" />
<field name="primaryEmail" type="text" indexed="true" stored="true" />
<field name="personalStatement" type="text" indexed="true" stored="true" />

When I attempt an import, the log shows an exception building the datasource:

Jun 26, 2010 10:24:48 PM org.apache.solr.handler.dataimport.DataImporter doFullImport
INFO: Starting Full Import
Jun 26, 2010 10:24:48 PM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/select params={clean=false&commit=true&command=full-import&qt=/dataimport} status=0 QTime=7
Jun 26, 2010 10:24:48 PM org.apache.solr.handler.dataimport.SolrWriter readIndexerProperties
WARNING: Unable to read: dataimport.properties
Jun 26, 2010 10:24:48 PM org.apache.solr.handler.dataimport.DataImporter doFullImport
SEVERE: Full Import failed
org.apache.solr.handler.dataimport.DataImportHandlerException: No dataSource :null available for entity :member Processing Document # 1
at org.apache.solr.handler.dataimport.DataImporter.getDataSourceInstance(DataImporter.java:279)
at org.apache.solr.handler.dataimport.ContextImpl.getDataSource(ContextImpl.java:93)
at org.apache.solr.handler.dataimport.SqlEntityProcessor.init(SqlEntityProcessor.java:52)
at org.apache.solr.handler.dataimport.EntityProcessorWrapper.init(EntityProcessorWrapper.java:71)
at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:319)
at org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:242)
at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:180)
at org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:331)
at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:389)
at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:370)
Jun 26, 2010 10:24:48 PM org.apache.solr.update.DirectUpdateHandler2 rollback
INFO: start rollback
Jun 26, 2010 10:24:48 PM org.apache.solr.update.DirectUpdateHandler2 rollback
INFO: end_rollback
Jun 26, 2010 10:24:54 PM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/select params={clean=false&commit=true&command=status&qt=/dataimport} status=0 QTime=0

I’ve read the FAQ and documentation, looked at as many sources as I can find, and I just can’t get past this error. What am I doing wrong? The error “Unable to read: dataimport.properties” appears to be shown any time there is any issue with the configuration. I can’t find my mistake.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T12:48:08+00:00Added an answer on May 15, 2026 at 12:48 pm

    It seems that the datasource is not recognized in the entity declaration because the proper attribute to use is dataSource, not datasource

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 487k
  • Answers 487k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer omg it was my fault i set the vetor to… May 16, 2026 at 8:17 am
  • Editorial Team
    Editorial Team added an answer My favorites: User Interface Design for Programmers by Joel Spolsky.… May 16, 2026 at 8:17 am
  • Editorial Team
    Editorial Team added an answer Sorry there isn't any practical way to do this. (There… May 16, 2026 at 8:17 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.