• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Hibernate java.lang.ClassNotFoundException: javax.persistence.Cacheable

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello guys
I am working on a basic application with Hibernate 3.5,i m using JPA Annotations.I use Eclipse and everything running on jdk 1.6_u21.
Jar files from Hibernate are as follows


Hibernate3.jar
antlr
commons-collections
dom4j
javaassist
jta
slf4j
cglib
hibernate-annotations
ejb3-persistence
hibernate-common-annotations
log4j
slf4j-log4j12

and i am getting this exception

Thank you in advance
 
Greenhorn
Posts: 1
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had same problem.
got it solved when i used hibernate-jpa-2.0-api-1.0.0.Final found at hibernate-distribution-3.5.3-Final\lib\jpa.
PS:i was using JPA (javax.persistence.Entity) annotation
 
David Mbura
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks dominic, it worked,i appreciate it!
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Dominic it Helped.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Dominic...it helped n it realy worked
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks dominic , it worked perfectly !
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Dominic. It worked for me.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This *might* have been fixed by not deploying two separate conflicting versions of hibernate-annotations or commons jar. Maybe, I'm not sure.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks dominic It really works so any body with this same problem can try dis out
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually... For me that didn't work.

But luckily I had an old version of my pom.xml which was working. The error drove almost crazy. I stared to add more and more unnecessary libraries and always the same error:

java.lang.ClassNotFoundException: javax.persistence.NamedStoredProcedureQuery



The current version of hibernate-core is: 4.1.7.Final
But if you choose this version together with some other up-to-date jars you'll get a ClassNotFoundException. Use an older one and everything will be fine.
If you got to this page with the same troubles as I had, feel free to copy my pom...


 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!