lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noble Paul (JIRA)" <>
Subject [jira] Created: (SOLR-1238) exception in solrJ when authentication is used
Date Tue, 23 Jun 2009 05:33:07 GMT
exception in solrJ when authentication is used

                 Key: SOLR-1238
             Project: Solr
          Issue Type: Bug
          Components: clients - java
    Affects Versions: 1.3
            Reporter: Noble Paul
            Priority: Minor

see the thread

I am facing getting error when I am using Authentication in Solr. I
followed Wiki. The error doesnot appear when I searching. Below is the
code snippet and the error.

Please note I am using Solr 1.4 Development build from SVN.

                       HttpClient client=new HttpClient();
                       AuthScope scope = new AuthScope(AuthScope.ANY_HOST,AuthScope.ANY_PORT,null,
                       client.getState().setCredentials(scope,new UsernamePasswordCredentials("guest",

                       SolrServer server =new CommonsHttpSolrServer("http://localhost:8983/solr",client);

                       SolrInputDocument doc1=new SolrInputDocument();
                       //Add fields to the document
                       doc1.addField("employeeid", "1237");
                       doc1.addField("employeename", "Ann");
                       doc1.addField("employeeunit", "etc");
                       doc1.addField("employeedoj", "1995-11-31T23:59:59Z");

Exception in thread "main"
org.apache.commons.httpclient.ProtocolException: Unbuffered entity
enclosing request can not be repeated.
       at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(
       at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(
       at org.apache.solr.client.solrj.request.UpdateRequest.process(
       at org.apache.solr.client.solrj.SolrServer.add(
       at test.SolrAuthenticationTest.<init>(
       at test.SolrAuthenticationTest.main(
Caused by: org.apache.commons.httpclient.ProtocolException: Unbuffered
entity enclosing request can not be repeated.

       at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(
       at org.apache.commons.httpclient.HttpMethodBase.writeRequest(
       at org.apache.commons.httpclient.HttpMethodBase.execute(
       at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(
       at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(
       at org.apache.commons.httpclient.HttpClient.executeMethod(
       at org.apache.commons.httpclient.HttpClient.executeMethod(
       at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(
       ... 5 more.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message