คุณกำลังดูเอกสารประกอบของ Apigee Edge
ไปที่เอกสารประกอบของ
Apigee X info
InvalidRegularExpression
ข้อความแสดงข้อผิดพลาด
การติดตั้งใช้งานพร็อกซี API ผ่าน UI ของ Edge หรือ Edge Management 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.
ตัวอย่างภาพหน้าจอแสดงข้อผิดพลาด

สาเหตุ
หากนิพจน์ทั่วไปในองค์ประกอบ <Pattern> ของนโยบาย RegularExpressionProtection ไม่ถูกต้อง การทําให้ใช้งานพร็อกซี 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.
ตรวจสอบ
<Pattern>องค์ประกอบทั้งหมดใน XML ของนโยบายการป้องกันนิพจน์ทั่วไปที่ไม่สำเร็จ ตรวจสอบว่าองค์ประกอบ<Pattern>มีนิพจน์ทั่วไปที่ไม่ถูกต้องหรือไม่ หากองค์ประกอบ<Pattern>มีนิพจน์ทั่วไปที่ไม่ถูกต้อง นั่นคือสาเหตุของข้อผิดพลาดตัวอย่างเช่น นโยบายต่อไปนี้ระบุค่าของ
Pattern>ของfoo){2}ซึ่งถือว่าเป็นนิพจน์ทั่วไปที่ไม่ถูกต้อง<?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 จึงล้มเหลว
ความละเอียด
ตรวจสอบว่าองค์ประกอบ <Pattern> แต่ละรายการในนโยบาย 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>
<URIPath>
<Pattern>(foo){2}</Pattern>
</URIPath>
<Source>request</Source>
</RegularExpressionProtection>XPathCompilationFailed
ข้อความแสดงข้อผิดพลาด
การติดตั้งใช้งานพร็อกซี API ผ่าน UI ของ Edge หรือ Edge Management 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 และผลกระทบต่อ XPath และ XSLT
การวินิจฉัย
ระบุชื่อของนโยบาย RegularExpressionProtection ที่เกิดข้อผิดพลาดและนิพจน์ XPath ที่ใช้ คุณจะเห็นทั้ง 2 รายการนี้ในข้อความแสดงข้อผิดพลาด
ตัวอย่างเช่น ในข้อผิดพลาดต่อไปนี้ ชื่อนโยบายคือ
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.
ใน XML ของนโยบายการป้องกันนิพจน์ทั่วไปที่ไม่สำเร็จ ให้ตรวจสอบว่า XPath ที่ตั้งค่าไว้ในองค์ประกอบ
Expressionตรงกับ XPath ที่ระบุในข้อความแสดงข้อผิดพลาด (ขั้นตอนที่ 1 ด้านบน)ตัวอย่างเช่น นโยบายต่อไปนี้ระบุ 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>
- ตรวจสอบองค์ประกอบ
<Namespaces>และ<Expression>ในนโยบาย RegularExpressionProtection หาก<Expression>ที่ระบุในข้อความแสดงข้อผิดพลาดใช้คำนำหน้าหรือค่าที่ไม่ได้เป็นส่วนหนึ่งของเนมสเปซที่ประกาศไว้ในนโยบาย RegularExpressionProtection นั่นคือสาเหตุของข้อผิดพลาดโปรดทราบว่า
<XPath>ที่เฉพาะเจาะจงใช้คำนำหน้าnotapigeeในตัวอย่างนโยบาย RegularExpressionProtection<Expression>/notapigee:foo/notapigee:bar</Expression>
อย่างไรก็ตาม ไม่ได้กำหนดคำนำหน้า
notapigeeในองค์ประกอบ<Namespace>ใดๆ ดังนั้นการคอมไพล์<XPath>จึงล้มเหลวและทำให้การติดตั้งใช้งานล้มเหลว
ความละเอียด
ตรวจสอบว่าได้ประกาศเนมสเปซทั้งหมดที่ใช้ในองค์ประกอบ <Expression> ภายใต้องค์ประกอบ <XPath> ในนโยบาย 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
ข้อความแสดงข้อผิดพลาด
การติดตั้งใช้งานพร็อกซี API ผ่าน UI ของ Edge หรือ Edge Management 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.
ตัวอย่างภาพหน้าจอแสดงข้อผิดพลาด

