cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Neo4j-ogm with hibernate-orm in the same project causing issues in maven clean install

I am finding the error below while integrating my project

ERROR ::: Cannot convert value of type [org.hibernate.impl.SessionFactoryImpl] to required type [org.neo4j.ogm.session.SessionFactory]: no matching editors or conversion strategy found

full log

1 REPLY 1

When using both libraries you have to define the name of your Neo4j-OGM SessionFactory bean explicitly like
@EnableNeo4jRepositories(sessionFactoryRef = CUSTOM_SESSION_FACTORY_BEAN_NAME)
Otherwise Spring Data Neo4j will look for a bean called sessionFactory that gets created from the Spring Data JPA Spring Boot starter "first". This is the reason why you are facing this exception.