サーブレットがあり、Neo4j データベースに接続したいと考えています。インターネット経由でアプリケーションからデータベースにアクセスできるようにします。しかし、サーブレットはエラーを出しますか? 私は何か間違ったことをしていますか?
これが私のサーブレットコードです。
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");
}
これは、Web ページで返されるエラーです。
HTTP Status 500 - Servlet execution threw an exception
type Exception report
message Servlet execution threw an exception
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet execution threw an exception
root cause
java.lang.NoClassDefFoundError: org/neo4j/graphdb/factory/GraphDatabaseFactory
hello.hello.doGet(hello.java:45)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)