lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hugo Hardel <h...@twazzup.com>
Subject Using DataImportHandler basic http authentication
Date Thu, 05 Nov 2009 08:30:04 GMT
Thanks in advace for your help...I'm completely new to solr & I could use a
couple of pointers.

I am trying to use the DataImportHandler to fetch some xml documents via an
http API requiring basic authentication. Accessing the xml document from a
browser is not a problem uwith [http://user:password@host:port/path], but
when using the exact same URL in my dataConfig definition, the fetch fails
with a 401 (unauthorized) error.


Does the DataImportHandler support basic http authentication?...if yes what
am doing incorrectly? if not, any pointers or suggestions for workaround
would be much appreciated!!





Here is the stack trace for reference (I replaced the actual URL with the
template [http://user:password@host:port/path])

SEVERE: Full Import failed
org.apache.solr.handler.dataimport.DataImportHandlerException: Exception in
invoking url [http://user:password@host:port/path] Processing Document # 1
    at
org.apache.solr.handler.dataimport.HttpDataSource.getData(HttpDataSource.java:115)
    at
org.apache.solr.handler.dataimport.HttpDataSource.getData(HttpDataSource.java:47)
    at
org.apache.solr.handler.dataimport.XPathEntityProcessor.initQuery(XPathEntityProcessor.java:210)
    at
org.apache.solr.handler.dataimport.XPathEntityProcessor.fetchNextRow(XPathEntityProcessor.java:180)
    at
org.apache.solr.handler.dataimport.XPathEntityProcessor.nextRow(XPathEntityProcessor.java:163)
    at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:285)
    at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:178)
    at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:136)
    at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:334)
    at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:386)
    at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:377)
Caused by: java.io.IOException: Server returned HTTP response code: 401 for
URL: [http://user:password@host:port/path]
    at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1313)
    at
org.apache.solr.handler.dataimport.HttpDataSource.getData(HttpDataSource.java:98)


Thanks!

Hugo

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message