I'd like to export a GraphViz dot file from my Neo4j database. The database is standalone, not embedded.
I've been trying to get it working using the spring-data-neo4j SpringCypherRestGraphDatabase and the Neo4j GraphvizWriter but haven't had any luck. At this point I'm guessing that these two libraries are incompatible.
I've tried many different versions of both libraries.
public void saveDotFile(String filename) {
try {
OutputStream out = new FileOutputStream(filename);
GraphvizWriter writer = new GraphvizWriter();
writer.emit(out, Walker.fullGraph(graphDatabaseService()));
} catch (Exception e) {
e.printStackTrace();
}
}
public GraphDatabaseService graphDatabaseService() {
return new SpringCypherRestGraphDatabase(url, username, password);
}
- Spring 3.4.6.RELEASE and Neo4j 3.1.1 fails with
- NoClassDefFoundError: org/neo4j/kernel/impl/cache/LruCache
- Spring 3.4.6.RELEASE and Neo4j 2.3.12 fails with
- ClassCastException: org.springframework.data.neo4j.rest.SpringCypherRestGraphDatabase cannot be cast to org.neo4j.kernel.GraphDatabaseAPI
SpringCypherRestGraphDatabase doesn't exist after 3.4.6.RELEASE
Any help would be greatly appreciated.
Craig