<ph type="x-smartling-placeholder"></ph>
現在、Apigee Edge のドキュメントが表示されています。
Apigee X のドキュメント。 詳細
InvalidRegularExpression
エラー メッセージ
Edge UI または Edge 管理 API を使用した API プロキシのデプロイに失敗すると、次のエラー メッセージが表示されます。
Error Deploying Revision revision_number to environment RegularExpressionProtection policy_name: Invalid Regular Expression com.apigee.steps.regexprotection.RegularExpressionProtectionBean$RegexPattern@f4ecb23, Context Revision:revision_number;APIProxy:RegexThreat;Organization:organization;Environment:environment.
エラー メッセージの例
Error Deploying Revision 1 to test RegularExpressionProtection Regular-Expression-Protection-1: Invalid Regular Expression com.apigee.steps.regexprotection.RegularExpressionProtectionBean$RegexPattern@f4ecb23, Context Revision:1;APIProxy:RegexThreat;Organization:myorg;Environment:test.
エラーのスクリーンショットの例

原因
RegularExpressionProtection ポリシーの <Pattern> 要素の正規表現が有効でない場合、API プロキシのデプロイは失敗します。
診断
エラー メッセージから RegularExpressionProtection ポリシーの名前を特定します。たとえば、次のエラーでは、RegularExpressionProtection ポリシーの名前は
Regular-Expression-Protection-1:です。Error Deploying Revision 1 to test RegularExpressionProtection Regular-Expression-Protection-1: Invalid Regular Expression com.apigee.steps.regexprotection.RegularExpressionProtectionBean$RegexPattern@f4ecb23, Context Revision:1;APIProxy:RegexThreat;Organization:myorg;Environment:test.
失敗した Regular Expression Protection ポリシーの XML に含まれる
<Pattern>要素をすべて調べます。その<Pattern>要素に無効な正規表現があるかどうかを確認します。<Pattern>要素のいずれかに無効な正規表現がある場合は、それがエラーの原因です。たとえば、次のポリシーでは、無効な正規表現とみなされる
foo){2}がPattern>の値に指定されています。<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <RegularExpressionProtection async="false" continueOnError="false" enabled="true" name="Regular-Expression-Protection-1"> <DisplayName>Regular Expression Protection-1</DisplayName> <Properties/> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> <URIPath> <Pattern>foo){2}</Pattern> </URIPath> <Source>request</Source> </RegularExpressionProtection>上記の例では、
<Pattern>で指定された正規表現に開始かっこがありません。そのため、無効な正規表現とみなされます。API プロキシのデプロイは失敗します。
解決策
RegularExpressionProtection ポリシー内の各 <Pattern> 要素に有効な正規表現が使われていることを確認してください。正規表現をデバッグするためのさまざまなオンラインまたはオフラインの正規表現ツールを検索できます。上記の Regular Expression Protection ポリシーの例を修正するには、次のように不足していたかっこを追加します。
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<RegularExpressionProtection async="false" continueOnError="false" enabled="true" name="Regular-Expression-Protection-1">
<DisplayName>Regular Expression Protection-1</DisplayName>
<Properties/>
<IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
<URIPath>
<Pattern>(foo){2}</Pattern>
</URIPath>
<Source>request</Source>
</RegularExpressionProtection>XPathCompilationFailed
エラー メッセージ
Edge UI または Edge 管理 API を使用した API プロキシのデプロイに失敗すると、次のエラー メッセージが表示されます。
Error Deploying Revision revision_number to environment RegularExpressionProtection policy_name: Failed to compile xpath xpath_expression. Context Revision:revision_number;APIProxy:RegexThreat;Organization:organization;Environment:environment.
エラー メッセージの例
Error Deploying Revision 1 to test RegularExpressionProtection Regular-Expression-Protection-1: Failed to compile xpath /notapigee:foo/notapigee:bar. Context Revision:1;APIProxy:RegexThreat;Organization:myorg;Environment:test.
エラーのスクリーンショットの例

原因
<XPath> 要素で使用されている接頭辞や値が RegularExpressionProtection ポリシー内で宣言された名前空間の一部でない場合、API プロキシのデプロイは失敗します。
名前空間、XPath、接頭辞の詳細については、XML Namespaces and How They Affect XPath and XSLT をご覧ください。
診断
エラーが発生した RegularExpressionProtection ポリシーの名前と、使用されている XPath 式を特定します。どちらの項目もエラー メッセージで確認できます。
たとえば、次のエラーでは、ポリシー名は
Regular-Expression-Protection-1で、XPath 式は/notapigee:foo/notapigee:bar:です。Error Deploying Revision 1 to test RegularExpressionProtection Regular-Expression-Protection-1: Failed to compile xpath /notapigee:foo/notapigee:bar. Context Revision:1;APIProxy:RegexThreat;Organization:myorg;Environment:test.
エラーが発生した RegularExpressionProtection ポリシーの XML で、
Expression要素に設定されている XPath が、エラー メッセージ(上の手順 1)で特定された XPath と一致することを確認します。たとえば、次のポリシーではエラー メッセージの内容に一致する XPath を
/notapigee:foo/notapigee:barとして指定しています。<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <RegularExpressionProtection async="false" continueOnError="false" enabled="true" name="Regular-Expression-Protection-1"> <DisplayName>Regular Expression Protection-1</DisplayName> <Properties/> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> <Source>request</Source> <XMLPayload> <Namespaces> <Namespace prefix="apigee">http://www.apigee.com</Namespace> </Namespaces> <XPath> <Expression>/notapigee:foo/notapigee:bar</Expression> <Type>nodeset</Type> <Pattern>pattern</Pattern> <Pattern>pattern2</Pattern> </XPath> </XMLPayload> </RegularExpressionProtection>
- RegularExpressionProtection ポリシーの
<Namespaces>要素と<Expression>要素を調べます。エラー メッセージに示された特定の<Expression>で、RegularExpressionProtection ポリシーで宣言された名前空間に含まれない接頭辞または値が使用されている場合、それがエラーの原因です。この例の RegularExpressionProtection ポリシー では、
<XPath>で接頭辞notapigeeが使用されています。<Expression>/notapigee:foo/notapigee:bar</Expression>
しかし、接頭辞
notapigeeはどの<Namespace>要素にも定義されていないため、<XPath>のコンパイルに失敗し、デプロイエラーになります。
解決策
<XPath> 要素中の <Expression> 要素で使用されるすべての名前空間が RegularExpressionProtection ポリシーで宣言されるようにします。上記の例を修正するには、名前空間で宣言する notapigee 接頭辞を apigee に置き換えます。
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <RegularExpressionProtection async="false" continueOnError="false" enabled="true" name="Regular-Expression-Protection-1"> <DisplayName>Regular Expression Protection-1</DisplayName> <Properties/> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> <Source>request</Source> <XMLPayload> <Namespaces> <Namespace prefix="apigee">http://www.apigee.com</Namespace> </Namespaces> <XPath> <Expression>/apigee:foo/apigee:bar</Expression> <Type>nodeset</Type> <Pattern>pattern</Pattern> <Pattern>pattern2</Pattern> </XPath> </XMLPayload> </RegularExpressionProtection>
CannotBeConvertedToNodeset
エラー メッセージ
Edge UI または Edge 管理 API を使用した API プロキシのデプロイに失敗すると、次のエラー メッセージが表示されます。
Error Deploying Revision revision_number to environment RegularExpressionProtection policy_name: Result of xpath xpath_expression cannot be converted to nodeset. Context Revision:revision_number;APIProxy:RegexThreat;Organization:organization;Environment:environment.
エラー メッセージの例
Error Deploying Revision 1 to test RegularExpressionProtection Regular-Expression-Protection-1: Result of xpath count(//apigee:foo) cannot be converted to nodeset. Context Revision:1;APIProxy:RegexThreat;Organization:myorg;Environment:test.
エラーのスクリーンショットの例

原因
Regular Expression ポリシーに <XPath> 式があり、<Type> 要素が nodeset として定義されていても、式を nodeset に変換できない場合、API プロキシのデプロイが失敗します。
診断
エラーが発生した RegularExpressionProtection ポリシーと、nodeset に変換できない XPath 式を特定します。どちらの項目もエラー メッセージで確認できます。
たとえば、次のエラーでは、ポリシー名は
Regular-Expression-Protection-1で、XPath 式はcount(//apigee:foo):です。Error Deploying Revision 1 to test RegularExpressionProtection Regular-Expression-Protection-1: Result of xpath count(//apigee:foo) cannot be converted to nodeset. Context Revision:1;APIProxy:RegexThreat;Organization:myorg;Environment:test.
エラーが発生した RegularExpressionProtection ポリシーの XML で、
<XPath>要素の<Expression>要素に設定されている XPath が、エラー メッセージ(上の手順 1)で特定された XPath と一致することを確認します。たとえば、次のポリシーでは、エラー メッセージの内容に一致する
count(//apigee:foo)が指定されています。<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <RegularExpressionProtection async="false" continueOnError="false" enabled="true" name="Regular-Expression-Protection-1"> <DisplayName>Regular Expression Protection-1</DisplayName> <Properties/> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> <Source>request</Source> <XMLPayload> <Namespaces> <Namespace prefix="apigee">http://www.apigee.com</Namespace> </Namespaces> <XPath> <Expression>count(//apigee:foo)</Expression> <Type>nodeset</Type> <Pattern>pattern</Pattern> <Pattern>pattern2</Pattern> </XPath> </XMLPayload> </RegularExpressionProtection>
<XPath>要素内の<Type>要素に設定されている値を調べます。<Type>要素がnodesetの場合は、それがエラーの原因です。この例では、XPath 式は count()count() です。これはノードを 1 つも返しません。このため、API プロキシのデプロイが失敗します。
解決策
<Type> 要素が nodeset に設定されている場合、<XPath> で設定されている <Expression> 要素の結果が 1 つ以上のノードになるようにします。あるいは、ユースケースに基づいて、より適切な値に <Type> 要素を変更します。
上記の例を修正するには、<Expression> 要素を、ノードを返す別の値に変更します。
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <RegularExpressionProtection async="false" continueOnError="false" enabled="true" name="Regular-Expression-Protection-1"> <DisplayName>Regular Expression Protection-1</DisplayName> <Properties/> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> <Source>request</Source> <XMLPayload> <Namespaces> <Namespace prefix="apigee">http://www.apigee.com</Namespace> </Namespaces> <XPath> <Expression>/apigee:foo/apigee:bar</Expression> <Type>nodeset</Type> <Pattern>pattern</Pattern> <Pattern>pattern2</Pattern> </XPath> </XMLPayload> </RegularExpressionProtection>
JSONPathCompilationFailed
エラー メッセージ
Edge UI または Edge 管理 API を使用した API プロキシのデプロイに失敗すると、次のエラー メッセージが表示されます。
Error Deploying Revision revision_number to environment RegularExpressionProtection policy_name: Failed to compile jsonpath jsonpath_expression Context Revision:revision_number;APIProxy:RegexThreat;Organization:organization;Environment:environment.
エラー メッセージの例
Error Deploying Revision 1 to test RegularExpressionProtection Regular-Expression-Protection-1: Failed to compile jsonpath $.store.book[*.author. Context Revision:1;APIProxy:RegexThreat;Organization:myorg;Environment:test.
エラーのスクリーンショットの例

原因
RegularExpressionProtection ポリシーの <JSONPath> 要素内の <Expression> 要素に無効な JSONPath 式が設定されていると、API プロキシのデプロイに失敗します。
診断
エラーが発生した RegularExpressionProtection ポリシーの名前と、使用されている無効な JSONPath 式を特定します。どちらの項目もエラー メッセージで確認できます。
たとえば、次のエラーでは、ポリシー名は
Regular-Expression-Protection-1で、JSONPath 式は$.store.book[*.author:です。Error Deploying Revision 1 to test RegularExpressionProtection Regular-Expression-Protection-1: Failed to compile jsonpath $.store.book[*.author. Context Revision:1;APIProxy:RegexThreat;Organization:myorg;Environment:test.
エラーが発生した Regular Expression Protection ポリシーの XML で、
Expression要素に設定されている JSONPath がエラー メッセージ(上記の手順 1)で特定された JSONPath と一致することを確認します。たとえば、次のポリシーでは、
<JSONPath>要素内のExpression要素が$.store.book[*.authorとして指定されており、エラー メッセージの内容と一致します。<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <RegularExpressionProtection async="false" continueOnError="false" enabled="true" name="Regular-Expression-Protection-1"> <DisplayName>Regular Expression Protection-1</DisplayName> <Properties/> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> <Source>request</Source> <JSONPayload> <JSONPath> <Expression>$.store.book[*.author</Expression> <Pattern>REGEX PATTERN</Pattern> <Pattern>REGEX PATTERN</Pattern> </JSONPath> </JSONPayload> </RegularExpressionProtection>
ポリシーで
<JSONPath>要素中の<Expression>要素を調べます。JSONPath 構文と一致しない場合は、これがエラーの原因です。上記の例では、閉じ角かっこがないため、式が無効になります。JSON パスの式が無効なため、API プロキシのデプロイが失敗します。
解決策
RegularExpressionProtection ポリシーの <JSONPath> 要素内にある <Expression> 要素が、有効な JSONPath 式になるようにします。
上記の例を修正するには、不足していた閉じ角かっこを <Expression> 要素値に追加します。
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <RegularExpressionProtection async="false" continueOnError="false" enabled="true" name="Regular-Expression-Protection-1"> <DisplayName>Regular Expression Protection-1</DisplayName> <Properties/> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> <Source>request</Source> <JSONPayload> <JSONPath> <Expression>$.store.book[*].author</Expression> <Pattern>REGEX PATTERN</Pattern> <Pattern>REGEX PATTERN</Pattern> </JSONPath> </JSONPayload> </RegularExpressionProtection>
NothingToEnforce
エラー メッセージ
Edge UI または Edge 管理 API を使用した API プロキシのデプロイに失敗すると、次のエラー メッセージが表示されます。
Error Saving Revision revision_number RegularExpressionProtection policy_name: at least one of URIPath, QueryParam, Header, FormParam, XMLPayload, JSONPayload is mandatory.
エラー メッセージの例
Error Saving Revision 1 RegularExpressionProtection Regular-Expression-Protection-1: at least one of URIPath, QueryParam, Header, FormParam, XMLPayload, JSONPayload is mandatory.
エラーのスクリーンショットの例

原因
RegularExpressionProtection ポリシーに、要素 <URIPath>、<QueryParam>、<Header>、<FormParam>、<XMLPayload>、<JSONPayload> が含まれていない場合、API プロキシのデプロイが失敗します。
エラー メッセージに示されているとおり、RegularExpressionProtection ポリシーには、<URIPath>、<QueryParam>、<Header>、<FormParam>、<XMLPayload>、<JSONPayload> のいずれかの要素が少なくとも 1 つ含まれている必要があります。
診断
エラーが発生した RegularExpressionProtection ポリシーの名前を特定します。名前はエラー メッセージで確認できます。たとえば、次のエラーでは、ポリシー名は
Regular-Expression-Protection-1:です。RegularExpressionProtection Regular-Expression-Protection-1: at least one of URIPath, QueryParam, Header, FormParam, XMLPayload, JSONPayload is mandatory.
エラーが発生した RegularExpressionProtection ポリシー(上記の手順 1 で特定)を調べます。ポリシーに
<URIPath>、<QueryParam>、<Header>、<FormParam>、<XMLPayload>、<JSONPayload>の要素が 1 つもない場合は、エラーが返されます。たとえば、次の RegularExpressionProtection ポリシーには、上記の要素がありません。
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <RegularExpressionProtection async="false" continueOnError="false" enabled="true" name="Regular-Expression-Protection-1"> <DisplayName>Regular Expression Protection-1</DisplayName> <Properties/> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> <Source>request</Source> </RegularExpressionProtection>Extract Variables ポリシーに必須の要素がないため、API プロキシのデプロイが失敗します。
解決策
RegularExpressionProtection ポリシーには、必須要素の <URIPath>、<QueryParam>、<Header>、<FormParam>、<XMLPayload>、<JSONPayload> が少なくとも 1 つ含まれるようにします。例:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <RegularExpressionProtection async="false" continueOnError="false" enabled="true" name="Regular-Expression-Protection-1"> <DisplayName>Regular Expression Protection-1</DisplayName> <Properties/> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> <Source>request</Source> <JSONPayload> <JSONPath> <Expression>$.store.book[*].author</Expression> <Pattern>REGEX PATTERN</Pattern> <Pattern>REGEX PATTERN</Pattern> </JSONPath> </JSONPayload> </RegularExpressionProtection>
NoPatternsToEnforce
エラー メッセージ
Edge UI または Edge 管理 API を使用した API プロキシのデプロイに失敗すると、次のエラー メッセージが表示されます。
Error Saving Revision revision_number RegularExpressionProtection policy_name: No patterns to enforce in payload_name.
エラー メッセージの例
Error Saving Revision 1 RegularExpressionProtection Regular-Expression-Protection-1: No patterns to enforce in XPath.
エラーのスクリーンショットの例

原因
RegularExpressionProtection ポリシーの最上位の要素(<URIPath>、<QueryParam>、<Header>、<FormParam>、<XMLPayload>、<JSONPayload>)に <Pattern> 要素が定義されていない場合、API プロキシのデプロイが失敗します。
診断
エラーが発生した RegularExpressionProtection ポリシーと、
<Pattern>要素を持たない子要素の名前を特定します。どちらの項目もエラー メッセージで確認できます。たとえば、次のエラーでは、ポリシー名は
Regular-Expression-Protection-1で、子要素はXPath:です。RegularExpressionProtection Regular-Expression-Protection-1: No patterns to enforce in XPath.
- エラーが発生した RegularExpressionProtection ポリシーを調べ、手順 1 で特定した子要素に
<Pattern>要素がないか確認します。子要素に<Pattern>要素が存在しない場合は、それがエラーの原因です。たとえば、次のポリシーでは、
<XPath>内に<Pattern>要素がありません。<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <RegularExpressionProtection async="false" continueOnError="false" enabled="true" name="Regular-Expression-Protection-1"> <DisplayName>Regular Expression Protection-1</DisplayName> <Properties/> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> <Source>request</Source> <XMLPayload> <Namespaces> <Namespace prefix="apigee">http://www.apigee.com</Namespace> </Namespaces> <XPath> <Expression>/apigee:Greeting/apigee:User</Expression> <Type>string</Type> </XPath> </XMLPayload> </RegularExpressionProtection>
<XPath>要素に<Pattern>要素がないため、API プロキシのデプロイが失敗します。
解決策
<URIPath>、<QueryParam>、<Header>、<FormParam>、<XMLPayload>、<JSONPayload> のいずれかの要素に <Pattern> が 1 つ以上指定されていることを確認します。要素を正しく指定する方法については、RegularExpressionProtection ポリシーをご覧ください。
上記の例を修正するには、次のように、<XMLPayload> 内の <XPath> 要素に <Pattern> 要素を追加します。
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <RegularExpressionProtection async="false" continueOnError="false" enabled="true" name="Regular-Expression-Protection-1"> <DisplayName>Regular Expression Protection-1</DisplayName> <Properties/> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> <Source>request</Source> <XMLPayload> <Namespaces> <Namespace prefix="apigee">http://www.apigee.com</Namespace> </Namespaces> <XPath> <Expression>/apigee:Greeting/apigee:User</Expression> <Type>string</Type> <Pattern>REGEX PATTERN</Pattern> </XPath> </XMLPayload> </RegularExpressionProtection>
NONEmptyPrefixMappedToEmptyURI
エラー メッセージ
Edge UI または Edge 管理 API を使用した API プロキシのデプロイに失敗すると、次のエラー メッセージが表示されます。
Error Saving Revision revision_number RegularExpressionProtection policy_name: Non-empty prefix prefix_name cannot be mapped to empty uri.
エラー メッセージの例
Error Saving Revision 1 RegularExpressionProtection Regular-Expression-Protection-1: Non-empty prefix apigee cannot be mapped to empty uri.
エラーのスクリーンショットの例

原因
このエラーは、RegularExpressionProtection ポリシーで <XMLPayload> 要素中の <Namespace> 要素に接頭辞が定義されているが、URI が定義されていない場合に発生します。
診断
エラーが発生した RegularExpressionProtection ポリシーと、URI にマッピングされていない接頭辞の名前を特定します。どちらの項目もエラー メッセージで確認できます。
たとえば、次のエラーでは、ポリシー名は Regular-Expression-Protection-1 で、接頭辞は apigee です。
RegularExpressionProtection Regular-Expression-Protection-1: Non-empty prefix apigee cannot be mapped to empty uri.
エラーが発生した RegularExpressionProtection ポリシーの XML で、
<XMLPayload>要素内にある<Namespace>要素に設定されている接頭辞の名前が、エラー メッセージ(上の手順 1)で特定した接頭辞の名前と一致することを確認します。たとえば、次のポリシーでは、
<Namespace>要素で apigee という接頭辞を指定しており、これはエラー メッセージの内容と一致します。<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <RegularExpressionProtection async="false" continueOnError="false" enabled="true" name="Regular-Expression-Protection-1"> <DisplayName>Regular Expression Protection-1</DisplayName> <Properties/> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> <Source>request</Source> <XMLPayload> <Namespaces> <Namespace prefix="apigee"/> <Namespace prefix="gmail">http://mail.google.com</Namespace> </Namespaces> <XPath> <Expression>/apigee:Greeting/apigee:User</Expression> <Type>string</Type> <Pattern>REGEX PATTERN</Pattern> </XPath> </XMLPayload> </RegularExpressionProtection>
手順 2 で識別した特定の接頭辞を持つ
<Namespace>要素に有効な URI があるかどうかを確認します。URI がない場合は、それがエラーの原因です。上記の RegularExpressionProtection ポリシーの例では、接頭辞 apigee を持つ
<Namespace>要素に対応する URI が存在しないため、次のエラーが発生します。Non-empty prefix apigee cannot be mapped to empty uri.
解決策
Extract Variables ポリシーに、接頭辞が定義されたすべての <Namespace> 要素に対応する URI が存在するようにします。例:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <RegularExpressionProtection async="false" continueOnError="false" enabled="true" name="Regular-Expression-Protection-1"> <DisplayName>Regular Expression Protection-1</DisplayName> <Properties/> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> <Source>request</Source> <XMLPayload> <Namespaces> <Namespace prefix="apigee">http://www.apigee.com</Namespace> <Namespace prefix="gmail">http://mail.google.com</Namespace> </Namespaces> <XPath> <Expression>/apigee:Greeting/apigee:User</Expression> <Type>string</Type> <Pattern>REGEX PATTERN</Pattern> </XPath> </XMLPayload> </RegularExpressionProtection>
DuplicatePrefix
エラー メッセージ
Edge UI または Edge 管理 API を使用した API プロキシのデプロイに失敗すると、次のエラー メッセージが表示されます。
Error Saving Revision revision_number RegularExpressionProtection policy_name: Duplicate prefix prefix_name.
エラー メッセージの例
Error Saving Revision 1 RegularExpressionProtection Regular-Expression-Protection-1: Duplicate prefix apigee.
エラーのスクリーンショットの例

原因
このエラーは、RegularExpressionProtection ポリシーで <XMLPayload> 要素内の <Namespace> 要素で同じ接頭辞が複数回定義されている場合に発生します。
たとえば、次のように接頭辞 apigee が 2 回定義されていると、このエラーが発生します。
<Namespace prefix="apigee">http://www.apigee.com</Namespace> <Namespace prefix="apigee">http://www.apigee.com</Namespace>
診断
エラーが発生した RegularExpressionProtection ポリシーと接頭辞の名前を特定します。どちらの項目もエラー メッセージで確認できます。
たとえば、次のエラーでは、ポリシー名は Regular-Expression-Protection-1 で、接頭辞は apigee です。
RegularExpressionProtection Regular-Expression-Protection-1: Duplicate prefix apigee.
エラーが発生した RegularExpressionProtection ポリシーの XML で、
<XMLPayload>要素内にある<Namespace>要素に設定されている接頭辞の名前が、エラー メッセージ(上の手順 1)で特定した接頭辞の名前と一致することを確認します。たとえば、次のポリシーでは、
<Namespace>要素で apigee という接頭辞を指定しており、これはエラー メッセージの内容と一致します。<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <RegularExpressionProtection async="false" continueOnError="false" enabled="true" name="Regular-Expression-Protection-1"> <DisplayName>Regular Expression Protection-1</DisplayName> <Properties/> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> <Source>request</Source> <XMLPayload> <Namespaces> <Namespace prefix="apigee">http://www.apigee.com</Namespace> <Namespace prefix="apigee">http://www.apigee.com</Namespace> </Namespaces> <XPath> <Expression>/apigee:Greeting/apigee:User</Expression> <Type>string</Type> <Pattern>REGEX PATTERN</Pattern> </XPath> </XMLPayload> </RegularExpressionProtection>
手順 2 で特定した接頭辞を持つ
<Namespace>要素が複数回定義されていないか確認します。複数回定義されている場合は、それがエラーの原因になります。上記の Regular Expression Protection ポリシーの例では、接頭辞 apigee の
<Namespace>要素が 2 回定義されているため、次のエラーが発生します。Duplicate prefix apigee.
解決策
RegularExpressionProtection ポリシーの <Namespace> 要素の接頭辞ごとに、定義が 1 つだけ存在するようにします。例:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <RegularExpressionProtection async="false" continueOnError="false" enabled="true" name="Regular-Expression-Protection-1"> <DisplayName>Regular Expression Protection-1</DisplayName> <Properties/> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> <Source>request</Source> <XMLPayload> <Namespaces> <Namespace prefix="apigee">http://www.apigee.com</Namespace> </Namespaces> <XPath> <Expression>/apigee:Greeting/apigee:User</Expression> <Type>string</Type> <Pattern>REGEX PATTERN</Pattern> </XPath> </XMLPayload> </RegularExpressionProtection>
EmptyXPathExpression
エラー メッセージ
Edge UI または Edge 管理 API を使用した API プロキシのデプロイに失敗すると、次のエラー メッセージが表示されます。
Error Saving Revision revision_number RegularExpressionProtection policy_name: Empty XPath expression.
エラー メッセージの例
Error Saving Revision 1 RegularExpressionProtection Regular-Expression-Protection-1: Empty XPath expression.
エラーのスクリーンショットの例

原因
RegularExpressionProtection ポリシーで <XPath> 要素内に <Expression> 要素が存在しない場合、API プロキシのデプロイが失敗します。
診断
エラー メッセージから、エラーが発生した RegularExpressionProtection ポリシーを特定します。たとえば、次のエラーでは、Regular-Expression-Protection-1 がそのポリシー名です。
RegularExpressionProtection Regular-Expression-Protection-1: Empty XPath expression.
エラーが発生した RegularExpressionProtection ポリシーの XML に、
<Expression>要素が定義されていない<XPath>子要素を持つ<XMLPayload>要素があるか、または値が設定されていない<Expression>要素があるかどうかを調べます。そうした要素がある場合、それがエラーの原因です。たとえば、
<XMLPayload>要素を持つ RegularExpressionProtection ポリシーを次に示します。<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <RegularExpressionProtection async="false" continueOnError="false" enabled="true" name="Regular-Expression-Protection-1"> <DisplayName>Regular Expression Protection-1</DisplayName> <Properties/> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> <Source>request</Source> <XMLPayload> <Namespaces> <Namespace prefix="apigee">http://www.apigee.com</Namespace> </Namespaces> <XPath> <Expression></Expression> <Type>string</Type> <Pattern>REGEX PATTERN</Pattern> </XPath> </XMLPayload> </RegularExpressionProtection>
この例では、
<XPath>要素内に空の<Expression>要素があるため、API プロキシのデプロイが失敗します。
解決策
RegularExpressionProtection ポリシーで、<XPath> 要素内に空でない有効な <Expression> 要素を定義するようにします。例:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <RegularExpressionProtection async="false" continueOnError="false" enabled="true" name="Regular-Expression-Protection-1"> <DisplayName>Regular Expression Protection-1</DisplayName> <Properties/> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> <Source>request</Source> <XMLPayload> <Namespaces> <Namespace prefix="apigee">http://www.apigee.com</Namespace> </Namespaces> <XPath> <Expression>/apigee:Greeting/apigee:User</Expression> <Type>string</Type> <Pattern>REGEX PATTERN</Pattern> </XPath> </XMLPayload> </RegularExpressionProtection>
EmptyJSONPathExpression
エラー メッセージ
Edge UI または Edge 管理 API を使用した API プロキシのデプロイに失敗すると、次のエラー メッセージが表示されます。
Error Saving Revision revision_number RegularExpressionProtection policy_name: Empty JSONPath expression.
エラー メッセージの例
Error Saving Revision 1 RegularExpressionProtection Regular-Expression-Protection-1: Empty JSONPath expression.
エラーのスクリーンショットの例

原因
RegularExpressionProtection ポリシーで <JSONPath> 要素内に <Expression> 要素が存在しない場合、API プロキシのデプロイが失敗します。
診断
エラー メッセージから、エラーが発生した RegularExpressionProtection ポリシーを特定します。たとえば、次のエラーでは、Regular-Expression-Protection-1 がそのポリシー名です。
Error Saving Revision 1 RegularExpressionProtection Regular-Expression-Protection-1: Empty JSONPath expression.
エラーが発生した RegularExpressionProtection ポリシーの XML に、
<Expression>要素が定義されていない<JSONPath>子要素を持つ<JSONPayload>要素があるか、または値が設定されていない<Expression>要素があるかどうかを調べます。そうした要素がある場合、それがエラーの原因です。たとえば、
<JSONPayload>要素を持つ RegularExpressionProtection ポリシーを次に示します。<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <RegularExpressionProtection async="false" continueOnError="false" enabled="true" name="Regular-Expression-Protection-1"> <DisplayName>Regular Expression Protection-1</DisplayName> <Properties/> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> <Source>request</Source> <JSONPayload> <JSONPath> <Expression></Expression> <Pattern>REGEX PATTERN</Pattern> <Pattern>REGEX PATTERN</Pattern> </JSONPath> </JSONPayload> </RegularExpressionProtection>
この例では、
<JSONPath>要素内に空の<Expression>要素があるため、API プロキシのデプロイが失敗します。
解決策
RegularExpressionProtection ポリシーで、<JSONPath> 要素内に空でない有効な <Expression> 要素を定義するようにします。例:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <RegularExpressionProtection async="false" continueOnError="false" enabled="true" name="Regular-Expression-Protection-1"> <DisplayName>Regular Expression Protection-1</DisplayName> <Properties/> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> <Source>request</Source> <JSONPayload> <JSONPath> <Expression>$.store.book[*].author</Expression> <Pattern>REGEX PATTERN</Pattern> <Pattern>REGEX PATTERN</Pattern> </JSONPath> </JSONPayload> </RegularExpressionProtection>