It seems like your data-config does not have any <document> tag. The
following is the correct structure:

<dataConfig>
  <document>
    <entity .../>
  </document>
</dataConfig>

On Tue, Nov 11, 2008 at 12:31 AM, Marc Sturlese <[EMAIL PROTECTED]>wrote:

>
> Hey there,
> I am trying to use the DataImportHandler to index data from a mysql
> database. I am having the same error all the time just when I start tomcat:
>
> Nov 10, 2008 7:39:49 PM
> org.apache.solr.handler.dataimport.DataImportHandler
> processConfiguration
> INFO: Processing configuration from solrconfig.xml:
> {config=/path_to/data-config.xml}
> Nov 10, 2008 7:39:49 PM org.apache.solr.handler.dataimport.DataImporter
> loadDataConfig
> INFO: Data Configuration loaded successfully
> Nov 10, 2008 7:39:49 PM
> org.apache.solr.handler.dataimport.DataImportHandler
> inform
> SEVERE: Exception while loading DataImporter
> java.lang.NullPointerException
>        at
>
> org.apache.solr.handler.dataimport.DataImporter.<init>(DataImporter.java:95)
>        at
>
> org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandler.java:106)
> ...
>
> I am using the oficial release of solar 1.3. First I tried to add the
> compiled DataImportHandler jar. As it didn't work what I did was:
> I downloaded the package org/apache/solr/handler/dataimport from a nightly
> build and have added it and compiled to my solr 1.3 oficial source release.
> This way I have my solr1.3 release with the DataImporthandler
>
> In solrconfig.xml I have created a request handler to make the import:
>
> <requestHandler name="/dataimport"
> class="org.apache.solr.handler.dataimport.DataImportHandler">
>    <lst name="defaults">
>
>        <str name="config">/path_to_/data-config.xml</str>
>    </lst>
>  </requestHandler>
>
> To connect to the database , in data-config.xml I am doing:
> <dataConfig>
>   <dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver"
> url="jdbc:mysql://localhost/db_name" user="root" password=""/> ...and here
> I
> do the select and the mapping db_field - index_field
>
> *The mysql connector is correctly added in the classpath
>
> I think I must be missing something in my configuration but can't find
> what...
> Anyone can give me a hand? I am a bit lost with this problem...
> Thanks in advanced
>
> Marc Sturlese
>
>
>
> --
> View this message in context:
> http://www.nabble.com/Using-DataImportHandler-with-mysql-database-tp20425791p20425791.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>


-- 
Regards,
Shalin Shekhar Mangar.

Reply via email to