Forums Register Login

org.hibernate.AnnotationException

+Pie Number of slices to send: Send
I am following a tutorial of Hibernate with Spring. I am trying to add a User object to the database. I am getting the following error: "org.hibernate.AnnotationException: Unknown mappedBy in:  com.infiniteskills.data.entities.User.credential, referenced property unknown: com.infiniteskills.data.entities.Credential.user
"
These are my classes


This is pom.xml
1
+Pie Number of slices to send: Send
All classes must be set in the configuration.

I was missing: "configuration.addAnnotatedClass(Transaction.class);".
My honeysuckle is blooming this year! Now to fertilize this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 724 times.
Similar Threads
Errors outputing data from database mysql
java.lang.NoSuchMethodError
Problem writing to a Database in Spring MVC, Code 500, Null pointer exception occurred
Error creating bean 'org.spring....PersistenceExceptionTranslationPostProcessor#0'
java.lang.IncompatibleClassChangeError (Injecting DAO & Entity Manager)
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 09:46:42.