Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Application throwing error while using org.hibernate.annotations.Entity

 
jyoti vermakat
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if I map entities with org.hibernate.annotations.Entity, my application breaks with following error during run time . But it works fine if I use javax.persistence.Entity to map entities

Error -


Currently I am using hibernate-core-3.6.9.Final and hibernate-annotations-3.5.6-Final jar in my application.

Considering that in hibernate 3.6.9 AnnotationConfiguration is deprecated and it's functionality has been included in Configuration. I am using following code to build session factory.



As for as I understand the hibernate application should work fine with org.hibernate.annotations.Entity as well as long as I am using hibernate-annotations-3.5.6-Final.

Can you please suggest what might be the possible root cause of this strange behavior ?
 
Salil Vverma
Ranch Hand
Posts: 257
Hibernate Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Jyoti,

org.hibernate.annotations.Entity has been deprecated and was planned to be removed in Hibernate 4.1. The link of same is as attached below
http://docs.jboss.org/hibernate/core/4.0/javadocs/org/hibernate/annotations/Entity.html

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic