Exception in thread "main" java.lang.NoClassDefFoundError:javax.persistence.Cacheableeven though you have added the required libraries that comes with the Hibernate distribution final 3.5 as well as ejb3-persistence.jar.
The reason for this javax.persistence.Cacheable is part of JPA 2.0 specification. To overcome this issue, you need to add the following JAR file hibernate-jpa-2.0-api-1.0.0.Final.jar, which will be available under /lib/jpa directory in Hibernate distribution.
Happy programming
Thanks!
ReplyDeleteThank you! You just saved me so much time!
ReplyDeleteThanks Ramanujam. You saved my hours of work because I was trying with several version of *.jar files in my Eclipse IDE.
ReplyDeleteGood work !
thx alot :)
ReplyDeleteI LOVE YOU :D
ReplyDelete