导入javax.persistence无法解析 [英] The import javax.persistence cannot be resolved

查看:1283
本文介绍了导入javax.persistence无法解析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在从事一个项目,该项目要求javax.persistence包中的EntityManager EntityManagerFacotry和Persistence都需要.它似乎是用于数据库服务的,但是当前的代码没有得到很好的记录.通过搜索谷歌,似乎应该有一个与此伴随的xml文件,但是其中一个都不是.我想我的问题就是,如何解决这些未解决的进口问题?我是否必须在构建路径中添加另一个jar?似乎我不需要,因为它从1.5开始就存在.

I'm currently working on a project that requires EntityManager EntityManagerFacotry and Persistence each from the javax.persistence package. It seems to be for the database service, but the current code is not very well documented. By searching google it seems that there should be an xml file that comes along with this, but there isn't one of those either. I guess my question is simply how do I make these unresolved imports go away? Do I have to add another jar to the build path? It seems that I shouldn't have to since it's been around since 1.5.

非常感谢您的帮助.

推荐答案

hibernate-distribution-3.6.10.Final \ lib \ jpa:添加此jar即可解决此问题.在lib文件夹中,您有一个名为jpa --->的文件夹,其中您有hibernate-jpa-2.0-1.0.1.Final jar

hibernate-distribution-3.6.10.Final\lib\jpa : Add this jar to solve the issue. It is present in lib folder inside that you have a folder called jpa ---> inside that you have hibernate-jpa-2.0-1.0.1.Final jar

这篇关于导入javax.persistence无法解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