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


Solutions on the web

Solution icon of stackoverflow
via Stack Overflow by Samprity Kashyap
, 5 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 Unknown author, 1 year ago
An AnnotationConfiguration instance is required to use <mapping class="com.test.dto.MyClassDTO"/>

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="example.Pojo_Stock"/>

Solution icon of web
An AnnotationConfiguration instance is required to use <mapping class="reboque.model.entities.Atendimento"/>

Solution icon of web
via javavillage.in by Unknown author, 1 year ago
An AnnotationConfiguration instance is required to use <mapping class="com.practical.Employee"/>

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

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

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, 10 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago