org.hibernate.MappingException

An AnnotationConfiguration instance is required to use <mapping class="com.model.User"/>


Solutions on the web624

Solution icon of stackoverflow
via Stack Overflow by Samprity Kashyap
, 3 months ago
An AnnotationConfiguration instance is required to use <mapping class="com.model.User"/>

Solution icon of stackoverflow
An AnnotationConfiguration instance is required to use <mapping class="helloworld.User"/>

Solution icon of stackoverflow
via Stack Overflow by abdou amer
, 1 year ago
An AnnotationConfiguration instance is required to use <mapping class="bean.Entreprise"/>

Solution icon of web
An AnnotationConfiguration instance is required to use <mapping class="com.parentco.fdr.myproject.model.UserRole"/>

Solution icon of web
An AnnotationConfiguration instance is required to use <mapping class="Atividade"/>

Solution icon of stackoverflow
An AnnotationConfiguration instance is required to use <mapping class="entities.Employee"/>

Solution icon of stackoverflow
An AnnotationConfiguration instance is required to use <mapping class="entities.Pupil"/>

Solution icon of stackoverflow
An AnnotationConfiguration instance is required to use <mapping class="example.Pojo_Stock"/>

Stack trace

  • org.hibernate.MappingException: An AnnotationConfiguration instance is required to use <mapping class="com.model.User"/> at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1606) at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1561) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1540) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1514) at org.hibernate.cfg.Configuration.configure(Configuration.java:1434) at org.hibernate.cfg.Configuration.configure(Configuration.java:1420) at com.sample.HibernateUtil.configureSessionFactory(HibernateUtil.java:26) at com.sample.HibernateUtil.<clinit>(HibernateUtil.java:20) at com.sample.App.checkUser(App.java:34)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Samebug visitor profile picture
Unknown user
2 times, 8 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago