IBM / Ionic-MFP-App

This repository contains instructions to develop a secure, enterprise-grade Ionic/Cordova based hybrid mobile app that connects to CouchDB/Cloudant and ObjectStorage via IBM Mobile Foundation service.
https://developer.ibm.com/patterns/develop-hybrid-mobile-app-with-cloud-native-back-end/
Apache License 2.0
15 stars 25 forks source link

Can't deploy MyWardData: Unexpected Response, [Help 1] #25

Open schmiderific opened 6 years ago

schmiderific commented 6 years ago

I'm getting the below error trying to deploy MyWardData. It builds fine.

Ionic version: 4.1.2 MFP version: 8.0.0-2018040312 npm version: 3.10.10 git version: 2.15.2 (Apple Git-101.1)

Maven, etc version: Maven home: /usr/local/Cellar/maven/3.5.4/libexec Java version: 1.8.0_152, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/jre Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x", version: "10.13.6", arch: "x86_64", family: "mac"

ERROR: $ mfpdev adapter deploy Verifying server configuration... Deploying adapter to runtime mfp on https://mobilefoundation-myward2e-server.mybluemix.net:443/mfpadmin...

[INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for com.sample:MyWardData:adapter:1.0-SNAPSHOT [WARNING] 'build.plugins.plugin.version' for com.ibm.mfp:adapter-maven-plugin is missing. @ line 68, 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] -----------------------< com.sample:MyWardData >------------------------ [INFO] Building MyWardData 1.0-SNAPSHOT [INFO] ------------------------------[ adapter ]------------------------------- [INFO] [INFO] --- adapter-maven-plugin:8.0.2018082311:deploy (default-cli) @ MyWardData --- [ERROR] logger.changeStateDeploymentException: FWLSE0321: State change failure. Caused by: java.lang.RuntimeException: User code thrown exception: java.lang.Exception: Unable to connect to Cloudant DB, check the configuration. at com.sample.CloudantJavaApplication.init(CloudantJavaApplication.java:58) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 17.424 s [INFO] Finished at: 2018-09-29T10:31:51-04:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.ibm.mfp:adapter-maven-plugin:8.0.2018082311:deploy (default-cli) on project MyWardData: Unexpected response from https://mobilefoundation-myward2e-server.mybluemix.net:443/mfpadmin/management-apis/2.0/runtimes/mfp/adapters -> [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/MojoExecutionException

Error deploying adapter undefined Error: An error occurred during an attempt to deploy the adapter. See the preceding messages for details.

stevemar commented 6 years ago

@shivahr FYI

dselvara commented 6 years ago

Can you please confirm if you have added the Cloudant connection details in the adapter.xml file. (MyWardData/src/main/adapter-resources/adapter.xml)

The instructions on how to add these details are avaliable here - https://github.com/IBM/Ionic-MFP-App#53-specify-cloudant-credentials-in-mfp-adapter. If you have added the details and still have a problem, please share the adapter.xml file.