11

I m facing Problem with Dataimport in Solr. if i call this Link

http://localhost:8983/solr/dataimport?command=full-import&clean=false

showing Error

HTTP ERROR 404

Problem accessing /solr/dataimport. Reason:

NOT_FOUND

I have follow Same as per Solr suggestion with this link

http://wiki.apache.org/solr/DataImportHandler

My Configuration Looks like:-

1. in solrconfig.xml

< requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
    < lst name="defaults">
      <str name="config">data-config.xml< /str>
    < /lst>
  < /requestHandler>

2. in data-config.xml (its in same folder of solrconfig.xml)

< dataConfig>
  < dataSource type="JdbcDataSource"
        driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
        url="jdbc:127.0.0.1;databaseName=testsolr"
        user="testsolr"
        password="12345678"/>
  < document name="Product">
    < entity name="Item_ID" query="select Item_ID from item">      
     < /entity>
  < /document>
< /dataConfig>

3. in Lib folder (donwloaded the Microsoft JDBC SQL Connector)

I have putted "sqljdbc4.jar" file in Lib folder

after that i started the solr but still i m getting Same error.

Any help will be greatly appreciated.

Thanks a lot.

Ashutosh
  • 201
  • 4
  • 16

6 Answers6

5

Check whether you are recieving "Welcome to solr" page on entering

"http://localhost:8080/solr/" on bowser.

If it is not having any issue means try with this query..

http://localhost:8983/solr/admin/dataimport?command=full-import&clean=false

In case if you are using multicore add it to your query,

http://localhost:8983/solr/**yourcore**/admin/dataimport?command=full-import&clean=false
Marshal
  • 261
  • 1
  • 6
  • 13
  • I am still researching into solr with multiple cores. In my case the url is http://localhost:8983/solr//**yourcore**/dataimport?command=full-import&clean=false . I don't have "admin" in the url after the core name. – Yogesh Jindal Dec 14 '11 at 21:53
  • I got the solution Thanks for your valuable time. even i developed an Ecom website using Solr visit: http://www.otherlandtoys.co.uk/ – Ashutosh Jul 11 '12 at 11:16
  • could you update the Question with the solution , i got the same problems and all the answers here didn't work with me – Hady Elsahar Nov 08 '12 at 12:53
2

In principle, your link should work.

404 could mean, that the server host and port is correct. This error occurs, if the instance name is not correct. Maybe your instance-name is testsolr, so your url should be:

http://localhost:8983/testsolr/dataimport?command=full-import&clean=false

//Edit: you will find your instance-name here: $CATALINA_HOME/webapps

The Bndr
  • 13,204
  • 16
  • 68
  • 107
  • Thanks for your Response. I checked the instance Name, its correct. but still same Error. – Ashutosh May 17 '11 at 04:57
  • Could you please check, how many solr instances are running (ps -efa | grep tomcat). Maybe there is an 2nd instance, running on an different port? – The Bndr May 17 '11 at 07:28
1

Try restarting solr. The solrconfig.xml file needs to reload so that the /dataimport path is available.

Shashank Agarwal
  • 2,769
  • 1
  • 22
  • 24
0

I had this issue when I, without understanding the ramifications, changed the config in solrconfig.xml for the DataImportHandler requestHandler, it 'moved' my Data Import url to /sfdcorgs rather than the default of /dataimport and I got a 404:

<requestHandler name="/sfdcorgs" class="org.apache.solr.handler.dataimport.DataImportHandler">
    <lst name="defaults">
      <str name="config">/Users/sherod/data-config.xml</str>
    </lst>
  </requestHandler>
Steven Herod
  • 764
  • 8
  • 20
0

In my case too I was getting 404 error, I clean up the index before starting indexing by:

http://localhost:8983/solr/dataimport?command=full-import&clean=true

Problem got solved. Thanks!

Manoj Shekhawat
  • 429
  • 1
  • 3
  • 11
0

I had to access to dataimport.jsp to solve my 404.

migueloop
  • 525
  • 9
  • 21