[b][color=red][size=medium]1。Exception in thread "main" java.lang.NoClassDefFoundError: javax/persistence/Cacheable
[/size][/color][/b]
[size=medium][color=blue]解决:[/color][/size]
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
[/size][/color][/b]
[size=medium][color=blue]解决:[/color][/size]
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
本文解决了在使用JPA 2.0时遇到的javax.persistence.Cacheable找不到定义的问题,通过添加hibernate-jpa-2.0-api-1.0.0.Final.jar到项目中成功解决了NoClassDefFoundError异常。
1112

被折叠的 条评论
为什么被折叠?



