現在、Apigee と Apigee ハイブリッドのドキュメントを表示しています。
Apigee Edge のドキュメントを表示する
InvalidIndex
エラー メッセージ
Apigee UI または API を使用した API プロキシのデプロイに失敗すると、次のエラー メッセージが表示されます。
Error Saving Revision revision_number Invalid index index in KeyValueMapStepDefinition policy_name.
エラー メッセージの例
Error Saving Revision 2
Invalid index 0 in KeyValueMapStepDefinition GetKVM.
エラーのスクリーンショットの例

原因
Key Value Map Operations ポリシーの <Get> 要素に指定された index 属性がゼロまたは負の数である場合、API プロキシのデプロイは失敗します。インデックスは 1 から始まるため、ゼロまたは負の整数のインデックスは無効と見なされます。
たとえば、Key Value Map Operations ポリシーの <Get> 要素に指定された index が 0 の場合、API プロキシのデプロイは失敗します。
診断
エラーが発生した Key Value Map Operations ポリシーと無効なインデックスを特定します。この情報はエラー メッセージで確認できます。たとえば、次のエラーでは、ポリシー名は
GetKVMで、無効なインデックスは0です。Invalid index 0 in KeyValueMapStepDefinition GetKVM.エラーが発生した Key-Value Map Operations ポリシーの
<Get>要素で指定(上記のステップ 1)されたインデックスの値がエラー メッセージで表示された値と一致しているかを確認します。たとえば、次のポリシーではインデックスの値を0に指定しており、これはエラー メッセージの内容と一致します。<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <KeyValueMapOperations mapIdentifier="FooKVM" async="false" continueOnError="false" enabled="true" name="GetKVM"> <DisplayName>GetKVM</DisplayName> <ExpiryTimeInSecs>86400</ExpiryTimeInSecs> <Scope>environment</Scope> <Get assignTo="foo_variable" index="0"> <Key> <Parameter>FooKey_1</Parameter> </Key> </Get> </KeyValueMapOperations>指定されたインデックスがゼロまたは負の整数の場合、それがエラーの原因です。
上記の Key Value Map Operations ポリシーの例では、インデックスの値は
0で、無効な値です。このため、API プロキシのデプロイが失敗し、次のエラーが返されます。Invalid index 0 in KeyValueMapStepDefinition GetKVM.
解決策
Key Value Map Operations ポリシーの <Get> 要素で指定されたインデックス属性が有効となるようにします(ゼロまたは負の整数)。
上記の Key-Value Map Operations ポリシーの例を修正するには、インデックスを 1 に変更します。
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<KeyValueMapOperations mapIdentifier="FooKVM" async="false" continueOnError="false" enabled="true" name="GetKVM">
<DisplayName>GetKVM</DisplayName>
<ExpiryTimeInSecs>86400</ExpiryTimeInSecs>
<Scope>environment</Scope>
<Get assignTo="foo_variable" index="1">
<Key>
<Parameter>FooKey_1</Parameter>
</Key>
</Get>
</KeyValueMapOperations>
KeyIsMissing
エラー メッセージ
Apigee UI または API を使用した API プロキシのデプロイに失敗すると、次のエラー メッセージが表示されます。
Error Saving Revision revision_number Error occurred while validation of bean policy_name.xml Reason: - Non null value expected for element Parameter in Entry.
エラー メッセージの例
Error Saving Revision 3
Error occurred while validation of bean GetKVM.xml. Reason: - Non null value expected for element Parameter in Entry
エラーのスクリーンショットの例

