Incompatibility between used versions of Hibernate Commons Annotations (5.1.2.Final) and Hibernate Core (6.1.7.Final)
JannisDev opened this issue · 3 comments
Describe the bug
Hello,
I am relatively new to development and have this error when starting the program. This seems to me to be triggered by adding spring-content, but I am not sure.
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.hibernate.cfg.annotations.BasicValueBinder.resolveJavaType(BasicValueBinder.java:1002)
The following method did not exist:
'java.lang.reflect.Type org.hibernate.annotations.common.reflection.ReflectionManager.toType(org.hibernate.annotations.common.reflection.XClass)'
The calling method's class, org.hibernate.cfg.annotations.BasicValueBinder, was loaded from the following location:
jar:file:/home/jannis/.gradle/caches/modules-2/files-2.1/org.hibernate.orm/hibernate-core/6.1.7.Final/343f47b34c96fe9c44bf9b219a7b3c5d6d2fc90e/hibernate-core-6.1.7.Final.jar!/org/hibernate/cfg/annotations/BasicValueBinder.class
The called method's class, org.hibernate.annotations.common.reflection.ReflectionManager, is available from the following locations:
jar:file:/home/jannis/.gradle/caches/modules-2/files-2.1/org.hibernate.common/hibernate-commons-annotations/5.1.2.Final/e59ffdbc6ad09eeb33507b39ffcf287679a498c8/hibernate-commons-annotations-5.1.2.Final.jar!/org/hibernate/annotations/common/reflection/ReflectionManager.class
jar:file:/home/jannis/.gradle/caches/modules-2/files-2.1/org.hibernate.common/hibernate-commons-annotations/6.0.6.Final/77a5f94b56d49508e0ee334751db5b78e5ccd50c/hibernate-commons-annotations-6.0.6.Final.jar!/org/hibernate/annotations/common/reflection/ReflectionManager.class
The called method's class hierarchy was loaded from the following locations:
org.hibernate.annotations.common.reflection.ReflectionManager: file:/home/jannis/.gradle/caches/modules-2/files-2.1/org.hibernate.common/hibernate-commons-annotations/5.1.2.Final/e59ffdbc6ad09eeb33507b39ffcf287679a498c8/hibernate-commons-annotations-5.1.2.Final.jar
Action:
Correct the classpath of your application so that it contains compatible versions of the classes org.hibernate.cfg.annotations.BasicValueBinder and org.hibernate.annotations.common.reflection.ReflectionManager
Process finished with exit code 1
Is this a known bug that may indicate a misconfiguration of my project or did I just write my program badly.
If this is not a bug of spring-content, I would like to apologize in advance for creating the issue.
To Reproduce
presumably by adding spring-content, but I'm not entirely sure
Additional context
I am always open to tips on how to solve future problems independently.
Thank you in advance for your help.
What version of spring boot and spring content are you attempting to use @JannisDev ?
Ping. I'd like to check which version of Spring Content you are using as I cant see where main
(3.0.x) is pulling in an older version of hibernate.
Someone else raised the same issue and was able to give me a dump of the dependencies of their app so I could see which spring content module was dragging in the older version of hibernate commons annotations. Turns out it was spring-content-fs. Also turns I had already fixed it on main which is why I was having trouble reproducing it. Next release (3.0.5) will contain the fix.