0

我正在使用 glassfish 4 部署我的应用程序,但遇到以下错误:

can not Deploy myapplication
deploy is failing = Error occurred during deployment: Exception while deploying the app [MyApplication]: Exception [EclipseLink-28019] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Deployment of PersistenceUnit [PU] failed. Close all factories for this PersistenceUnit.
Internal Exception: Exception [EclipseLink-0] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.IntegrityException
Descriptor Exceptions:
-------------------------------------------------- -------

Runtime Exceptions:
-------------------------------------------------- -------

java.lang.NullPointerException
. Please see server.log for more details.

并且还无法理解此问题的原因或解决方案。细节是我正在使用以下依赖JPA实现:

依赖 groupId> org.eclipse.persistence groupId artifactId eclipselink artifactId version> 2.4.0 版本依赖

和 javax.persistence-2.0.4.v201112161009.jar

4

2 回答 2

0

我遇到此错误的一种情况是,当有一个抽象 JPA 实体下面没有具体类时。确保扩展所有抽象 JPA 实体以创建具体的 JPA 实体。

于 2014-05-24T19:34:50.687 回答
0

将 eclipselink 从 2.6.5 升级到 2.7 时,我遇到了类似的问题。

因为,我的 POM.xml 在下面有一行,我不得不将其删除,只需将新版本添加到 2.7.4 即可将artifactId eclipselink链接到最新版本并且问题已修复。

   <dependency>
        <groupId>org.eclipse.persistence</groupId>
        <artifactId>org.eclipse.persistence.jpa.modelgen.processor</artifactId>
        <version>2.6.5</version>
        <scope>provided</scope>
    </dependency>
于 2019-02-27T10:03:56.187 回答