XEdwin / jcouchdb

Automatically exported from code.google.com/p/jcouchdb
Other
0 stars 0 forks source link

problem at the trying jcouchdb #72

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. at the runnng java file  
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
eclipse helios 3.6, jcouchdb-1.0.1-1.jar

Please provide any additional information below.
i would like to try jcouchdb and started with jcouchdb tutorial as this:
package jcouchDbTest;
------------------------------------------------------------------------
import java.util.HashMap;
import java.util.Map;

import org.jcouchdb.db.Database;
import org.jcouchdb.db.ServerImpl;

public class myjcouchdb {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub

Database db = new Database("localhost",5984,"mycouchdb");

Map<String,String> doc =new HashMap<String,String>();
doc.put("foo", "value for the foo attribute");
doc.put("bar","value for the bar attribute");

db.createDocument(doc);
    }

}
------------------------------------------------------------------------
But i recieve the following errors at the running my java file:
---------------------------------------------------------------------
Exception in thread "main" java.lang.NoClassDefFoundError: 
org/apache/http/client/methods/HttpRequestBase
    at org.jcouchdb.db.Database.<init>(Database.java:101)
    at jcouchDbTest.myjcouchdb.main(myjcouchdb.java:19)
Caused by: java.lang.ClassNotFoundException: 
org.apache.http.client.methods.HttpRequestBase
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    ... 2 more
----------------------------------------------------------------------
i have created  the database "mycouchdb" via Puton.
help me

Original issue reported on code.google.com by hjhge...@gmail.com on 13 Jan 2011 at 8:19

GoogleCodeExporter commented 9 years ago
Are you using Maven to manage the dependencies ... if not, you'll need to make 
sure that the libraries that jcouchdb is dependent upon are included in the 
classpath.  Can you verify that you've got the required jar files on your 
classpath.

Original comment by smoye...@gmail.com on 29 Feb 2012 at 10:58

GoogleCodeExporter commented 9 years ago
It appears that the required libraries were not on the classpath.

Original comment by smoye...@gmail.com on 31 May 2012 at 10:06