MFP8.0 适配器部署失败

Posted

技术标签:

【中文标题】MFP8.0 适配器部署失败【英文标题】:MFP8.0 Adapter deploy failed 【发布时间】:2017-03-28 16:49:18 【问题描述】:

我们将开发工具包和 QA 环境更新为产品版本 8.0.0.00-20170220-1900。我们尝试使用 MFP CLI 构建适配器并将适配器部署到远程服务器。但是部署到服务器失败并出现 MAVEN 插件错误。

日志:

[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model 

for metlife:NotificationsAdapter:adapter:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for com.ibm.mfp:adapter-maven-plugin is missing. @ line 44, column 12
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building NotificationsAdapter 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- adapter-maven-plugin:8.0.2017021701:deploy (default-cli) @ NotificationsAdapter ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.824 s
[INFO] Finished at: 2017-03-28T12:36:16-04:00
[INFO] Final Memory: 10M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.ibm.mfp:adapter-maven-plugin:8.0.2017021701:deploy (default-cli) on project NotificationsAdapter: Execution default-cli of goal com.ibm.mfp:adapter-maven-plugin:8.0.2017021701:deploy failed: A required class was missing while executing com.ibm.mfp:adapter-maven-plugin:8.0.2017021701:deploy: org/apache/commons/logging/LogFactory
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>com.ibm.mfp:adapter-maven-plugin:8.0.2017021701
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/var/root/.m2/repository/com/ibm/mfp/adapter-maven-plugin/8.0.2017021701/adapter-maven-plugin-8.0.2017021701.jar
[ERROR] urls[1] = file:/var/root/.m2/repository/org/apache/httpcomponents/httpclient-osgi/4.3.4/httpclient-osgi-4.3.4.jar
[ERROR] urls[2] = file:/var/root/.m2/repository/org/apache/httpcomponents/httpclient/4.3.4/httpclient-4.3.4.jar
[ERROR] urls[3] = file:/var/root/.m2/repository/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar
[ERROR] urls[4] = file:/var/root/.m2/repository/commons-codec/commons-codec/1.6/commons-codec-1.6.jar
[ERROR] urls[5] = file:/var/root/.m2/repository/org/apache/httpcomponents/httpmime/4.3.4/httpmime-4.3.4.jar
[ERROR] urls[6] = file:/var/root/.m2/repository/org/apache/httpcomponents/httpclient-cache/4.3.4/httpclient-cache-4.3.4.jar
[ERROR] urls[7] = file:/var/root/.m2/repository/org/apache/httpcomponents/fluent-hc/4.3.4/fluent-hc-4.3.4.jar
[ERROR] urls[8] = file:/var/root/.m2/repository/org/apache/httpcomponents/httpcore-osgi/4.3.2/httpcore-osgi-4.3.2.jar
[ERROR] urls[9] = file:/var/root/.m2/repository/org/apache/httpcomponents/httpcore-nio/4.3.2/httpcore-nio-4.3.2.jar
[ERROR] urls[10] = file:/var/root/.m2/repository/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar
[ERROR] urls[11] = file:/var/root/.m2/repository/javax/xml/jaxp-api/1.4.2/jaxp-api-1.4.2.jar
[ERROR] urls[12] = file:/var/root/.m2/repository/org/mozilla/rhino/1.7R4/rhino-1.7R4.jar
[ERROR] urls[13] = file:/var/root/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[project>metlife:NotificationsAdapter:1.0-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]
[ERROR] 
[ERROR] -----------------------------------------------------: org.apache.commons.logging.LogFactory
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException

Error deploying adapter: NotificationsAdapter

【问题讨论】:

这个问题是特定于这个适配器的还是常见的? 看起来构建成功了。您是否能够通过控制台手动成功部署适配器,并按预期工作?它确实看起来好像找不到LogFactory,但列出了应该包含它的jar... 【参考方案1】:

如果您可以成功构建,请尝试从操作控制台手动部署。

【讨论】:

【参考方案2】:

从 MFP 控制台尝试部署适配器:您的问题得到解决。

【讨论】:

以上是关于MFP8.0 适配器部署失败的主要内容,如果未能解决你的问题,请参考以下文章

创建 MFP 适配器时出错

在 Worklight 中部署 Worklight 适配器失败

IBM MFP 适配器部署失败

部署 IBM Mobile v8.0.0 MobileFirst HTTP Adater 错误 - “适配器部署失败:检测到数据库错误。”

适配器部署失败 IBM Worklight 6.0

面对 MFP 控制台错误 FWLSE0325:运行时同步失败,如何从数据库中取消部署移动适配器