Interesting. I did create and delete a few nodes manually via the Web interface 
right when I first installed the server. Maybe there's some bug related to 
that. In any case, it seems to be working now that I reinstalled the server 
with 1.6.

On Dec 1, 2011, at 12:12 PM, Michael Hunger [via Neo4j Community Discussions] 
wrote:

> Hi Frank, 
> 
> this is really weird. Your server is missing the exploratory URL for the 
> reference node. 
> The (Spring)RestGraphDatabaseService uses this URL to get the URL for the 
> ReferenceNode. 
> 
> I don't know why your sever is missing that. 
> 
> I just downloaded 1.5 community for unix and started the server, it reports 
> the reference_node url as expected: 
> 
> ynagzet:neo4j-community-1.5 mh$ curl http://localhost:7474/db/data/
> { 
>   "relationship_index" : "http://localhost:7474/db/data/index/relationship";, 
>   "node" : "http://localhost:7474/db/data/node";, 
>   "relationship_types" : "http://localhost:7474/db/data/relationship/types";, 
>   "neo4j_version" : "1.5", 
>   "batch" : "http://localhost:7474/db/data/batch";, 
>   "extensions_info" : "http://localhost:7474/db/data/ext";, 
>   "node_index" : "http://localhost:7474/db/data/index/node";, 
>   "reference_node" : "http://localhost:7474/db/data/node/0";, 
>   "extensions" : { 
>     "CypherPlugin" : { 
>       "execute_query" : 
> "http://localhost:7474/db/data/ext/CypherPlugin/graphdb/execute_query"; 
>     }, 
>     "GremlinPlugin" : { 
>       "execute_script" : 
> "http://localhost:7474/db/data/ext/GremlinPlugin/graphdb/execute_script"; 
>     } 
>   } 
> } 
> 
> Am 01.12.2011 um 17:53 schrieb Frank: 
> 
> > Hi Michael, 
> > 
> > My curl result looks like this: 
> > 
> > $ curl http://localhost:7474/db/data/ -i 
> > HTTP/1.1 200 OK 
> > Content-Length: 680 
> > Content-Encoding: UTF-8 
> > Content-Type: application/json 
> > Access-Control-Allow-Origin: * 
> > Server: Jetty(6.1.25) 
> > 
> > { 
> >  "relationship_index" : "http://localhost:7474/db/data/index/relationship";, 
> >  "node" : "http://localhost:7474/db/data/node";, 
> >  "relationship_types" : "http://localhost:7474/db/data/relationship/types";, 
> >  "neo4j_version" : "1.5", 
> >  "batch" : "http://localhost:7474/db/data/batch";, 
> >  "extensions_info" : "http://localhost:7474/db/data/ext";, 
> >  "node_index" : "http://localhost:7474/db/data/index/node";, 
> >  "extensions" : { 
> >    "CypherPlugin" : { 
> >      "execute_query" : 
> > "http://localhost:7474/db/data/ext/CypherPlugin/graphdb/execute_query"; 
> >    }, 
> >    "GremlinPlugin" : { 
> >      "execute_script" : 
> > "http://localhost:7474/db/data/ext/GremlinPlugin/graphdb/execute_script"; 
> >    } 
> >  } 
> > } 
> > 
> > I installed what I thought was the latest version of the server. 
> > 
> > My Maven dependency tree is enourmous because the rest of my application 
> > uses a lot of things. I think this is the part you're interested in, 
> > though. 
> > 
> > [INFO] +- 
> > org.springframework.data:spring-data-neo4j:jar:2.0.0.BUILD-SNAPSHOT:compile 
> > [INFO] |  +- org.springframework:spring-beans:jar:3.0.6.RELEASE:compile 
> > [INFO] |  +- org.springframework:spring-aspects:jar:3.0.6.RELEASE:compile 
> > [INFO] |  +- 
> > org.springframework.data:spring-data-commons-core:jar:1.2.0.M2:compile 
> > [INFO] |  +- org.slf4j:jcl-over-slf4j:jar:1.6.1:compile 
> > [INFO] |  +- cglib:cglib:jar:2.2:compile 
> > [INFO] |  +- org.neo4j:neo4j:jar:1.5:compile 
> > [INFO] |  |  +- org.neo4j:neo4j-kernel:jar:1.5:compile 
> > [INFO] |  |  |  \- 
> > org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compile 
> > [INFO] |  |  +- org.neo4j:neo4j-lucene-index:jar:1.5:compile 
> > [INFO] |  |  +- org.neo4j:neo4j-graph-algo:jar:1.5:compile 
> > [INFO] |  |  +- org.neo4j:neo4j-udc:jar:1.5:compile 
> > [INFO] |  |  +- org.neo4j:neo4j-graph-matching:jar:1.5:compile 
> > [INFO] |  |  \- org.neo4j:neo4j-jmx:jar:1.5:compile 
> > [INFO] |  +- org.neo4j:neo4j-cypher-dsl:jar:1.5:compile 
> > [INFO] |  +- 
> > org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final:compile
> >  
> > [INFO] |  \- javax.validation:validation-api:jar:1.0.0.GA:compile 
> > [INFO] +- 
> > org.springframework.data:spring-data-neo4j-rest:jar:2.0.0.BUILD-SNAPSHOT:compile
> >  
> > [INFO] |  +- org.neo4j:neo4j-rest-graphdb:jar:1.5:compile 
> > [INFO] |  |  \- org.neo4j:server-api:jar:1.5:compile 
> > [INFO] |  |     +- javax.ws.rs:jsr311-api:jar:1.1.1:compile 
> > [INFO] |  |     \- 
> > commons-configuration:commons-configuration:jar:1.6:compile 
> > [INFO] |  |        \- 
> > commons-beanutils:commons-beanutils-core:jar:1.8.0:compile 
> > [INFO] |  +- org.codehaus.jackson:jackson-jaxrs:jar:1.6.1:compile 
> > [INFO] |  +- com.sun.jersey:jersey-server:jar:1.4:compile 
> > [INFO] |  |  \- com.sun.jersey:jersey-core:jar:1.4:compile 
> > [INFO] |  \- com.sun.jersey:jersey-client:jar:1.4:compile 
> > 
> > 
> > 
> > On Nov 30, 2011, at 8:37 PM, Michael Hunger [via Neo4j Community 
> > Discussions] wrote: 
> > 
> >> Frank, 
> >> 
> >> sorry to hear that. 
> >> 
> >> I just tried it and it works as expected. 
> >> 
> >>        final SpringRestGraphDatabase gdb = new 
> >> SpringRestGraphDatabase("http://localhost:7474/db/data/";);  
> >>        final Node node = gdb.getReferenceNode(); 
> >>        assertEquals(0,node.getId()); 
> >> 
> >> What version of the Neo4j-Server are you using? Could you please also show 
> >> the output of mvn dependency:tree ? 
> >> 
> >> Thanks a lot 
> >> 
> >> Michael 
> >> 
> >> if you execute it via curl, what are the results? 
> >> 
> >> ynagzet:spring-data-neo4j mh$ curl http://localhost:7474/db/data/ -i 
> >> HTTP/1.1 200 OK 
> >> Content-Length: 620 
> >> Content-Encoding: UTF-8 
> >> Content-Type: application/json 
> >> Access-Control-Allow-Origin: * 
> >> Server: Jetty(6.1.25) 
> >> 
> >> { 
> >>  "relationship_index" : 
> >> "http://localhost:7474/db/data/index/relationship";, 
> >>  "node" : "http://localhost:7474/db/data/node";, 
> >>  "relationship_types" : 
> >> "http://localhost:7474/db/data/relationship/types";, 
> >>  "neo4j_version" : "1.6.M01", 
> >>  "batch" : "http://localhost:7474/db/data/batch";, 
> >>  "extensions_info" : "http://localhost:7474/db/data/ext";, 
> >>  "node_index" : "http://localhost:7474/db/data/index/node";, 
> >>  "reference_node" : "http://localhost:7474/db/data/node/0";, 
> >>  "extensions" : { 
> >>    "GremlinPlugin" : { 
> >>      "execute_script" : 
> >> "http://localhost:7474/db/data/ext/GremlinPlugin/graphdb/execute_script"; 
> >>    } 
> >>  } 
> >> }ynagzet:spring-data-neo4j mh$ curl http://localhost:7474/db/data -i 
> >> HTTP/1.1 302 Found 
> >> Location: http://localhost:7474/db/data/
> >> Content-Length: 0 
> >> Server: Jetty(6.1.25) 
> >> 
> >> 
> >> Am 01.12.2011 um 00:19 schrieb Frank: 
> >> 
> >>> The server is running on localhost and can be hit from a browser. The 
> >>> server's configuration was modified to allow requests from any IP 
> >>> address, 
> >>> although all of my attempts are from the localhost anyway. 
> >>> 
> >>> I've tried this with and without a trailing slash on the URI, no 
> >>> difference. 
> >>> 
> >>> Code: 
> >>> 
> >>> GraphDatabase graphDb = new 
> >>> SpringRestGraphDatabase("http://localhost:7474/db/data";); 
> >>> graphDb.getReferenceNode(); 
> >>> 
> >>> Result: 
> >>> 
> >>> java.lang.NullPointerException 
> >>> at 
> >>> org.neo4j.rest.graphdb.ExecutingRestRequest.uriWithoutSlash(ExecutingRestRequest.java:78)
> >>>  
> >>> at 
> >>> org.neo4j.rest.graphdb.ExecutingRestRequest.<init>(ExecutingRestRequest.java:72)
> >>>  
> >>> at 
> >>> org.neo4j.rest.graphdb.ExecutingRestRequest.with(ExecutingRestRequest.java:149)
> >>>  
> >>> at org.neo4j.rest.graphdb.entity.RestEntity.<init>(RestEntity.java:52) 
> >>> at org.neo4j.rest.graphdb.entity.RestNode.<init>(RestNode.java:47) 
> >>> at org.neo4j.rest.graphdb.RestAPI.getReferenceNode(RestAPI.java:168) 
> >>> at 
> >>> org.neo4j.rest.graphdb.RestGraphDatabase.getReferenceNode(RestGraphDatabase.java:71)
> >>>  
> >>> at neo4j.Populate.<init>(Populate.java:35) 
> >>> at neo4j.Populate.main(Populate.java:18) 
> >>> 
> >>> 
> >>> -- 
> >>> View this message in context: 
> >>> http://neo4j-community-discussions.438527.n3.nabble.com/NullPointerException-in-ExecutingRestRequest-tp3550067p3550067.html
> >>> Sent from the Neo4j Community Discussions mailing list archive at 
> >>> Nabble.com. 
> >>> _______________________________________________ 
> >>> Neo4j mailing list 
> >>> [hidden email] 
> >>> https://lists.neo4j.org/mailman/listinfo/user
> >> 
> >> _______________________________________________ 
> >> Neo4j mailing list 
> >> [hidden email] 
> >> https://lists.neo4j.org/mailman/listinfo/user
> >> 
> >> 
> >> If you reply to this email, your message will be added to the discussion 
> >> below: 
> >> http://neo4j-community-discussions.438527.n3.nabble.com/NullPointerException-in-ExecutingRestRequest-tp3550067p3550419.html
> >> To unsubscribe from NullPointerException in ExecutingRestRequest, click 
> >> here. 
> >> NAML 
> > 
> > 
> > 
> > -- 
> > View this message in context: 
> > http://neo4j-community-discussions.438527.n3.nabble.com/NullPointerException-in-ExecutingRestRequest-tp3550067p3552108.html
> > Sent from the Neo4j Community Discussions mailing list archive at 
> > Nabble.com. 
> > _______________________________________________ 
> > Neo4j mailing list 
> > [hidden email] 
> > https://lists.neo4j.org/mailman/listinfo/user
> 
> _______________________________________________ 
> Neo4j mailing list 
> [hidden email] 
> https://lists.neo4j.org/mailman/listinfo/user
> 
> 
> If you reply to this email, your message will be added to the discussion 
> below:
> http://neo4j-community-discussions.438527.n3.nabble.com/NullPointerException-in-ExecutingRestRequest-tp3550067p3552370.html
> To unsubscribe from NullPointerException in ExecutingRestRequest, click here.
> NAML



--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/NullPointerException-in-ExecutingRestRequest-tp3550067p3552394.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to