GraphDatabase API how to deal with neo4j logging -


hi, trying run query using following :

final graphdatabaseservice graphdatabaseservice = new embeddedgraphdatabase("http://localhost:7474/db/data"); executionengine engine = new executionengine(graphdatabaseservice,stringlogger.dev_null); executionresult result = engine.execute("start n=node(0) return n"); 

however, exception fired upon executiong upon code :

exception in thread "main" java.lang.noclassdeffounderror: scala/function0

can give me advises on how solve issue, ever had same 1 ?

thanks.

<dependency>   <groupid>org.neo4j</groupid>   <artifactid>neo4j-rest-graphdb</artifactid>   <version>1.9.m04</version> </dependency> 

then use in java-code this:

import org.neo4j.rest.graphdb.restapi; import org.neo4j.rest.graphdb.restapifacade; import org.neo4j.rest.graphdb.query.restcypherqueryengine; import org.neo4j.rest.graphdb.util.queryresult;  import java.util.map;  import static org.neo4j.helpers.collection.maputil.map;  public class restapitest {     public static void main(string[] args) {         final restapi api = new restapifacade("http://localhost:7474/db/data");         final restcypherqueryengine engine = new restcypherqueryengine(api);         final queryresult<map<string,object>> result = engine.query("start n=node({id}) return n.name, id(n) id", map("id", 0));         (map<string, object> row : result) {             long id=((number)row.get("id")).longvalue();             string name= (string) row.get("n.name");         }     } } 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -