Neocons problem with Neo4j 2.2.3 community edition.

32 views
Skip to first unread message

Manoj Waikar

unread,
Aug 21, 2015, 9:50:55 AM8/21/15
to clojure-neo4j
Hi,

I am trying to use Neocons with Neo4j 2.2.3 community edition. However I am facing some issues -

1) If I use neocons 3.0.0, then I get the following error when I try to insert something in Neo4j -
    "No authorization header supplied.\",

2) But if I use neocons 3.1.0-beta3, then I don't get any error while trying to insert something, and I get the below response -

(#clojurewerkz.neocons.rest.records.Node{:id 9, :location-uri "http://localhost:7474/db/data/node/9", :data {:name "Music", :keywords ["Singing" "Guitar"]}, :relationships-uri nil, :create-relationship-uri "http://localhost:7474/db/data/node/9/relationships"} #clojurewerkz.neocons.rest.records.Node{:id 10, :location-uri "http://localhost:7474/db/data/node/10", :data {:name "Reading", :keywords ["Richard Bach" "Paulo Coelho" "Dr. Brian Weiss"]}, :relationships-uri nil, :create-relationship-uri "http://localhost:7474/db/data/node/10/relationships"})

But when I try to query Neo4j, I don't see any nodes / relationships getting created.

Please let me know if I am doing something wrong here (I am attaching the code below).

Thanks,
Manoj.
neo-code.txt

Rohit Aggarwal

unread,
Aug 21, 2015, 10:20:37 AM8/21/15
to clojure-neo4j
Hi Manoj,
Looking at the output you've sent, it looks like nodes with IDs 9 and 10 are created. Could you run the following cypher statement in your neo4j web browser to check: `MATCH n RETURN ID(n);`. This should return the IDs of all the nodes in your database. 

Aside - in `create-interest-nodes`, you may want to use `mapv` instead of `map` as the latter is lazy and so it doesn't create any nodes till the sequnce is realised.

Hope this helps
Rohit

Manoj Waikar

unread,
Aug 21, 2015, 10:39:53 AM8/21/15
to clojure-neo4j
Thanks Rohit. The query does return me 13 rows initially and if I run it again, I get 15 rows, so it sure is inserting the data.
I was running `MATCH (n)-[r]->(m) RETURN n, r, m;` this query which used to return me no rows, so I wasn't sure what was happening.
Regards,
Manoj.

Rohit Aggarwal

unread,
Aug 21, 2015, 11:49:06 AM8/21/15
to clojure-neo4j
Great.

The Cypher query you are running will give all the connected nodes and the program you posted is creating only 2 nodes (one with name "Music" and the other with name "Vector") without any edges between them. Hence, no results of that cypher query.

-Rohit

Manoj. Reading
Reply all
Reply to author
Forward
0 new messages