gpt4 book ai didi

netbeans - 在 Netbeans 中升级 eclipselink 2.4

转载 作者:行者123 更新时间:2023-12-01 02:28:04 27 4
gpt4 key购买 nike

嗨,我将 Eclipse 链接升级到 2.4。但我得到了这个输出。
我很关心这条消息:“(Eclipse Persistence Services - 2.3.0.v20110604-r9504)”

这是否意味着我再次使用 2.3 库?

In-place deployment at /Users/danielrojas/Dropbox/ToursysFunctional/build/web
Initializing...
deploy?DEFAULT=/Users/danielrojas/Dropbox/ToursysFunctional/build/web&name=Toursys& contextroot=/Toursys&force=true failed on GlassFish Server 3.x
Error occurred during deployment: Exception while preparing the app : Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [WebApplication1PU] failed.
Internal Exception: Exception [EclipseLink-7220] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.ValidationException
Exception Description: The @JoinColumns on the annotated element [field userRoles] from the entity class [class jpa.Users] is incomplete. When the source entity class uses a composite primary key, a @JoinColumn must be specified for each join column using the @JoinColumns. Both the name and the referencedColumnName elements must be specified in each such @JoinColumn.. Please see server.log for more details.
/Users/danielrojas/Dropbox/ToursysFunctional/nbproject/build-impl.xml:1035: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 2 seconds)

最佳答案

是的,这意味着您使用的是旧版本。您可能错过了一个 jar 或忘记删除旧的。

以下是如何在 Glassfish 中更新 EclipseLink 的简短分步说明:

  • http://www.eclipse.org/eclipselink/downloads/ 下载 EclipseLink OSGI 包.当前版本是 2.5.1,您要下载的文件是 EclipseLink 2.5.1 OSGi Bundles Zip (19 MB)
  • 转至 $GLASSFISH_HOME/glassfish/modules并删除以下文件:
  • 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
  • 打开下载的 ZIP 文件并提取以 org.eclipse.persistence 开头的所有内容但不包含 source (这些是来源,您可能不需要它们)和文件 javax.persistence_2xxx.jar到文件夹 $GLASSFISH_HOME/glassfish/modules
  • 重新启动 Glassfish 就完成了。
  • 关于netbeans - 在 Netbeans 中升级 eclipselink 2.4,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14857967/

    27 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com