สาเหตุ
หากนโยบายนิพจน์ทั่วไปมีนิพจน์ <XPath> ที่กำหนดองค์ประกอบ <Type> เป็น nodeset แต่แปลงนิพจน์เป็น nodeset ไม่ได้ การติดตั้งใช้งานพร็อกซี API จะล้มเหลว
การวินิจฉัย
ระบุนโยบาย RegularExpressionProtection ที่เกิดข้อผิดพลาดและนิพจน์ XPath ที่แปลงเป็นชุดโหนดไม่ได้ คุณจะเห็นทั้ง 2 รายการนี้ในข้อความแสดงข้อผิดพลาด
ตัวอย่างเช่น ในข้อผิดพลาดต่อไปนี้ ชื่อนโยบายคือ
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.
ใน XML ของนโยบายการป้องกันนิพจน์ทั่วไปที่ไม่สำเร็จ ให้ตรวจสอบว่า XPath ที่ตั้งค่าไว้ในองค์ประกอบ
<Expression>ขององค์ประกอบ<XPath>ตรงกับ XPath ที่ระบุในข้อความแสดงข้อผิดพลาด (ขั้นตอนที่ 1 ด้านบน)ตัวอย่างเช่น นโยบายต่อไปนี้ระบุเป็น
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>
ตรวจสอบค่าที่ตั้งไว้ในองค์ประกอบ
<Type>ใต้องค์ประกอบ<XPath>หากองค์ประกอบ<Type>เป็นnodesetแสดงว่านั่นคือสาเหตุของข้อผิดพลาดในตัวอย่างนี้ นิพจน์ XPath คือ count() ซึ่งไม่แสดงโหนดอย่างน้อย 1 รายการ การติดตั้งใช้งานพร็อกซี API จึงล้มเหลว
ความละเอียด
หากตั้งค่าองค์ประกอบ <Type> เป็น nodeset ให้ตรวจสอบว่าผลลัพธ์ของชุดองค์ประกอบ <Expression> ที่ตั้งค่าใน <XPath> เป็นโหนดอย่างน้อย 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
ข้อความแสดงข้อผิดพลาด
การติดตั้งใช้งานพร็อกซี API ผ่าน UI ของ Edge หรือ Edge Management 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.
ตัวอย่างภาพหน้าจอแสดงข้อผิดพลาด

สาเหตุ
หากตั้งค่าองค์ประกอบ <Expression> ภายใต้องค์ประกอบ <JSONPath> ของนโยบายการป้องกันนิพจน์ทั่วไปเป็นนิพจน์ JSONPath ที่ไม่ถูกต้อง การติดตั้งใช้งานพร็อกซี API จะล้มเหลว
การวินิจฉัย
ระบุชื่อนโยบาย RegularExpressionProtection ที่เกิดข้อผิดพลาดและใช้นิพจน์ JSONPath ที่ไม่ถูกต้อง คุณจะเห็นทั้ง 2 รายการนี้ในข้อความแสดงข้อผิดพลาด
เช่น ในข้อผิดพลาดต่อไปนี้ ชื่อนโยบายคือ
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.
ใน XML ของนโยบายการป้องกันนิพจน์ทั่วไปที่ไม่สำเร็จ ให้ตรวจสอบว่า JSONPath ที่ตั้งค่าไว้ในองค์ประกอบ
Expressionตรงกับ JSONPath ที่ระบุในข้อความแสดงข้อผิดพลาด (ขั้นตอนที่ 1 ด้านบน)ตัวอย่างเช่น นโยบายต่อไปนี้จะระบุองค์ประกอบ
Expressionภายใต้องค์ประกอบ<JSONPath>เป็น$.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>
ตรวจสอบองค์ประกอบ
<Expression>ภายใต้องค์ประกอบ<JSONPath>ในนโยบาย หากไม่ตรงกับไวยากรณ์ JSONPath แสดงว่านี่คือสาเหตุของข้อผิดพลาด ในตัวอย่างด้านบน ไม่มีวงเล็บเหลี่ยมปิด ซึ่งทำให้นิพจน์ไม่ถูกต้องเนื่องจากนิพจน์เส้นทาง JSON ไม่ถูกต้อง การติดตั้งใช้งานพร็อกซี API จึงล้มเหลว
ความละเอียด
ตรวจสอบว่าค่าขององค์ประกอบ <Expression> ภายในองค์ประกอบ <JSONPath> ในนโยบายการป้องกันนิพจน์ทั่วไปเป็นนิพจน์ 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
ข้อความแสดงข้อผิดพลาด
การติดตั้งใช้งานพร็อกซี API ผ่าน UI ของ Edge หรือ Edge Management 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 Proxy จะล้มเหลว
ตามที่ระบุไว้ในข้อความแสดงข้อผิดพลาด นโยบาย RegularExpressionProtection ต้องมีองค์ประกอบอย่างน้อย 1 รายการต่อไปนี้รวมอยู่ในนโยบาย ได้แก่ <URIPath>, <QueryParam>, <Header>, <FormParam>, <XMLPayload> หรือ <JSONPayload>
การวินิจฉัย
ระบุชื่อนโยบาย RegularExpressionProtection ที่เกิดข้อผิดพลาด คุณดูได้ในข้อความแสดงข้อผิดพลาด ตัวอย่างเช่น ในข้อผิดพลาดต่อไปนี้ ชื่อนโยบายคือ
Regular-Expression-Protection-1:RegularExpressionProtection Regular-Expression-Protection-1: at least one of URIPath, QueryParam, Header, FormParam, XMLPayload, JSONPayload is mandatory.
ตรวจสอบนโยบายการป้องกันนิพจน์ทั่วไปที่ไม่สำเร็จ (ระบุไว้ในขั้นตอนที่ 1 ด้านบน) หากนโยบายไม่มีองค์ประกอบต่อไปนี้อย่างน้อย 1 รายการ ได้แก่
<URIPath>,<QueryParam>,<Header>,<FormParam>,<XMLPayload>หรือ<JSONPayload>แสดงว่านั่นคือสาเหตุของข้อผิดพลาดตัวอย่างเช่น นโยบายการป้องกันนิพจน์ทั่วไปต่อไปนี้ไม่มีองค์ประกอบใดๆ ที่กล่าวถึงข้างต้น
<?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 มีองค์ประกอบที่จำเป็นเหล่านี้อย่างน้อย 1 รายการ ได้แก่ <URIPath>, <QueryParam>, <Header>, <FormParam>, <XMLPayload> หรือ <JSONPayload> เช่น
<?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
ข้อความแสดงข้อผิดพลาด
การติดตั้งใช้งานพร็อกซี API ผ่าน UI ของ Edge หรือ Edge Management 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.
ตัวอย่างภาพหน้าจอแสดงข้อผิดพลาด

