我一直在尝试运行JPA
应用程序,该应用程序在IBM Websphere Liberty Server上使用EclipseLink 2.5.1
作为JPA
提供程序。
我面临以下异常:
[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>
如果有人遇到过这种情况,请帮助我。
答案 0 :(得分: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>
所以,你实际上必须将这些罐子组装到正确的文件夹中,然后将你的钟指向libs目录。