Getting MissingProtocolInURL error

Not applicable

I have copied a API repo from on-premise to AWS CodeCommit. While on on-premise, I am able to deploy the API to apigee using maven plugin. But after copying it to AWS, I am unable to deploy the same code to apigee using maven. It throws the following error:

accept: application/json

accept-encoding: gzip

authorization: Basic [Not shown in log]

content-type: application/octet-stream

[Request body contains data, not shown]

[ERROR] 400 Bad Request

{

"code" : "messaging.config.beans.ProtocolMissingInURL",

"message" : "Target Target providers: Protocol is missing in FROM CONFIG.JSON",

"contexts" : [ ]

}

[ERROR]

* * * * * * * * * * *

This deployment could have failed for a variety of reasons.

* * * * * * * * * * *

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 21.113 s

[INFO] Finished at: 2017-04-26T01:52:01-07:00

[INFO] Final Memory: 13M/155M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.0.1:deploy (default-cli) on project providers: MojoExecutionException: 400 Bad Request

[ERROR] {

[ERROR] "code" : "messaging.config.beans.ProtocolMissingInURL",

[ERROR] "message" : "Target Target providers: Protocol is missing in FROM CONFIG.JSON",

[ERROR] "contexts" : [ ]

[ERROR] }

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

1 1 823
1 REPLY 1

Not applicable

It seems as if the target was missing the protocol. Can you confirm that you have something like this?

You can find more details about config.json here.

"targets": [
                {
                    "name": "default.xml",
                    "tokens": [
                        {
                            "xpath": "/TargetEndpoint/HTTPTargetConnection/URL",
                            "value": "http://weather.yahooapis.com"
                        }
                    ]
                }
            ]