[solved] an annotationconfiguration instance is required to use mapping class

An annotationconfiguration instance is required to use mapping class Error: an annotationconfiguration instance is required to use mapping class Solution: 1. Ensure you have hibernate-annotations.jar file 2. Create the sessionfactory using new AnnotationConfiguration() not using new Configuration(). Eg: SessionFactory hibernateConfig1 = new AnnotationConfiguration().configure(“hibernate1.cfg.xml”).buildSessionFactory(); Recommended Books: 231 total views, 2 views today

231 total views, 2 views today

» Read more