1

我一直在尝试运行一个在 IBM Websphere Liberty Server 上 用作提供程序的JPA应用程序。EclipseLink 2.5.1JPA

我面临以下异常:

[ERROR   ] CWWJP0015E: An error occurred in the org.eclipse.persistence.jpa.PersistenceProvider persistence provider when it attempted to create the container entity manager factory for the XXXXX persistence unit. The following error occurred: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [XXXXXX] failed.
Internal Exception: Exception [EclipseLink-28006] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: ClassNotFound: [WebSphere_Liberty] specified in [eclipselink.target-server] property.
Internal Exception: java.lang.ClassNotFoundException: WebSphere_Liberty

由于我的应用程序包含自己的 JPA EclipseLink JARS jar,因此我只启用了<feature>jpaContainer-2.1</feature>

这是我的 POM.xml:

<dependency>
  <groupId>org.eclipse.persistence</groupId>
  <artifactId>eclipselink</artifactId>
</dependency>
<dependency>
  <groupId>org.eclipse.persistence</groupId>
  <artifactId>org.eclipse.persistence.jpa.modelgen.processor</artifactId>      
</dependency>

如果有人遇到过这种情况,请帮助我。

4

1 回答 1

1

我只是在自己设置这个过程中,看来,你也必须定义一个铃铛(对我来说,我正在尝试休眠,可能只是用 eclipselink 替换):

在 server.xml 中

<feature>jpaContainer-2.1</feature>
<feature>bells-1.0</feature>
.
.
.
<bell libraryRef="hibernate" />
<!-- Include all of the hibernate jars in a shared lib -->
<library id="hibernate">
   <fileset dir="${server.config.dir}/hibernate/" includes="*.jar" />
</library>

因此,您实际上必须将这些 jar 组装到正确的文件夹中,然后将您的铃铛指向 libs 目录。

于 2018-01-22T14:05:02.797 回答