4

こんにちは、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)
4

1 に答える 1

3

はい、これは古いバージョンを使用していることを意味します。jar を見逃したか、古いものを削除するのを忘れた可能性があります。

Glassfish で EclipseLink を更新する方法を段階的に簡単に説明します。

  1. http://www.eclipse.org/eclipselink/downloads/からEclipseLink OSGIバンドルをダウンロードします。現在のバージョンは 2.5.1 で、ダウンロードするファイルはEclipseLink 2.5.1 OSGi Bundles Zip (19 MB)
  2. 次のファイルに移動し $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
  3. ダウンロードした ZIP ファイルを開き、ファイルをフォルダに展開しますorg.eclipse.persistence(sourceこれらはソースです。おそらく必要ないでしょう)。javax.persistence_2xxx.jar$GLASSFISH_HOME/glassfish/modules

  4. Glassfish を再起動すれば完了です。
于 2013-12-28T01:01:29.563 に答える