尝试将 .wlapp 文件部署到 Tomcat 时,MobileFirst 7.0 Server 卡住了“正在部署”

Posted

技术标签:

【中文标题】尝试将 .wlapp 文件部署到 Tomcat 时,MobileFirst 7.0 Server 卡住了“正在部署”【英文标题】:MobileFirst 7.0 Server stuck "Deploying" when trying to deploy a .wlapp file to Tomcat 【发布时间】:2015-06-03 06:25:13 【问题描述】:

在成功安装和配置 MobileFirst 7.0 服务器后,当我尝试 Deploy Application => Selecting a MF studio /bin folder .wlapp file 时,我遇到了 MF 服务器卡在“正在部署”的问题。

这里有一些来自 Tomcat 日志文件的日志消息:

10614  WorklightManagementPU-mysql  INFO   [pool-2-thread-1] openjpa.Runtime - Though you are using optimistic transactions, OpenJPA is now beginning a datastore transaction because you have requested a lock on some data.
10646  WorklightManagementPU-mysql  INFO   [pool-2-thread-1] openjpa.Runtime - Though you are using optimistic transactions, OpenJPA is now beginning a datastore transaction because you have requested a lock on some data.
10682  WorklightManagementPU-mysql  INFO   [pool-2-thread-1] openjpa.Runtime - Though you are using optimistic transactions, OpenJPA is now beginning a datastore transaction because you have requested a lock on some data.

Jun 03, 2015 2:03:32 PM com.ibm.worklight.admin.actions.ApplicationDeploymentTransaction beforeAll
SEVERE: Failed to generate download links to transfer data during the deployment of applications. See the next exception in the log. Switch to direct data transfer via JMX. This is not fatal but it requires larger memory than the data transfer with download links.
Jun 03, 2015 2:03:32 PM com.ibm.worklight.admin.actions.BaseTransaction internalRun
SEVERE: BaseTransaction.internalRun() Exception
<openjpa-1.2.2-r422266:898935 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: Object "com.ibm.worklight.dataaccess.jpa.entity.ProjectEntity-com.ibm.worklight.dataaccess.jpa.entity.ProjectEntity-1" is not managed by this context.
FailedObject: com.ibm.worklight.dataaccess.jpa.entity.ProjectEntity-com.ibm.worklight.dataaccess.jpa.entity.ProjectEntity-1
    at org.apache.openjpa.persistence.EntityManagerImpl.processArgument(EntityManagerImpl.java:1216)
    at org.apache.openjpa.kernel.BrokerImpl.processArgument(BrokerImpl.java:2149)
    at org.apache.openjpa.kernel.BrokerImpl.gatherCascadeRefresh(BrokerImpl.java:2816)
    at org.apache.openjpa.kernel.BrokerImpl.refresh(BrokerImpl.java:2793)
    at org.apache.openjpa.kernel.DelegatingBroker.refresh(DelegatingBroker.java:1078)
    at org.apache.openjpa.persistence.EntityManagerImpl.refresh(EntityManagerImpl.java:688)
    at com.ibm.worklight.admin.actions.BaseTransaction.setNewProjectTransactionID(BaseTransaction.java:643)
    at com.ibm.worklight.admin.actions.BaseTransaction.internalRun(BaseTransaction.java:336)
    at com.ibm.worklight.admin.actions.BaseTransaction$1.run(BaseTransaction.java:235)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

Jun 03, 2015 2:03:32 PM com.ibm.worklight.admin.actions.BaseTransaction$1 run
SEVERE: internalRun() Exception
<openjpa-1.2.2-r422266:898935 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: Object "com.ibm.worklight.dataaccess.jpa.entity.ProjectEntity-com.ibm.worklight.dataaccess.jpa.entity.ProjectEntity-1" is not managed by this context.
FailedObject: com.ibm.worklight.dataaccess.jpa.entity.ProjectEntity-com.ibm.worklight.dataaccess.jpa.entity.ProjectEntity-1
    at org.apache.openjpa.persistence.EntityManagerImpl.processArgument(EntityManagerImpl.java:1216)
    at org.apache.openjpa.kernel.BrokerImpl.processArgument(BrokerImpl.java:2149)
    at org.apache.openjpa.kernel.BrokerImpl.gatherCascadeRefresh(BrokerImpl.java:2816)
    at org.apache.openjpa.kernel.BrokerImpl.refresh(BrokerImpl.java:2793)
    at org.apache.openjpa.kernel.DelegatingBroker.refresh(DelegatingBroker.java:1078)
    at org.apache.openjpa.persistence.EntityManagerImpl.refresh(EntityManagerImpl.java:688)
    at com.ibm.worklight.admin.actions.BaseTransaction.setNewProjectTransactionID(BaseTransaction.java:643)
    at com.ibm.worklight.admin.actions.BaseTransaction.internalRun(BaseTransaction.java:336)
    at com.ibm.worklight.admin.actions.BaseTransaction$1.run(BaseTransaction.java:235)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

Jun 03, 2015 2:04:10 PM com.worklight.core.ilmt.WorklightILMTLogger dumpLicense
INFO: FWLSE0277I: Creating an ILMT record in the file '/var/ibm/common/slm/e1178f0cf1cfd7b4017f37827cae010b.slmtag'.

【问题讨论】:

您的.wlapp 文件有多大? @AndrewFerrier 小于 1mb 好的。我注意到您提到了 Tomcat,但看起来您使用的是 MFP 7.0。 MFP 使用 WebSphere Liberty 已经有一段时间了,而不是 Tomcat。你能澄清一下吗? 对不起,让我撤回最后的声明。我以为你说的是​​嵌入式 MFP 开发服务器。 这听起来确实像错误建议修复:“切换到通过 JMX 直接数据传输。”你调查过吗? 【参考方案1】:

最后通过设置解决了这个问题

max_allowed_packet = 30M 

binlog_format = mixed

在mysql的my.cnf文件中。

【讨论】:

我有同样的问题,但在 eclipse 工作室。有没有办法像这样解决?

以上是关于尝试将 .wlapp 文件部署到 Tomcat 时,MobileFirst 7.0 Server 卡住了“正在部署”的主要内容,如果未能解决你的问题,请参考以下文章

使用固定 IP 运行 Worklight 部署服务器以生成 War/Wlapp/.adapter 文件?

Worklight 6.2 wlapp 部署给出错误 java 堆空间

将 WAR 部署到 Tomcat(Spring Boot + Angular)

在 Worklight 中部署 Worklight 适配器失败

安装 WL 应用程序时“无法获得锁”

部署 WAR 文件会在 Tomcat 上给我一个 404 状态码?