From user-return-11187-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Tue Jun 29 11:22:03 2010 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 26952 invoked from network); 29 Jun 2010 11:22:03 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 29 Jun 2010 11:22:03 -0000 Received: (qmail 46629 invoked by uid 500); 29 Jun 2010 11:22:02 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 46402 invoked by uid 500); 29 Jun 2010 11:21:58 -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 46391 invoked by uid 99); 29 Jun 2010 11:21:57 -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:21:57 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of pawelstawicki@gmail.com designates 209.85.214.52 as permitted sender) Received: from [209.85.214.52] (HELO mail-bw0-f52.google.com) (209.85.214.52) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jun 2010 11:21:51 +0000 Received: by bwz17 with SMTP id 17so268480bwz.11 for ; Tue, 29 Jun 2010 04:21:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=ajl2jeqlq2k4Rb2GvzlhWzw0fEyhnuUK5P3ZXFQlddU=; b=QEfU++U9vdOsy9AtfCnOiP7+RqyqOHkeDX9dZWpowferRd00AXHpIEe5DgCd2Ly10H PNDKdmlVE0s8LprezRYDeEfVqJTmV4iRWhs5lsJUfPeO87dabqFvdO0BseGq3Ig70efE +TAAIW3266EunSfdwCfz6eV3WfbzmjacE8KZM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=Q+7MlJ4f4Qx+EacYKJbFubezLQsE59Fjif8gDJa4s5RKgsuWsXi5lBwgEFLUtsvGjm oMnLkXUDyPl5yigclW1xBpDyV0WWqJLydfMgnm5Ay6ViqP15S2SJlP1UcLrP02glmFAN tPY9DO1qymBg+EIstR/ha+69fasOIm5Rflhr0= Received: by 10.204.162.133 with SMTP id v5mr4685855bkx.6.1277810490284; Tue, 29 Jun 2010 04:21:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.84.92 with HTTP; Tue, 29 Jun 2010 04:21:10 -0700 (PDT) In-Reply-To: References: From: =?UTF-8?Q?Pawe=C5=82_Stawicki?= Date: Tue, 29 Jun 2010 13:21:10 +0200 Message-ID: Subject: Re: couchdb from java. 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 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/Req= uestEntity > > > > > > 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 cod= e 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.commo= ns.httpclient.HeaderElement.parseElements(Ljava/lang/String;)[Lorg/apache/c= ommons/httpclient/HeaderElement; >> >> at org.apache.commons.httpclient.methods.StringRequestEntity.(Stri= ngRequestEntity.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 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). >> > > ________________________________ > 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 th= e intended recipient. If you are not the intended recipient please notify u= s by return email or telephone and erase all copies and do not disclose the= email or any part of it to any person. Email transmission cannot be guaran= teed to be secure, or error free as information could be intercepted, corru= pted, lost or destroyed as a result of the transmission process. The sender= , therefore, does not accept liability for any errors, omissions, viruses o= r delay in transmission as a result of this mail. We monitor email communic= ations through our networks for regulatory compliance purposes and to prote= ct our clients, employees and business. Opinions, conclusions, and other in= formation in this message that do not relate to the official business of NI= IT Technologies Ltd. or its affiliate(s) shall be understood to be neither = given nor endorsed by NIIT Technologies Ltd. or its affiliate(s). >