Schema cannot be retrieved
search cancel

Schema cannot be retrieved

book

Article ID: 264698

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

I just added a group of 9 XSDs to the gateway (10.1 CR02).  The "Analyze" button in Policy Manager show them all OK.   When I select the head XSD in the Validate assertion, it accepts it.   But, when it runs it produces this error:   

5610 "Cannot validate schema because the global schema named <XSD name> cannot be retrieved"

The error number is 5610.

What does this error mean?   What can I change to make it accept the XSD?

It may be connected to the XSD being quite large, twice as large as any other we've had before of 120 or so XSDs.  At the top level, the XSD looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="Date_2021.05.27.0">
    <xs:import schemaLocation="A.xsd"/>
    <xs:import schemaLocation="B.xsd"/>
    <xs:import schemaLocation="C.xsd"/>
    <xs:import schemaLocation="D.xsd"/>
</xs:schema>

ultimately, all 9 XSDs are included, but B.xsd in particular is > 600kb.

Not to lead you astray with a suggestion of the problem, the size, but I would appreciate any clarification of what the error is complaining about and if it is a size issue, how to allow for a larger XSD.

Environment

Release : 10.1

Cause

The error number is 5610 is error in the assertion processing 

 

Resolution

The schema maximum size is controlled by the schemacache.maxSchemaSize cluster property.

schemacache.maxSchemaSize

Maximum size of a schema document download. Enter zero for an unlimited size.

Default: 10485760 (bytes)

Increasing should resolved this issue 

XML validation failure

Is there a max size limit  the XSD is 1,185,800 bytes, 17,686 lines long

2023-04-06T14:49:11.487+0000 WARNING 1575

    com.l7tech.server.policy.assertion.xml.ServerSchemaValidation:

5610: Cannot validate schema because the global schema named

    Test.xsd cannot be retrieved

ALSO

This is what we see

The validation piece go through each file and is OKAY 

However possible issues with some of the schema processing as individual fails and were the includes occur.  By combining all the files this would resolve any misplaced includes 

Example

 Re: "acceptedString" is defined in "SharedFormSchemaTypes.xsd", near the top, Common_ValidationResponsesElement.xsd does not includeSharedFormSchemaTypes.xsd so how would it know about that declaration?

 

 Combined ALL schema files into one file this worked around the declaration problem