Hibernate配置错误(javax.persistence.Cacheable)

 在配置Hibernate时,出现如下错误

 

Java代码
  1. Caused by: java.lang.ClassNotFoundException: javax.persistence.Cacheable  
Caused by: java.lang.ClassNotFoundException: javax.persistence.Cacheable

 错误在于javax.persistence.Cacheable是JPA2.0规范中的东西,需添加

hibernate-distribution-3.5.2-Final\lib\jpa\hibernate-jpa-2.0-api-1.0.0.Final.jar

你可能感兴趣的:(Hibernate)