Failed to deploy a sample Javascript HTTP adapter on MFP 8 (MobileFoundation Bluemix)

限于喜欢 提交于 2019-12-25 06:48:03

问题


I am beginning my journey into the MobileFirst Platform 8 Beta, and I would like to deploy my very first sample adapter. I am using an instance of the Mobile Foundation service on Bluemix.

When trying to deploy the sample adapter, I get the error stack below:

○ → mvn adapter:deploy -e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building SampleAdapter 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- adapter-maven-plugin:8.0.0:deploy (default-cli) @ SampleAdapter ---
[Fatal Error] :1:1: Premature end of file.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.845 s
[INFO] Finished at: 2016-05-13T15:50:57+02:00
[INFO] Final Memory: 11M/299M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.ibm.mfp:adapter-maven-plugin:8.0.0:deploy (default-cli) on project SampleAdapter: Unexpected response from http://mobilefoundation-test-server.mybluemix.net/mfpadmin/management-apis/2.0/runtimes/mfp/adapters: -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.ibm.mfp:adapter-maven-plugin:8.0.0:deploy (default-cli) on project SampleAdapter: Unexpected response from http://mobilefoundation-test-server.mybluemix.net/mfpadmin/management-apis/2.0/runtimes/mfp/adapters:

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

Caused by: org.apache.maven.plugin.MojoExecutionException: Unexpected response from http://mobilefoundation-test-server.mybluemix.net/mfpadmin/management-apis/2.0/runtimes/mfp/adapters:

at com.ibm.mfp.adapter.plugin.MfpMavenAdapterPluginDeploy.handleDeployResponse(MfpMavenAdapterPluginDeploy.java:206)
at com.ibm.mfp.adapter.plugin.MfpMavenAdapterPluginDeploy.deploy(MfpMavenAdapterPluginDeploy.java:119)
at com.ibm.mfp.adapter.plugin.MfpMavenAdapterPluginDeploy.execute(MfpMavenAdapterPluginDeploy.java:108)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207) ... 20 more

[ERROR]
[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/MojoExecutionException

Could someone please provide some help? Thanks


回答1:


It has not really failed deployment. This is a known issue that is resolved internally.

Visit your console and you will see that the adapter is there, deployed.
Alternatives:

  • Use the MobileFirst CLI (v8.0 beta) to deploy the adapter file
  • Deploy the .adapter file manually in the console


来源:https://stackoverflow.com/questions/37212283/failed-to-deploy-a-sample-javascript-http-adapter-on-mfp-8-mobilefoundation-blu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!