Closed smanalysis closed 5 years ago
When running Neo4j embedded, procedures aren't registered automatically, like they are for jars in the plugins/ directory when running Neo4j normally. You have to register the procedures explicitly. If you have the jar on classpath, do:
GraphDatabaseService db = new TestGraphDatabaseFactory().newImpermanentDatabaseBuilder(storeDir).setConfig(config).newGraphDatabase();
Procedures procedures = ((GraphDatabaseAPI) db).getDependencyResolver().resolveDependency(Procedures.class);
procedures.registerProcedure(ListProc.class);
This will load the algo.list
procedure. You will have to enumerate all the procedures that you want to use and explicitly register them this way.
I'm curious, why are you running algos over Neo4j embedded?
@smanalysis Closing as resolved. Drop a note if you still have trouble.
I use java code to create and load a embedded neo4j database like (version 3.5.8):
db = new GraphDatabaseFactory().newEmbeddedDatabase(dbDirectory);
I download your standalone file from https://neo4j.com/download-center/, and add the jar to my application.
However, when I try to execute the code:
Result lr = db.execute("CALL algo.list()");
I receive the error msg:
Exception in thread "main" org.neo4j.graphdb.QueryExecutionException: There is no procedure with the name
algo.list
registered for this database instance. Please ensure you've spelled the procedure name correctly and that the procedure is properly deployed.What should I do before calling your proceduces?