在哪里可以找到用于 GlassFish 3.1.2 的 Eclipse JPA Facet 的“用户库”?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10729149/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where to find the "user library" for the Eclipse JPA Facet with for GlassFish 3.1.2?
提问by
I have Eclipse (Indigo) and GlassFish 3.1.2
我有 Eclipse (Indigo) 和 GlassFish 3.1.2
The "New JPA Project" wizard has the error "At least one user library must be selected." But there's nothing in the list.
“新建 JPA 项目”向导出现错误“必须至少选择一个用户库”。但是列表中没有任何内容。
Is there already a JPA implementation in the GlassFish directory, and I should create a User Library that points to it? Or should I use the download option and get the latest version of Eclipse Link from the web?
GlassFish 目录中是否已经有 JPA 实现,我应该创建一个指向它的用户库?或者我应该使用下载选项并从网上获取最新版本的 Eclipse Link?
Just wondering what is the 'right' way to make the error go away.
只是想知道使错误消失的“正确”方法是什么。
Thanks, Rob
谢谢,罗布
回答by Quentin T.
You need to have a lot of jars for JSF2.0 Project.
您需要为 JSF2.0 项目准备很多 jar。
You can use two sort of library to implement JSF2.0:
您可以使用两种库来实现 JSF2.0:
1) Mojarra
1) 莫哈拉
2) MyFaces
2) 我的脸
Read this excelent tutorial :
阅读这个优秀的教程:
In this tutorial you will understand why you need a user librabry with JSF specific library.
在本教程中,您将了解为什么需要带有 JSF 特定库的用户库。
Good reading.
好读书。
回答by george mano
回答by Mareen
Glassfish does contain required JPA implementation files. Adding following files to a user library should solve the problem.
Glassfish 确实包含所需的 JPA 实现文件。将以下文件添加到用户库应该可以解决问题。
- glassfish_dir/glassfish/modules/javax.persistence.jar
- glassfish_dir/glassfish/modules/org.eclipse.persistence.core.jar
- glassfish_dir/glassfish/modules/org.eclipse.persistence.jpa.jar
- glassfish_dir/glassfish/modules/javax.persistence.jar
- glassfish_dir/glassfish/modules/org.eclipse.persistence.core.jar
- glassfish_dir/glassfish/modules/org.eclipse.persistence.jpa.jar