[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: 308 total views, 1 views today

308 total views, 1 views today

» Read more