org.hibernate.UnknownEntityTypeException: Unable to locate persister
I hate Hibernate with a passion!If you have ever tried another ORM, like the great DBI-Class, you probably feel the same.
Anyway, while restoring a Java project from my hard disk, that faulted on the last week, I find this strange exception:
org.hibernate.UnknownEntityTypeException: Unable to locate persister
Searching the web did not helped me in finding a solution.
Finally, I made a little change in Eclipse: I set the JPA Project property and immediatly Eclipse did its job and highlighted a problem in my
persistence.xml
file.
My mapping had a *typo in the package name of a few entities, and thus there was no correspondency between the class names and the mapped entities.**
Summary: the mapping was corrupted, maybe I restored a wrong checkout, and that prevented Hibernate to map the class. Of course, it could have helped a lot more to get information along the stack trace.