Hibernate 5 and entity mapping error

It could happen when you use Hibernate 5, that you will get entity not found error.
Exception in thread "main" org.hibernate.MappingException: Unknown entity: com...
Surprise, cause mapping is declared in hibernate.cfg.xml.
The problem can be fixed by creating session factory in other way:
 
SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();

Comments

Popular posts from this blog

Install Kubeflow locally

RabbitMQ and OpenShift