Rest API just stops completely

Showing 1-4 of 4 messages
Rest API just stops completely Alex Frieden 4/5/13 7:04 AM
I have tried running two different functions 

import org.neo4j.graphdb.Node;
import org.neo4j.helpers.collection.MapUtil;
import org.neo4j.rest.graphdb.RestAPI;
import org.neo4j.rest.graphdb.RestAPIFacade;
import org.neo4j.rest.graphdb.query.RestCypherQueryEngine;

import java.util.Map;

import static org.neo4j.helpers.collection.MapUtil.map;

public class FirstAttempt {
    public static void main(String[] args) {
        final RestAPI api = new RestAPIFacade("http://localhost:7474/db/data");
        RestCypherQueryEngine queryEngine = new RestCypherQueryEngine(api);
        final String queryString = "start n=node({reference}) return n";
        Map params = MapUtil.map("reference", 0);
        final Node result = (Node) queryEngine.query(queryString, params).to(Node.class).single();
       System.out.println(result.getId());
    }
}

I have also tried

public class TestRun {
    public static void main(String[] args) {
        System.out.println("starting test");
        final RestAPI api = new RestAPIFacade("http://localhost:7474/db/data");
        System.out.println("API created");
        final RestCypherQueryEngine engine = new RestCypherQueryEngine(api);
        System.out.println("engine created");
        final QueryResult<Map<String,Object>> result = engine.query("start n=node({id}) return n, id(n) as id;", map("id", 0));
        System.out.println("query created");
        for (Map<String, Object> row : result) {
            long id=((Number)row.get("id")).longValue();
            System.out.println("id is " + id);
        }
    }
}

The first one stops at the definition of Node result.  The second stops at the definition of QueryResult.  There is no error.  There is no warning.  There is nothing.  It just sits there stuck at this step.  What is the issue here?  Is there something wrong with my config with my database?  Thank you
Re: [Neo4j] Rest API just stops completely Michael Hunger 4/5/13 7:29 AM
Sorry, seems to be an implementation bug in that version, can you pull the latest snapshot from github or m2.neo4j.org (1.9-SNAPSHOT) it should work.


This is about PipedStreams and multithreading getting somehow stuck :(


--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: [Neo4j] Rest API just stops completely Alex Frieden 4/5/13 7:59 AM
Are you talking about neo4j-rest-graphdb-1.9.M04.jar?
Re: [Neo4j] Rest API just stops completely Michael Hunger 4/5/13 2:10 PM
Yes

Sent from mobile device

Am 05.04.2013 um 16:59 schrieb Alex Frieden <al...@frieden.org>: