Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 28023 invoked from network); 29 Jun 2010 11:26:49 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 29 Jun 2010 11:26:49 -0000 Received: (qmail 55847 invoked by uid 500); 29 Jun 2010 11:26:48 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 55802 invoked by uid 500); 29 Jun 2010 11:26:46 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 55793 invoked by uid 99); 29 Jun 2010 11:26:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jun 2010 11:26:45 +0000 X-ASF-Spam-Status: No, hits=2.5 required=10.0 tests=FREEMAIL_FROM,FREEMAIL_REPLY,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of carl.henrik.lundgren@gmail.com designates 209.85.161.52 as permitted sender) Received: from [209.85.161.52] (HELO mail-fx0-f52.google.com) (209.85.161.52) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jun 2010 11:26:39 +0000 Received: by fxm8 with SMTP id 8so2189852fxm.11 for ; Tue, 29 Jun 2010 04:25:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=2RRLrEZUWgYGWvRfB490ibTws2/vl2DardgmMJokDNo=; b=j8QJrQCWTiPWxUYv7aRdcy2HxsRzQBwxImQvWYCEqgZaqD9mtFtSblgmZNST9B3A7p DZRQZnvPirFKfMU4UhePVvtzXy5i0mOwim5bOhOZEXnDMogwZ95O3qcHWhUAVX8TMDnn F09QEp8/ZjZzrM6gKZ1iFX9dEEIIIkG1KhdN4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=wcWPj9Dxn1hFBJWLz4xSsiiQPJ3cGq/MO+0fIlZOy+I+iWqzd4ydI4vrducbX8gAZe CzOM5o3Oda4UZI59telgaJOh9Gl39sN5edQSPqTKclTj5yahYYXAd/YTOimkqLfBEJkp MyC7qxnFYuCEDbzwM3O1KqPdtm8zxVrDR2tvc= MIME-Version: 1.0 Received: by 10.239.185.207 with SMTP id d15mr433789hbh.113.1277810718192; Tue, 29 Jun 2010 04:25:18 -0700 (PDT) Received: by 10.239.166.134 with HTTP; Tue, 29 Jun 2010 04:25:18 -0700 (PDT) In-Reply-To: References: Date: Tue, 29 Jun 2010 13:25:18 +0200 Message-ID: Subject: Re: couchdb from java. From: Henrik Lundgren To: user@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org httpclient-4 is not a drop in replacement for httpclient-3.1. If Couchdb4j's documentation is to be belevieved the required dependencies = are: commons-httpclient-3.1.jar commons-beanutils.jar commons-codec-1.3.jar commons-collections.jar commons-lang.jar commons-logging-1.1.jar json-lib-2.0-jdk15.jar ezmorph-1.0.3.jar On Tue, Jun 29, 2010 at 1:21 PM, Pawe=C5=82 Stawicki wrote: > Could you provide all the stacktrace? Maybe you should have removed > httpclient-4.0? It is possible that something that you are using needs > 3.1 version. > > Regards > -- > Pawe=C5=82 Stawicki > http://pawelstawicki.blogspot.com > http://szczecin.jug.pl > > > > > 2010/6/29 Jyoti Venkatesh : >> thanx for your response stawicki.. >> >> I tried removign common-httpclient-3.1 but i get another error: >> >> java.lang.NoClassDefFoundError: org/apache/commons/httpclient/methods/Re= questEntity >> >> >> >> >> >> Any clues? >> >> >> >> >> >> ________________________________________ >> From: Pawe=C5=82 Stawicki [pawelstawicki@gmail.com] >> Sent: Tuesday, June 29, 2010 12:20 PM >> To: user@couchdb.apache.org >> Subject: Re: couchdb from java. >> >> This error is caused because both httpclient-4.0-bet2 and >> commons-httpclient-3.1 are on your classpath. Choose one version of >> httpclient. >> >> regards >> -- >> Pawe=C5=82 Stawicki >> http://pawelstawicki.blogspot.com >> http://szczecin.jug.pl >> >> >> >> >> On Mon, Jun 28, 2010 at 15:20, Jyoti Venkatesh >> wrote: >>> Have a problem with couchdb. I have installed couchdb and hv written co= de to insert document from java. >>> Following is my code: >>> >>> Session dbSession =3D new Session("localhost", 5984); >>> >>> dbSession.createDatabase("employee"); >>> >>> Database db =3D dbSession.getDatabase("employee"); >>> >>> System.out.println("Database name is --"+db.toString()); >>> >>> Document doc =3D new Document(); >>> >>> doc.setId("1"); >>> >>> doc.put("EmpNo", 1); >>> >>> doc.put("Name", "Mike"); >>> >>> doc.put("Group", "J2EECOE"); >>> >>> doc.put("Designation", "Manager"); >>> >>> doc.put("Language","Java"); >>> >>> db.saveDocument(doc); >>> >>> >>> >>> but i am getting the following exceptions: >>> >>> >>> >>> Exception in thread "main" java.lang.NoSuchMethodError: org.apache.comm= ons.httpclient.HeaderElement.parseElements(Ljava/lang/String;)[Lorg/apache/= commons/httpclient/HeaderElement; >>> >>> at org.apache.commons.httpclient.methods.StringRequestEntity.(Str= ingRequestEntity.java:101) >>> >>> at com.fourspaces.couchdb.Session.post(Session.java:276) >>> >>> at com.fourspaces.couchdb.Session.post(Session.java:262) >>> >>> at com.fourspaces.couchdb.Database.saveDocument(Database.java:169) >>> >>> at com.fourspaces.couchdb.Database.saveDocument(Database.java:194) >>> >>> at testForCouchDB.CouchDBTest.main(CouchDBTest.java:28) >>> >>> >>> >>> I have the following jars in the classpath: >>> >>> cayenne-1.2.1.jar >>> commons-beanutils-1.8.3.jar >>> commons-codec-1.3.jar >>> commons-httpclient-3.1.jar >>> commons-logging-1.1.1.jar >>> couchdb4j-0.1.2.jar >>> ezmorph-1.0.6.jar >>> httpclient-4.0.-bet2.jar >>> httpcore-4.0.1.jar >>> httpmime-4.0.1.jar >>> json-lib-2.2.3-jdk15.jar >>> >>> >>> >>> please let me know what is it that i am missing? >>> >>> >>> >>> thanx >>> >>> jyoti >>> >>> ________________________________ >>> DISCLAIMER >>> >>> The content of this email and any attachments ('email') is confidential= , may be privileged, subject to copyright and may be read and used only by = the intended recipient. If you are not the intended recipient please notify= us by return email or telephone and erase all copies and do not disclose t= he email or any part of it to any person. Email transmission cannot be guar= anteed to be secure, or error free as information could be intercepted, cor= rupted, lost or destroyed as a result of the transmission process. The send= er, therefore, does not accept liability for any errors, omissions, viruses= or delay in transmission as a result of this mail. We monitor email commun= ications through our networks for regulatory compliance purposes and to pro= tect our clients, employees and business. Opinions, conclusions, and other = information in this message that do not relate to the official business of = NIIT Technologies Ltd. or its affiliate(s) shall be understood to be neithe= r given nor endorsed by NIIT Technologies Ltd. or its affiliate(s). >>> >> >> ________________________________ >> DISCLAIMER >> >> The content of this email and any attachments ('email') is confidential,= may be privileged, subject to copyright and may be read and used only by t= he intended recipient. If you are not the intended recipient please notify = us by return email or telephone and erase all copies and do not disclose th= e email or any part of it to any person. Email transmission cannot be guara= nteed to be secure, or error free as information could be intercepted, corr= upted, lost or destroyed as a result of the transmission process. The sende= r, therefore, does not accept liability for any errors, omissions, viruses = or delay in transmission as a result of this mail. We monitor email communi= cations through our networks for regulatory compliance purposes and to prot= ect our clients, employees and business. Opinions, conclusions, and other i= nformation in this message that do not relate to the official business of N= IIT Technologies Ltd. or its affiliate(s) shall be understood to be neither= given nor endorsed by NIIT Technologies Ltd. or its affiliate(s). >> >