hibernate--报错

1。Exception in thread "main" java.lang.NoClassDefFoundError: javax/persistence/Cacheable

解决:
Caused by: java.lang.ClassNotFoundException: javax.persistence.Cacheable

错误原因,javax.persistence.Cacheable 是 JPA 2.0 规范中的东西!

需要加入hibernate-distribution-3.5.0-Final\lib\jpa目录下的hibernate-jpa-2.0-api-1.0.0.Final.jar



你可能感兴趣的:(java,thread,Hibernate,jpa)