Closed contrebande-labs closed 9 months ago
Might not be the most elegant way, but I solved my problem by doing this:
procedures.registerComponent(
RelationshipExporterBuilder.class,
kernelContext -> kernelContext.dependencyResolver().resolveDependency(RelationshipExporterBuilder.class),
true
);
procedures.registerComponent(
RelationshipStreamExporterBuilder.class,
kernelContext -> kernelContext.dependencyResolver().resolveDependency(RelationshipStreamExporterBuilder.class),
true
);
procedures.registerComponent(
RelationshipPropertiesExporterBuilder.class,
kernelContext -> kernelContext.dependencyResolver().resolveDependency(RelationshipPropertiesExporterBuilder.class),
true
);
procedures.registerComponent(
NodePropertyExporterBuilder.class,
kernelContext -> kernelContext.dependencyResolver().resolveDependency(NodePropertyExporterBuilder.class),
true
);
procedures.registerComponent(
NodeLabelExporterBuilder.class,
kernelContext -> kernelContext.dependencyResolver().resolveDependency(NodeLabelExporterBuilder.class),
true
);
If someone could show me a better way I'd be happy to simplify my code.
@contrebande-labs thank you for raising this.
The issue is that you'd need to declare dependency to open-write-services
too (see https://github.com/neo4j/graph-data-science#developing-with-opengds):
<!-- Required by the write execution modes, this artifact is responsible for providing the various exporters -->
<dependency>
<groupId>org.neo4j.gds</groupId>
<artifactId>open-write-services</artifactId>
<version>2.4.6</version>
</dependency>
thanks @vnickolov, it works!
Happy to help @contrebande-labs, I will close this issue now.
Thank you for using the library and please let us know if you have any issues or questions.
Describe the bug
None of the write-enabled procedures will load because of exception of type
Unable to set up injection for procedure XXXXXX, the field YYYYYYYYYhas type ZZZZZZZ which is not a known injectable component.
. Here is a list of the unknown injectable components which prevent loading:Here is how I'm loading the procedures:
To Reproduce
Here are the maven-loaded dependencies
GDS version: 2.4.6 Neo4j version: 5.12.0 Operating system: Java 21, Ubuntu 22.04
Anyone knows how to make this work? Thanks!