如何为Weblogic 10.3.6启用Java Persistence 2.0 [英] How to Enable Java Persistence 2.0 for Weblogic 10.3.6
问题描述
我将eclipse与weblogic服务器一起使用.为了将项目添加到weblogic服务器,它需要支持Java Persistance 2.0,但是在尝试安装它时,我一直收到此消息
I am using eclipse with weblogic server. In order to add the project to the weblogic server, it needs to support Java Persistance 2.0, however when trying to install it, I keep getting this message
在Weblogic Server安装中启用Java Persistence 2.0时出错
Error Enabling Java Persistence 2.0 in Weblogic Server installation
我试图遵循Oracle文档来解决此问题,但是由于我对Weblogic还是个新手,所以它们没有任何意义.
I tried to follow the Oracle documents to solve this but they make no sense since I'm pretty novice with Weblogic.
http://docs.oracle.com/cd/E17904_01/web.1111/e13720/using_toplink.htm#CIHDJHHI
请帮助!我理解了手册的第二部分,但我不知道如何配置此Top Link内容.任何帮助是极大的赞赏.谢谢!
Please help! I understand the second part of the manual but I have no idea how to configure this Top Link stuff. Any help is greatly appreciated. Thank you!
推荐答案
我已使用您引用的Oracle文档中手动安装"步骤的变体在基于Unix的系统上启用了JPA 2.0.关键是在类路径的开头添加两个JPA jar.就我而言,我们希望对域中的单个受管服务器提供JPA 2.0支持,因此我在setDomainEnv.sh脚本的开头添加了以下技巧:
I have enabled JPA 2.0 on a Unix-based system using a variation on the 'Installing Manually' steps in the Oracle doc you referenced. The key is to add the two JPA jars at the beginning of the classpath. In my case, we wanted JPA 2.0 support for a single managed server in the domain, so I added the following hack at the beginning of the setDomainEnv.sh script:
if [ "${SERVER_NAME}" = "TEST_Server1" ] ; then
JPA20="path/modules/javax.persistence_1.1.0.0_2-0.jar${CLASSPATHSEP}path/modules/com.oracle.jpa2support_1.0.0.0_2-1.jar"
if [ "${PRE_CLASSPATH}" != "" ] ; then
PRE_CLASSPATH="${JPA20}${CLASSPATHSEP}${PRE_CLASSPATH}"
export PRE_CLASSPATH
else
PRE_CLASSPATH="${JPA20}"
export PRE_CLASSPATH
fi
fi
调整TEST_Server1
名称(或仅删除if)和path
符合您的环境的参考.
Adjust the TEST_Server1
name (or just remove the if) and path
references to align with your environment.
这篇关于如何为Weblogic 10.3.6启用Java Persistence 2.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!