From user-return-11191-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Tue Jun 29 11:55:55 2010 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 34294 invoked from network); 29 Jun 2010 11:55:55 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 29 Jun 2010 11:55:55 -0000 Received: (qmail 6856 invoked by uid 500); 29 Jun 2010 11:55:53 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 6480 invoked by uid 500); 29 Jun 2010 11:55:50 -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 6466 invoked by uid 99); 29 Jun 2010 11:55:49 -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:55:49 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [121.243.22.239] (HELO mail4.niit-tech.com) (121.243.22.239) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jun 2010 11:55:42 +0000 Received: from 172.17.112.133 [172.17.112.133] by mail4.niit-tech.com with XWall v3.44 ; Tue, 29 Jun 2010 17:24:54 +0530 Received: from NOIDA-CH-CAS2.IN.NIIT-Tech.com ([172.17.112.234]) by NOIDA-CH-DSSMTP.IN.NIIT-Tech.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 29 Jun 2010 17:24:54 +0530 Received: from NOIDA-CH-MSG.IN.NIIT-Tech.com ([172.17.112.246]) by noida-ch-cas2 ([172.17.112.234]) with mapi; Tue, 29 Jun 2010 17:24:53 +0530 From: Jyoti Venkatesh To: "user@couchdb.apache.org" Date: Tue, 29 Jun 2010 17:23:40 +0530 Subject: RE: couchdb from java. Thread-Topic: couchdb from java. Thread-Index: AcsXfT8ZJ99hnkMOS7u0QFL+eROFdgABHh3K Message-ID: References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 29 Jun 2010 11:54:54.0066 (UTC) FILETIME=[E33A4D20:01CB1781] X-Virus-Checked: Checked by ClamAV on apache.org thanks for your support. I removed all the jars and just added the basic re= quired ones. It works. regards ________________________________________ From: Pawe=B3 Stawicki [pawelstawicki@gmail.com] Sent: Tuesday, June 29, 2010 4:51 PM To: user@couchdb.apache.org Subject: Re: couchdb from java. 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=B3 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=B3 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=B3 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). > DISCLAIMER The content of this email and any attachments ('email') is confidential, ma= y 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 the e= mail or any part of it to any person. Email transmission cannot be guarante= ed to be secure, or error free as information could be intercepted, corrupt= ed, lost or destroyed as a result of the transmission process. The sender, = therefore, does not accept liability for any errors, omissions, viruses or = delay in transmission as a result of this mail. We monitor email communica= tions through our networks for regulatory compliance purposes and to protec= t our clients, employees and business. Opinions, conclusions, and other inf= ormation in this message that do not relate to the official business of NII= T Technologies Ltd. or its affiliate(s) shall be understood to be neither g= iven nor endorsed by NIIT Technologies Ltd. or its affiliate(s).