Posts Tagged ‘neo4j’

Neo4j: org.neo4j.graphdb.NotFoundException: Target file[nioneo_logical.log.v1] already exists

July 18th, 2012

My Neo4j didn’t start and my log showed

org.neo4j.graphdb.NotFoundException: Target file[nioneo_logical.log.v1] already exists

I solved it by removing all nioneo_logical.log* files in data/graph.db/
Right or wrong I don’t know but my nodes and indices remained intact.

Neo4j and Neo4jClient dis and dat

July 11th, 2012

Below is various stuff I have found while working with Neo4j and Neo4jClient.  Helpful?  Dunno.  At least it is better to keep text searchable than living just in my head.  To be forgotten.  Like tears in rain.

Neo4jClient can be installed through Nuget.  Install-Package Neo4jClient.  Awesome.

How to do some calls is here:

Stackoverflow tag for Neo4jClient is here:

Info on creating index is found here:

Creating a relation is a totally different horse than node.  Why? Here is dotnet code for said:

Finding all nodes, and deleting them if wished is found here:
The queries are

START n=node(*)


START n=node(*)
MATCH n-[r?]-() where ID(n) <> 0
DELETE n, r;

(replace &lt;&gt; with <>

Looking at an index in the web client:

For getting all nodes for an index with index name “MyIndexName” and property “MyProperty” write


in the web admin.  It also works with an exact index.

Writing a Relation is not as easy as writing a node.  Se here:

I have not been able to confirm that it is possible to write properties on the relation.

Reading the relation again through its ID is also not as easy a reading a node.  A workaround is to use Gremlin:


Talking to Neo4j running on OSX from Windows7

July 5th, 2012

This is not a deep diving article but just a brain dump.  Maybe it will help someone.  At least it works on my machine.

I wanted to use Neo4j with dotnet.  So I put Neo4j as a server on the Mac and my regular dotnet stuff on a Win7 machine running through Parallels.

I don’t remember exactly what was needed to get Neo4j up and running but it was easy I recall.  Download.  Extract.  Find the right folder.  Type “neo4j start”. Open a browser.  Type “localhost:7474”.  Create a node.  Check it was created.  Done.
I opted for running Neo4j stand alone to keep my machine tidy – starting the Neo4j server every time I develop is easy.

Since I want to talk to Neo4j from another machine I need to bridge the network and open the firewall on the mac.  It’s just a google away even though the way to open the firewall seems to shifts with every OSX release.  To the better in my case.

A caveat that burned some time for me was that the admin GUI for Neo4j is set to only answer on localhost.  It is considered a good thing since there is no usr/pwd.  That is solved by updating the config and restarting the Neo4j server. Use http://yourmachine:7474 to check this.

On the Windows/Visual studio/Dotnet side I opted for Neo4jclient since it is under present development and open source.  The 2 top hits I found otherwise had their last update set in 2010.  It’s an easy install with Nuget.

Creating nodes from dotnet was easy.  I just followed the getting started.

That’s all I’ve done for now.

Neo4j web admin user interface only listens on localhost as default

July 2nd, 2012

If you can’t connect to the Neo4j web admin through a URL like


it might be because the default setting is that only localhost is allowed.

Open the file in the conf directory.  Find


and uncomment it.

There are security considerations for removing this.