I am using hibernate annotations and when I do following everything works fine
sessionFactory = new AnnotationConfiguration()
.addPackage("istreamcloudframework.objectmodel.member")
.addAnnotatedClass(User.class)
.buildSessionFactory();
but I wanted to avoid specifying all the classes in this manner so I tried taking that into hibernate config file in following manner,
mapping package="istreamcloudframework.objectmodel.member"
mapping class="istreamcloudframework.objectmodel.member.User"
I get following error,
org.hibernate.MappingException: Unknown entity: istreamcloudframework.objectmodel.member.User
Whats going wrong over here?
P.S: I have checked all the annotation imports and its not org.hibernate.annotations.Entity. I am using javax.persistence. imports; *