Skip to main content

Posts

Showing posts from January, 2015

SessionFactory creation failed.org.hibernate.MappingException: An AnnotationConfiguration

You might have encountered this exception while mapping your POJO classes to tables in hibernate. Exception: SessionFactory creation failed. org . hibernate . MappingException : An AnnotationConfiguration instance is required to use <mapping class= "com.javacodegeeks.enterprise.hibernate.Student" /> Exception in thread "main" java. lang . ExceptionInInitializerError at com. javacodegeeks . enterprise . hibernate . utils . HibernateUtil . buildSessionFactory (HibernateUtil. java : 17 ) at com. javacodegeeks . enterprise . hibernate . utils . HibernateUtil .<clinit>(HibernateUtil. java : 8 ) at com. javacodegeeks . enterprise . hibernate . Test . main (Test. java : 14 ) Caused by: org. hibernate . MappingException : An AnnotationConfiguration instance is required to use <mapping class= "com.javacodegeeks.enterprise.hibernate.Student" /> at org. hibernate . cfg . Configuration . parseMappingElement (Configuration. j...