Hi Stéphane,
in order to enable neo4j I'd suggest to start as simple and clean
(archetype I mean) as possible, without manually changing spring
autoconfiguration imports or adding neo4j maven dependencies.
To have an idea on how correctly configure Syncope please refer to the
neo4j-it profile [1] in source code and to sample core configurations
here [2].
Please also bear in mind that you have also to load the correct
configurations for persistence startup, available here [3].
HTH,
Andrea
[1]
https://github.com/apache/syncope/blob/syncope-4.1.0/fit/core-reference/pom.xml#L1089-L1217
[2]
https://github.com/apache/syncope/blob/syncope-4.1.0/fit/core-reference/src/main/resources/core-neo4j.properties
[3]
https://github.com/apache/syncope/tree/syncope-4.1.0/core/persistence-neo4j/src/test/resources/domains
Il 16/04/26 14:56, Stéphane Popoff ha scritto:
Hi,
I'm trying to activate the persistence system neo4j in place of any SQL server.
To do that I change the content of the file
resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
and put :
- org.apache.syncope.core.persistence.neo4j.PersistenceContext
- org.apache.syncope.core.persistence.neo4j.MasterDomain
- org.neo4j.driver.Driver
I also change the core.properties to define the source and secret for
the Aura NEO4J database.
Of course I add the dependencies needed for neo4j in the CORE pom.xml [1]
What is strange, is that spring tries to find meta-data information
directly in class files that should be generated in a classes
directory and fails.
The same is not required when using a jpa persistence, spring analyzes
meta-data through the jar via the classpath.
Of course I can add the java source file (PersistenceContext,
MasterDomain) in the CORE to generate class files, but other problems
appear.
Do you have an idea(s) why spring changes the way to look for
meta-data in that case ?
Best regards,
Stéphane POPOFF
[1]
<dependency>
<groupId>org.apache.syncope.core</groupId>
<artifactId>syncope-core-persistence-neo4j</artifactId>
<version>4.1.0</version>
</dependency>
<dependency>
<groupId>org.neo4j.driver</groupId>
<artifactId>neo4j-java-driver</artifactId>
<version>5.28.10</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-neo4j</artifactId>
<version>7.5.1</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher-dsl</artifactId>
<version>2025.2.6</version>
</dependency>
--
Andrea Patricelli
Tirasa - Open Source Excellence
http://www.tirasa.net/
PMC Member at The Apache Software Foundation
Syncope