สาเหตุ
หากองค์ประกอบระดับบนสุด (<URIPath>, <QueryParam>, <Header>, <FormParam>, <XMLPayload> หรือ <JSONPayload>) ไม่ได้กำหนดองค์ประกอบ <Pattern> ไว้ในนโยบาย RegularExpressionProtection การติดตั้งใช้งานพร็อกซี API จะล้มเหลว
การวินิจฉัย
ระบุชื่อนโยบาย RegularExpressionProtection ที่เกิดข้อผิดพลาดและองค์ประกอบย่อยที่ไม่มีองค์ประกอบ
<Pattern>คุณจะเห็นทั้ง 2 รายการนี้ในข้อความแสดงข้อผิดพลาดตัวอย่างเช่น ในข้อผิดพลาดต่อไปนี้ ชื่อนโยบายคือ
Regular-Expression-Protection-1และองค์ประกอบย่อยคือXPath:RegularExpressionProtection Regular-Expression-Protection-1: No patterns to enforce in XPath.
- ตรวจสอบนโยบายการป้องกันนิพจน์ทั่วไปที่ไม่สำเร็จ และยืนยันว่าองค์ประกอบย่อยที่ระบุในขั้นตอนที่ 1 ไม่มีองค์ประกอบ
<Pattern>หากไม่มีองค์ประกอบ<Pattern>ในไฟล์ แสดงว่าองค์ประกอบดังกล่าวเป็นสาเหตุของข้อผิดพลาดตัวอย่างเช่น นโยบายต่อไปนี้ไม่มีองค์ประกอบ
<Pattern>อยู่ภายใน<XPath><?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
หากต้องการแก้ไขตัวอย่างข้างต้น เราเพียงแค่เพิ่มองค์ประกอบ <Pattern> ลงในองค์ประกอบ <XPath> ใต้ <XMLPayload>
<?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
ข้อความแสดงข้อผิดพลาด
การติดตั้งใช้งานพร็อกซี API ผ่าน UI ของ Edge หรือ Edge Management 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 มีคำนำหน้าที่กำหนดไว้ในองค์ประกอบ <Namespace> ภายใต้องค์ประกอบ <XMLPayload> แต่ไม่ได้กำหนด URI
การวินิจฉัย
ระบุนโยบาย RegularExpressionProtection ที่เกิดข้อผิดพลาดและชื่อของคำนำหน้าที่ไม่ได้แมปกับ URI คุณจะเห็นทั้ง 2 รายการนี้ในข้อความแสดงข้อผิดพลาด
ตัวอย่างเช่น ในข้อผิดพลาดต่อไปนี้ ชื่อนโยบายคือ Regular Expression Protection-1 และคำนำหน้าคือ apigee
RegularExpressionProtection Regular-Expression-Protection-1: Non-empty prefix apigee cannot be mapped to empty uri.
ใน XML ของนโยบายการป้องกันนิพจน์ทั่วไปที่ไม่สำเร็จ ให้ตรวจสอบว่าชื่อของชุดคำนำหน้าที่อยู่ในองค์ประกอบ
<Namespace>ภายใต้องค์ประกอบ<XMLPayload>ตรงกับชื่อคำนำหน้าที่ระบุในข้อความแสดงข้อผิดพลาด (ขั้นตอนที่ 1 ด้านบน)ตัวอย่างเช่น นโยบายต่อไปนี้จะระบุคำนำหน้าชื่อ apigee ในองค์ประกอบ
<Namespace>ซึ่งตรงกับสิ่งที่อยู่ในข้อความแสดงข้อผิดพลาด<?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>
ตรวจสอบว่าองค์ประกอบ
<Namespace>ที่มีคำนำหน้าที่เฉพาะซึ่งระบุในขั้นตอนที่ 2 มี URI ที่ถูกต้องหรือไม่ หากไม่มี URI แสดงว่านั่นคือสาเหตุของข้อผิดพลาดในนโยบายการป้องกันนิพจน์ทั่วไปตัวอย่างที่แสดงด้านบน โปรดสังเกตว่าไม่มี URI ที่สอดคล้องกับองค์ประกอบ
<Namespace>ที่มีคำนำหน้า apigee ดังนั้นคุณจึงได้รับข้อผิดพลาดต่อไปนี้Non-empty prefix apigee cannot be mapped to empty uri.
ความละเอียด
ตรวจสอบว่า<Namespace>องค์ประกอบทั้งหมดที่กำหนดด้วยคำนำหน้ามี URI ที่เกี่ยวข้องในนโยบาย Extract Variables เช่น
<?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
ข้อความแสดงข้อผิดพลาด
การติดตั้งใช้งานพร็อกซี API ผ่าน UI ของ Edge หรือ Edge Management 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 มีคำนำหน้าเดียวกันที่กำหนดไว้มากกว่า 1 ครั้งในองค์ประกอบ <Namespace> ภายใต้องค์ประกอบ <XMLPayload>
ตัวอย่างเช่น ข้อผิดพลาดนี้เกิดขึ้นเนื่องจากมีการกำหนดคำนำหน้า apigee 2 ครั้งดังที่แสดงด้านล่าง
<Namespace prefix="apigee">http://www.apigee.com</Namespace> <Namespace prefix="apigee">http://www.apigee.com</Namespace>
การวินิจฉัย
ระบุนโยบาย RegularExpressionProtection ที่เกิดข้อผิดพลาดและชื่อของคำนำหน้า คุณจะเห็นทั้ง 2 รายการนี้ในข้อความแสดงข้อผิดพลาด
ตัวอย่างเช่น ในข้อผิดพลาดต่อไปนี้ ชื่อนโยบายคือ Regular Expression Protection-1 และคำนำหน้าคือ apigee
RegularExpressionProtection Regular-Expression-Protection-1: Duplicate prefix apigee.
ใน XML ของนโยบายการป้องกันนิพจน์ทั่วไปที่ไม่สำเร็จ ให้ตรวจสอบว่าชื่อของชุดคำนำหน้าที่อยู่ในองค์ประกอบ
<Namespace>ภายใต้องค์ประกอบ<XMLPayload>ตรงกับชื่อคำนำหน้าที่ระบุในข้อความแสดงข้อผิดพลาด (ขั้นตอนที่ 1 ด้านบน)ตัวอย่างเช่น นโยบายต่อไปนี้จะระบุคำนำหน้าชื่อ apigee ในองค์ประกอบ
<Namespace>ซึ่งตรงกับสิ่งที่อยู่ในข้อความแสดงข้อผิดพลาด<?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>
ตรวจสอบว่าองค์ประกอบ
<Namespace>ที่มีคำนำหน้าที่เฉพาะเจาะจงซึ่งระบุในขั้นตอนที่ 2 ได้รับการกำหนดมากกว่า 1 ครั้งหรือไม่ หากมีการกำหนดมากกว่า 1 ครั้ง นั่นคือสาเหตุของข้อผิดพลาดในนโยบายการป้องกันนิพจน์ทั่วไปตัวอย่างที่แสดงด้านบน โปรดสังเกตว่าองค์ประกอบ
<Namespace>ที่มีคำนำหน้า apigee ได้รับการกำหนด 2 ครั้ง ดังนั้นคุณจึงได้รับข้อผิดพลาดต่อไปนี้Duplicate prefix apigee.
ความละเอียด
ตรวจสอบว่ามีคำจำกัดความสำหรับแต่ละคำนำหน้าเพียงคำเดียวในองค์ประกอบ <Namespace> ในนโยบาย 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>/apigee:Greeting/apigee:User</Expression> <Type>string</Type> <Pattern>REGEX PATTERN</Pattern> </XPath> </XMLPayload> </RegularExpressionProtection>
EmptyXPathExpression
ข้อความแสดงข้อผิดพลาด
การติดตั้งใช้งานพร็อกซี API ผ่าน UI ของ Edge หรือ Edge Management 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 ไม่ได้ตั้งค่าองค์ประกอบ <Expression> ภายในองค์ประกอบ <XPath> การติดตั้งใช้งานพร็อกซี API จะล้มเหลว
การวินิจฉัย
ระบุนโยบายการป้องกันนิพจน์ทั่วไปที่ไม่สำเร็จจากข้อความแสดงข้อผิดพลาด ตัวอย่างเช่น ในข้อผิดพลาดต่อไปนี้ ชื่อนโยบายคือ Regular-Expression-Protection-1
RegularExpressionProtection Regular-Expression-Protection-1: Empty XPath expression.
ใน XML ของนโยบายการป้องกันนิพจน์ทั่วไปที่ไม่สำเร็จ ให้ตรวจสอบว่ามีองค์ประกอบ
<XMLPayload>ที่มีองค์ประกอบย่อย<XPath>ซึ่งไม่มีองค์ประกอบ<Expression>ที่กำหนดไว้ หรือองค์ประกอบ<Expression>ไม่ได้ตั้งค่าเป็นค่าใดๆ หากเป็นเช่นนั้น แสดงว่านั่นคือสาเหตุของข้อผิดพลาดตัวอย่างเช่น นี่คือนโยบายการป้องกันนิพจน์ทั่วไปที่มีองค์ประกอบ
<XMLPayload><?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>
เนื่องจากมีองค์ประกอบ
<Expression>ว่างเปล่าภายในองค์ประกอบ<XPath>การติดตั้งใช้งานพร็อกซี API จึงล้มเหลว
ความละเอียด
ตรวจสอบว่านโยบาย RegularExpressionProtection มีองค์ประกอบ <Expression> ที่ไม่ว่างและถูกต้องซึ่งกำหนดไว้ภายใต้องค์ประกอบ <XPath> เช่น
<?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
ข้อความแสดงข้อผิดพลาด
การติดตั้งใช้งานพร็อกซี API ผ่าน UI ของ Edge หรือ Edge Management 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 ไม่ได้ตั้งค่าองค์ประกอบ <Expression> ภายในองค์ประกอบ <JSONPath> การติดตั้งใช้งานพร็อกซี API จะล้มเหลว
การวินิจฉัย
ระบุนโยบายการป้องกันนิพจน์ทั่วไปที่ไม่สำเร็จจากข้อความแสดงข้อผิดพลาด ตัวอย่างเช่น ในข้อผิดพลาดต่อไปนี้ ชื่อนโยบายคือ Regular-Expression-Protection-1
Error Saving Revision 1 RegularExpressionProtection Regular-Expression-Protection-1: Empty JSONPath expression.
ใน XML ของนโยบายการป้องกันนิพจน์ทั่วไปที่ไม่สำเร็จ ให้ตรวจสอบว่ามีองค์ประกอบ
<JSONPayload>ที่มีองค์ประกอบย่อย<JSONPath>ซึ่งไม่มีองค์ประกอบ<Expression>ที่กำหนดไว้ หรือองค์ประกอบ<Expression>ไม่ได้ตั้งค่าเป็นค่าใดๆ หากเป็นเช่นนั้น แสดงว่านั่นคือสาเหตุของข้อผิดพลาดตัวอย่างเช่น นี่คือนโยบายการป้องกันนิพจน์ทั่วไปที่มีองค์ประกอบ
<JSONPayload><?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>
เนื่องจากมีองค์ประกอบ
<Expression>ว่างเปล่าภายในองค์ประกอบ<JSONPath>การติดตั้งใช้งานพร็อกซี API จึงล้มเหลว
ความละเอียด
ตรวจสอบว่านโยบาย RegularExpressionProtection มีองค์ประกอบ <Expression> ที่ไม่ว่างและถูกต้องซึ่งกำหนดไว้ภายใต้องค์ประกอบ <JSONPath> เช่น
<?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>