Neo4j database in a Servlet

SapesMacho

New Member
I have a servlet and want to connect to a Neo4j database. So that i can access the database from my application over Internet.But the servlet gives an error? Am i doing something wrong? Here is my servlet code.\[code\]protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {PrintWriter out = response.getWriter();out.println("Hello World");GraphDatabaseService graphDB = new GraphDatabaseFactory().newEmbeddedDatabase("C:\\Users\\Sourav\\Desktop\\db1");}\[/code\]This is the error returned in the webpage.\[code\]HTTP Status 500 - Servlet execution threw an exceptiontype Exception reportmessage Servlet execution threw an exceptiondescription The server encountered an internal error that prevented it from fulfilling this request.exceptionjavax.servlet.ServletException: Servlet execution threw an exceptionroot causejava.lang.NoClassDefFoundError: org/neo4j/graphdb/factory/GraphDatabaseFactoryhello.hello.doGet(hello.java:45)javax.servlet.http.HttpServlet.service(HttpServlet.java:621)javax.servlet.http.HttpServlet.service(HttpServlet.java:728)\[/code\]
 
Back
Top