Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
David Mbura
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
 
dominic steward
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!
 
jatinkumar patel
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Dominic it Helped.
 
Amri Firdaus
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Dominic...it helped n it realy worked
 
Vinicius Alves
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks dominic , it worked perfectly !
 
Keertiraj Patil
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Dominic. It worked for me.
 
Roger Pack
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.
 
Dilruk Perera
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
 
Mario Schwaiger
Greenhorn
Posts: 16
  • 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...


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic