API 自動検出設定時のデプロイメントエラー

API 自動検出用に Mule ゲートウェイを設定すると、次の「failed to deploy artifact (アーティファクトのデプロイに失敗しました)」というエラーが表示される場合があります。

org.mule.runtime.deployment.model.api.DeploymentException: Failed to deploy artifact [accounts]
Caused by: org.mule.runtime.api.exception.MuleRuntimeException: org.mule.runtime.deployment.model.api.DeploymentInitException: PropertyNotFoundException: Couldn't find configuration property
value for key ${apiId} from properties provider Domain properties - within
resolver Deployment properties trying to process key apiId - within
resolver global-properties configuration attributes trying to process key apiId - within resolver environment properties provider trying to process key apiId - within resolver Deployment properties trying to process key apiId - within resolver External files trying to process key apiId - within resolver Deployment properties trying to process key apiId
text

原因

この問題は、​config.properties​ ファイルに ​apiId​ プロパティを追加せず、​api-gateway:autodiscovery​ 要素で ​apiId​ 属性の値の変更に失敗した場合に発生します。自動検出プロセスは、API Manager の特定のインスタンスで実行されます。そのため、​long​ 型の有効な ​apiId​ を指定する必要があります。

API Manager を介してプロキシアプリケーションをデプロイした場合、または自動生成されたプロキシをダウンロードした場合、この設定は自動的に定義されます。

解決策

この問題を解決する手順は、次のとおりです。

  1. config.properties ファイルに移動し、次のプロパティと値のペアを追加します。

    apiId=[your-specific-value]
    text
  2. <api-gateway:autodiscovery> 要素で、​apiID​ 属性を config.properties ファイルの ​apiId​ プロパティに設定します。

    apiId=${apiId}
    text