Hi Andrea,
Thanks for the help, but I still have errors when starting the
KeyMaster as a Neo4j (see logs [2]).
I understand that this declaration [1] is the key to change jpa to
neo4j but is it suffisant ?
Best regards,
Stéphane POPOFF
[1]
<dependency>
<groupId>org.apache.syncope.core</groupId>
<artifactId>syncope-core-self-keymaster-starter</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.syncope.core</groupId>
<artifactId>syncope-core-persistence-jpa</artifactId>
</exclusion>
</exclusions>
</dependency>
[2]
2026-04-20 17:57:21.477 INFO [ main]
org.apache.syncope.core.starter.SyncopeCoreApplication :
Starting SyncopeCoreApplication v4.1.0 using Java 25.0.2 with PID 7
(/opt/syncope/lib/syncope.jar started by syncope in /)
2026-04-20 17:57:21.492 INFO [ main]
org.apache.syncope.core.starter.SyncopeCoreApplication : The
following 2 profiles are active: "embedded", "all"
2026-04-20 17:57:28.884 INFO [ main]
org.springframework.boot.web.embedded.tomcat.TomcatWebServer : Tomcat
initialized with port 8080 (http)
2026-04-20 17:57:28.918 INFO [ main]
org.apache.coyote.http11.Http11NioProtocol :
Initializing ProtocolHandler ["http-nio-8080"]
2026-04-20 17:57:28.926 INFO [ main]
org.apache.catalina.core.StandardService :
Starting service [Tomcat]
2026-04-20 17:57:28.927 INFO [ main]
org.apache.catalina.core.StandardEngine :
Starting Servlet engine: [Apache Tomcat/10.1.53]
2026-04-20 17:57:29.023 INFO [ main]
.catalina.core.ContainerBase.[Tomcat].[localhost].[/syncope] :
Initializing Spring embedded WebApplicationContext
2026-04-20 17:57:29.025 INFO [ main]
.boot.web.servlet.context.ServletWebServerApplicationContext : Root
WebApplicationContext: initialization completed in 5906 ms
2026-04-20 17:57:36.299 WARN [ main]
t.context.AnnotationConfigServletWebServerApplicationContext :
Exception encountered during context initialization - cancelling
refresh attempt:
org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'keymasterStart' defined in
org.apache.syncope.core.starter.SyncopeCoreApplication: Unsatisfied
dependency expressed through method 'keymasterStart' parameter 0:
Error creating bean with name 'commonEMFConf' defined in class path
resource [org/apache/syncope/core/persistence/jpa/PersistenceContext.class]:
Unsatisfied dependency expressed through method 'commonEMFConf'
parameter 1: Error creating bean with name 'MasterDataSource' defined
in class path resource [org/apache/syncope/core/persistence/jpa/Maste
Le lun. 20 avr. 2026 à 12:34, Andrea Patricelli
<[email protected]> a écrit :
>
> 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
>