原因
このエラーは、Key Value Map Operations ポリシーの <InitialEntries> 要素の <Entry> の中で、<Key> 要素が完全に欠落しているか、<Key> 要素内に <Parameter> 要素が存在しない場合に発生します。
診断
エラーが発生した Key Value Map Operations ポリシーを特定します。この情報はエラー メッセージで確認できます。たとえば、次のエラーでは、Key Value Map Operations ポリシーの名前は
GetKVMです。Error occurred while validation of bean GetKVM.xml. Reason: - Non null value expected for element Parameter in Entryエラーが発生した Key Value Map Operations ポリシーで、
<InitialEntries>の中に欠落している<Key>要素または<Parameter>要素を持つ<Entry>要素があるかどうかを確認します。<Key>要素内に<Parameter>要素がない Key Value Map Operations ポリシーの例を次に示します。<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <KeyValueMapOperations async="false" continueOnError="false" enabled="true" name="GetKVM" mapIdentifier="FooKVM"> <DisplayName>GetKVM</DisplayName> <Properties/> <ExclusiveCache>false</ExclusiveCache> <ExpiryTimeInSecs>300</ExpiryTimeInSecs> <InitialEntries> <Entry> <Key/> <Value>v1</Value> </Entry> <Entry> <Key> <Parameter>k2</Parameter> </Key> <Value>v2</Value> </Entry> </InitialEntries>この場合は、最初の要素が問題の原因となっています。
解決策
Key Value Map Operations ポリシーの <InitialEntries> 要素の中にあるすべての <Entry> 要素に <Key> 要素と <Parameter> 要素があることを確認します。
上記の Key Value Map Operations ポリシーの例を修正するには、<Parameter> 要素を追加して問題を解決します。
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<KeyValueMapOperations async="false" continueOnError="false" enabled="true" name="GetKVM" mapIdentifier="FooKVM">
<DisplayName>GetKVM</DisplayName>
<Properties/>
<ExclusiveCache>false</ExclusiveCache>
<ExpiryTimeInSecs>300</ExpiryTimeInSecs>
<InitialEntries>
<Entry>
<Key>
<Parameter>k1</Parameter>
</Key>
<Value>v1</Value>
</Entry>
<Entry>
<Key>
<Parameter>k2</Parameter>
</Key>
<Value>v2</Value>
</Entry>
</InitialEntries>
...
ValueIsMissing
エラー メッセージ
Apigee UI または API を使用した API プロキシのデプロイに失敗すると、次のエラー メッセージが表示されます。
Error Saving Revision revision_number Error occurred while validation of bean policy_name.xml. Reason: - Non null value expected for element Value in Entry.
エラー メッセージの例
Error Saving Revision 3
Error occurred while validation of bean GetKVM.xml.Reason: - Non null value expected for element Value in Entry
エラーのスクリーンショットの例

原因
このエラーは、Key Value Map Operations ポリシーの <InitialEntries> 要素の <Entry> 要素の中に <Value> 要素がない場合に発生します。
診断
エラーが発生した Key Value Map Operations ポリシーを特定します。この情報はエラー メッセージで確認できます。たとえば、次のエラーでは、Key Value Map Operations ポリシーの名前は
GetKVMです。Error occurred while validation of bean GetKVM.xml. Reason: - Non null value expected for element Value in Entryエラーが発生した Key Value Map Operations ポリシーで、
<InitialEntries>の中に欠落した<Value>要素を持つ<Entry>要素があるかどうかを確認します。<Value>要素が欠落した Key Value Map Operations ポリシーの例を次に示します。<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <KeyValueMapOperations async="false" continueOnError="false" enabled="true" name="GetKVM" mapIdentifier="testNotEncrypte"> <DisplayName>GetKVM3</DisplayName> <Properties/> <ExclusiveCache>false</ExclusiveCache> <ExpiryTimeInSecs>300</ExpiryTimeInSecs> <InitialEntries> <Entry> <Key> <Parameter>k1</Parameter> </Key> </Entry> <Entry> <Key> <Parameter>k2</Parameter> </Key> <Value>v2</Value> </Entry> </InitialEntries> ...
解決策
Key Value Map Operations ポリシーの <InitialEntries> 要素の中にあるすべての <Entry> 要素に <Value> 要素があることを確認します。
上記の Key Value Map Operations ポリシーの例を修正するには、<Value> 要素を追加して問題を解決します。
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<KeyValueMapOperations async="false" continueOnError="false" enabled="true" name="GetKVM" mapIdentifier="testNotEncrypte">
<DisplayName>GetKVM3</DisplayName>
<Properties/>
<ExclusiveCache>false</ExclusiveCache>
<ExpiryTimeInSecs>300</ExpiryTimeInSecs>
<InitialEntries>
<Entry>
<Key>
<Parameter>k1</Parameter>
</Key>
<Value>v1</Value>
</Entry>
<Entry>
<Key>
<Parameter>k2</Parameter>
</Key>
<Value>v2</Value>
</Entry>
</InitialEntries>
...