Registering apoc in Neo4j 4.0

We use an embedded version of Neo4j and used to register procedures similar to:

Procedures procedures = ((GraphDatabaseAPI) graphDatabaseService).getDependencyResolver().resolveDependency(Procedures.class);
try {

The problem is that after upgrading to Neo4j 4.0 and being forced to use bolt driver:

  1. resolveDependency results in

...UnsatisfiedDependencyException: No dependency satisfies type interface org.neo4j.internal.kernel.api.Procedures

  1. procedures does not have registerFunction and registerProcedure methods.

We use neo4j 4.0.0 and apoc
How should we register APOCs now?

1 Like

Procedures has changed to GlobalProcedures. See neo4j-apoc-procedures/ at 784f2ccaa6464f55c05e0520923413959e87e963 · neo4j-contrib/neo4j-apoc-procedures · GitHub for snippet you can use.

1 Like