Showing results for 
Search instead for 
Did you mean: 

Missing dependency / class for embedded neo4j


I'm trying to create an embedded neo4j database for my unit tests. The OGM (currently trying 3.2.23) referes to org/neo4j/graphdb/factory/GraphDatabaseFactory for this, but it does not seem to exist.

At runtime I always get the error: nested exception is java.lang.NoClassDefFoundError: org/neo4j/graphdb/factory/GraphDatabaseFactory

I have included the neo4j dependency (currently version 4.1.11), but this class just does not exist there. I also tried to other neo4j versions, but the class does not exist in any of them.

Which dependency am I missing?

Thanks for your help!


Graph Buddy


Please add the necessary jar into your plugin/lib folder for your graph engine. But you need to find out correct jar compatible with your current graph engine installation version.Please see version compatiblity docs on neo4j site.

Thanking you
Mr Sameer Sudhir G

Thanks for your reply.

That is my problem: The jars which are compatible according to the official Neo4J documentation all do NOT contain this class.


Neo4j-OGM does not support embedded or HTTP for Neo4j versions 4+.
Reference: Reference - OGM Library
However, you could build a version of the main branch yourself. We introduced unsupported 4+ embedded there. Migrate to Neo4j 4.x. · neo4j/neo4j-ogm@74d3cb0 · GitHub
At the moment there are no plans to officially release a new version of Neo4j-OGM that contains embedded for 4.x