PersistenceUnit [appcenterdb-oracle]的预部署失败

时间:2015-07-27 15:46:28

标签: ibm-mobilefirst

我在RHEL 6上安装了以下内容 (1)MFP63 (2)MySQL56
(3)WAS 8.5.5.6

并尝试设置我的第一个移动第一个项目但是' messages.log'有以下错误

I FFDC1015I: An FFDC Incident has been created: "javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.6.0.WAS-v20150513-26196d2): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [appcenterdb-oracle] failed.
Internal Exception: Exception [EclipseLink-7157] (Eclipse Persistence Services - 2.6.0.WAS-v20150513-26196d2): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Entity class [class com.ibm.puremeap.jpa.entity.PushBatchDeviceEntity] must use a @JoinColumn instead of @Column to map its relationship attribute [device]. com.ibm.ws.jpa.management.JPAPUnitInfo.createEMFactory 759" at ffdc_15.07.27_21.00.27.0.log
[7/27/15 21:00:27:238 IST] 00000068 com.ibm.ws.jpa.management.JPAPUnitInfo                       E 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 appcenterdb-oracle persistence unit. The following error occurred: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.6.0.WAS-v20150513-26196d2): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [appcenterdb-oracle] failed.
Internal Exception: Exception [EclipseLink-7157] (Eclipse Persistence Services - 2.6.0.WAS-v20150513-26196d2): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Entity class [class com.ibm.puremeap.jpa.entity.PushBatchDeviceEntity] must use a @JoinColumn instead of @Column to map its relationship attribute [device].

消息说' PersistenceUnit的预部署[appcenterdb-oracle]失败了'但我正在使用MySQL' MySQL'而不是' oracle'这让我有点困惑

我正在使用Java 8(使用JDK6和7我正面临其他问题)

http://pastebin.com/WcWBUjVn(server.xml) http://pastebin.com/QzByZ63T(messages.log)

由于 Sathish Kumar

3 个答案:

答案 0 :(得分:1)

@Sathish,在您上传的server.xml中,我可以看到这些功能

<feature>javaee-7.0</feature>
  <feature>servlet-3.1</feature>
  <feature>jdbc-4.1</feature>

MobileFirst Ant任务或服务器配置工具未安装最后两个功能。 这让我想你在安装过程之后手动更改了它们,因为你使用的是不受支持的Liberty配置文件样式    WAS Liberty V8.5.5.6 with Java EE 7 Web Profile WAS Liberty V8.5.5.6 with Java EE 7 Full Platform 它没有提供预期的功能servlet-3.0和jdbc-4.0,而是servlet-3.1和jdbc-4.1。

实际上,MFP 6.3仅支持MFP 6.3仅支持WebSphere Application Server Liberty Core http://www-969.ibm.com/software/reports/compatibility/clarity-reports/report/html/prereqsForProduct?deliverableId=1404132386734#! 其中包含

您可以从FixCentral网站获取 http://www-933.ibm.com/support/fixcentral/

在选择产品标签上,选择
产品组:WebSphere
从WebSphere中选择:WebSphere Application Server
已安装版本:8.5.5.6
平台:全部
然后选择
单个修订ID:wlp-core-runtime-8.5.5.6

答案 1 :(得分:1)

总共有三个问题:

  1. 您正在将Java 8与不支持它的MobileFirst Foundation版本一起使用。 system requirements of MobileFirst Foundation 7.0状态仅支持Java 6和Java 7。在您的第一个messages.log中可以看到症状:它是例外java.lang.IllegalStateException: Context namespace element 'annotation-config' and its parser class [org.springframework.context.annotation.AnnotationConfigBeanDefinitionParser] are only available on JDK 1.5 and higher

  2. 您的server.xml包含两个元素<application id="worklightconsole" name="worklightconsole" location="worklightconsole.war" type="war">。也就是说,您有两个具有相同ID,相同名称和相同上下文根的Web应用程序。这永远不会奏效。原因显然是您将worklightconsole.war作为参数传递给&lt; configureApplicationServer&gt;。相反,如Deploying the project WAR file中所述,您指定的WAR文件应该是MobileFirst项目WAR文件,通过MobileFirst Studio或通过&lt; war-builder&gt;构建。 Ant任务。

  3. 第二个messages.log文件包含日志消息

    FWLSE2008I: MBean registration succeeded for: com.worklight.common.server.jmx.api:type=WorklightAdmin,qualifier=worklightadmin
    FWLSE2008I: MBean registration succeeded for: com.worklight.common.server.jmx.api:type=ProjectManagement_simpleServer,qualifier=worklightconsole [project worklightconsole]
    
    第一个显示空的环境ID,而第二个显示环境ID&#34; simpleServer&#34;。此环境标识在server.xml文件中也可见:
    <jndiEntry jndiName="worklightconsole/ibm.worklight.admin.environmentid" value='"simpleServer"'/>
    但根据documentation of <configureApplicationServer>,您应该在两种情况下都传递相同的环境ID值。

答案 2 :(得分:0)

由于'slowhand'提示问题是'server.xml',因为多个'application id'具有相同的名称

看来'ant'任务没有正确生成所有标签,我做了一些修正以使其工作

由于 Sathish Kumar