如何在GlashFish 4.0中更改EclipseLink? [英] How to change EclipseLink in GlashFish 4.0?
问题描述
我想在GlashFish 4.0中将EclipseLink从2.5.0更改为2.5.1。我有下载 OSGi 包,并将下列jar文件
- org.eclipse.persistence.antlr.jar
- org.eclipse.persistence.jpa。 jar
- org.eclipse.persistence.asm.jar
- org.eclipse.persistence.jpa.modelgen.jar
- org.eclipse.persistence.core.jar
- org.eclipse.persistence.oracle.jar
- javax.persistence.jar
位于 $ GLASSFISH_HOME / glassfish / modules
。
完成此操作后,版本仍保持不变。以下代码,
String version = org.eclipse.persistence.Version.getVersion();
System.out.println(EclipseLink版本:+版本);
仍显示2.5.0版本。
< hr>
该套件不包含 eclipselink-xxxjar
。
还有什么需要改变?我使用NetBeans 7.2.1。
解决方案您忘记了一些文件,您需要完整的列表:
- org.eclipse.persistence.antlr.jar
- org.eclipse.persistence.asm.jar
- org.eclipse.persistence.core.jar
- org.eclipse.persistence.dbws.jar
- org.eclipse .persistence.jpa.jpql.jar
- org.eclipse.persistence.jpa.jar
- org.eclipse.persistence.jpa.modelgen.jar
- org.eclipse.persistence.moxy.jar
- org.eclipse.persistence.oracle.jar
- javax.persistence.jar
您不必重命名文件,您可以删除以<$ c开头的旧文件$ c> org.eclipse 并将所需文件复制到模块
文件夹中。
这应该有效。
更新:如果不起作用,您可能必须清除OSGI缓存。要做到这一点,关闭服务器并删除中的文件夹 felix
$ GLASSFISH_HOME / glassfish / domains / domain / osgi-cache /
重新启动服务器并稍等片刻必须读取OSGI模块信息才能重建缓存。
I want to change EclipseLink from 2.5.0 to 2.5.1 in GlashFish 4.0. I have downloaded the OSGi bundle and replaced the following jar files
- org.eclipse.persistence.antlr.jar
- org.eclipse.persistence.jpa.jar
- org.eclipse.persistence.asm.jar
- org.eclipse.persistence.jpa.modelgen.jar
- org.eclipse.persistence.core.jar
- org.eclipse.persistence.oracle.jar
- javax.persistence.jar
under $GLASSFISH_HOME/glassfish/modules
.
After doing this, the version still remains the same. The following code,
String version = org.eclipse.persistence.Version.getVersion();
System.out.println("EclipseLink version : " + version);
still displays the version 2.5.0.
The bundle contains no eclipselink-x.x.x.jar
.
What else is required to be changed? I'm using NetBeans 7.2.1.
You forgot some files, you need the complete list:
- org.eclipse.persistence.antlr.jar
- org.eclipse.persistence.asm.jar
- org.eclipse.persistence.core.jar
- org.eclipse.persistence.dbws.jar
- org.eclipse.persistence.jpa.jpql.jar
- org.eclipse.persistence.jpa.jar
- org.eclipse.persistence.jpa.modelgen.jar
- org.eclipse.persistence.moxy.jar
- org.eclipse.persistence.oracle.jar
- javax.persistence.jar
You don't have to rename the files, you can delete the old files starting with org.eclipse
and copy the required files to the modules
folder.
This should do the trick.
Update: If it doesn't work you may have to clear the OSGI cache. To do this shutdown the server and delete the folder felix
in
$GLASSFISH_HOME/glassfish/domains/domain/osgi-cache/
Restart the server and wait a moment, it'll have to read the OSGI module information to rebuild the cache.
这篇关于如何在GlashFish 4.0中更改EclipseLink?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!