Return-Path: Delivered-To: apmail-lucene-solr-dev-archive@minotaur.apache.org Received: (qmail 58871 invoked from network); 23 Jun 2009 05:33:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Jun 2009 05:33:29 -0000 Received: (qmail 86471 invoked by uid 500); 23 Jun 2009 05:33:40 -0000 Delivered-To: apmail-lucene-solr-dev-archive@lucene.apache.org Received: (qmail 86406 invoked by uid 500); 23 Jun 2009 05:33:40 -0000 Mailing-List: contact solr-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-dev@lucene.apache.org Delivered-To: mailing list solr-dev@lucene.apache.org Received: (qmail 86396 invoked by uid 99); 23 Jun 2009 05:33:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Jun 2009 05:33:39 +0000 X-ASF-Spam-Status: No, hits=-1998.5 required=10.0 tests=ALL_TRUSTED,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Jun 2009 05:33:28 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id AD328234C1ED for ; Mon, 22 Jun 2009 22:33:07 -0700 (PDT) Message-ID: <1472868859.1245735187708.JavaMail.jira@brutus> Date: Mon, 22 Jun 2009 22:33:07 -0700 (PDT) From: "Noble Paul (JIRA)" To: solr-dev@lucene.apache.org Subject: [jira] Created: (SOLR-1238) exception in solrJ when authentication is used MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org exception in solrJ when authentication is used ---------------------------------------------- Key: SOLR-1238 URL: https://issues.apache.org/jira/browse/SOLR-1238 Project: Solr Issue Type: Bug Components: clients - java Affects Versions: 1.3 Reporter: Noble Paul Priority: Minor see the thread http://markmail.org/thread/w36ih2fnphbubian {code} 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, null); client.getState().setCredentials(scope,new UsernamePasswordCredentials("guest", "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"); server.add(doc1); Exception in thread "main" org.apache.solr.client.solrj.SolrServerException: org.apache.commons.httpclient.ProtocolException: Unbuffered entity enclosing request can not be repeated. at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:468) at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:242) at org.apache.solr.client.solrj.request.UpdateRequest.process(UpdateRequest.java:259) at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:63) at test.SolrAuthenticationTest.(SolrAuthenticationTest.java:49) at test.SolrAuthenticationTest.main(SolrAuthenticationTest.java:113) Caused by: org.apache.commons.httpclient.ProtocolException: Unbuffered entity enclosing request can not be repeated. at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:487) at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114) at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323) at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:415) ... 5 more. {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.