I tried to connect hibernate ogm,Spring boot and mongodb.I used jpa for my development. So I selected Hibernate ogm... When I try to run the application the console gives below
I don't use Spring Boot but JBoss WildFly 11/12 with MongoDB. I had problems getting started. By ensuring I was using the latest version of Hibernate, OGM & Elastic Search etc. fixed it for me.
From your log:
Caused by: java.lang.NoSuchMethodException: org.hibernate.ogm.datastore.mongodb.MongoDBDialect.()
Shows mismatch of version numbers.
The version of OGM you are using (4.0.0.Beta4
) is way too old considering the version of Hibernate ORM you are using (5.0.11.Final
). You should use compatible versions, because OGM depends on Hibernate ORM.
If you want to use ORM 5.0.11.Final
, then you should use OGM 5.0.4.Final
.
I would recommend upgrading to more recent versions, though; 5.0 is already one year and a half old and several versions have been published since it was first released.
Be careful though, the version number of OGM generally does not match the version number of ORM. For compatibility of more recent versions of OGM with ORM, see http://hibernate.org/ogm/releases/#compatibility-matrix.