[ https://issues.apache.org/jira/browse/OLINGO-861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15897826#comment-15897826 ]
rafiqkattangere commented on OLINGO-861: ---------------------------------------- Thanks. This helped to load the local copies of schema. But it gets into this recursive loop until java runs out of stack! In MetadataParser this loop goes on. loadReferencesSchemas(249)-- >buildEdmProvider(216)--> loadReferencesSchemas Note my schema file has hardly one Edmx:Reference, which might be nested 5 levels down with newer References. Sample - serviceroot.xml. <?xml version="1.0" encoding="UTF-8"?> <edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0"> <edmx:Reference Uri="http://docs.oasis-open.org/odata/odata/v4.0/errata03/csd01/complete/vocabularies/Org.OData.Core.V1.xml"> <edmx:Include Namespace="Org.OData.Core.V1" Alias="OData"/> </edmx:Reference> <edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/JsonSchemaFileCollection_v1.xml"> <edmx:Include Namespace="JsonSchemaFileCollection"/> </edmx:Reference> <edmx:DataServices> <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="ServiceRoot"> <EntityType Name="ServiceRoot"> <Annotation Term="OData.Description" String="This object represents the root Redfish service."/> <Annotation Term="OData.LongDescription" String="This object represents the root Redfish service. All values for resources described by this schema shall comply to the requirements as described in the Redfish specification."/> </EntityType> </Schema> <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="ServiceRoot.1.0.0"> <EntityContainer Name="ServiceContainer"> <Singleton Name="Service" Type="ServiceRoot.ServiceRoot"/> <Singleton Name="JsonSchemas" Type="JsonSchemaFileCollection.JsonSchemaFileCollection"/> </EntityContainer> <EntityType Name="ServiceRoot" BaseType="ServiceRoot.ServiceRoot"> <Annotation Term="OData.Description" String="This object represents the root Redfish service."/> <Annotation Term="OData.LongDescription" String="This object represents the root Redfish service. All values for resources described by this schema shall comply to the requirements as described in the Redfish specification."/> <Property Name="RedfishVersion" Type="Edm.String" Nullable="false"> <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/> <Annotation Term="OData.Description" String="The version of the Redfish service."/> <Annotation Term="OData.LongDescription" String="The value of this string shall represent the version of the Redfish service. The format of this string shall be of the format majorversion.minorversion.errata in compliance with Protocol Version section of the Redfish specification."/> <Annotation Term="Validation.Pattern" String="^\d+\.\d+\.\d+$"/> </Property> <Property Name="UUID" Type="Resource.UUID"> <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/> <Annotation Term="OData.Description" String="Unique identifier for a service instance. When SSDP is used, this value should be an exact match of the UUID value returned in a 200OK from an SSDP M-SEARCH request during discovery."/> <Annotation Term="OData.LongDescription" String="The value of this string shall represent the id of the Redfish service instance. The format of this string shall be a 32-byte value in the form 8-4-4-4-12. If SSDP is used, this value shall be an exact match of the UUID value returned in a 200OK from an SSDP M-SEARCH request during discovery. RFC4122 describes methods that can be used to create a UUID value. The value should be considered to be opaque. Client software should only treat the overall value as a universally unique identifier and should not interpret any sub-fields within the UUID."/> </Property> <NavigationProperty Name="JsonSchemas" Type="JsonSchemaFileCollection.JsonSchemaFileCollection" Nullable="false"> <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/> <Annotation Term="OData.Description" String="This is a link to a collection of Json-Schema files."/> <Annotation Term="OData.LongDescription" String="This object shall only contain a reference to a collection of resources that comply to the SchemaFile schema where the files are Json-Schema files."/> <Annotation Term="OData.AutoExpandReferences"/> </NavigationProperty> <Property Name="Links" Type="ServiceRoot.v1_0_0.Links" Nullable="false"> <Annotation Term="OData.Description" String="Contains references to other resources that are related to this resource."/> <Annotation Term="OData.LongDescription" String="The Links property, as described by the Redfish Specification, shall contain references to resources that are related to, but not contained by (subordinate to), this resource."/> <Annotation Term="Redfish.Required"/> </Property> </EntityType> </Schema> </edmx:DataServices> </edmx:Edmx> > MetaDataParser unable to build EdmProvider from Edmx files with references > -------------------------------------------------------------------------- > > Key: OLINGO-861 > URL: https://issues.apache.org/jira/browse/OLINGO-861 > Project: Olingo > Issue Type: Bug > Components: odata4-server > Affects Versions: (Java) V4 4.1.0 > Reporter: VIJAYASIMHA R NAGA > Assignee: Ramesh Reddy > Fix For: (Java) V4 4.2.0 > > Attachments: MyODataDemoService.zip, ServiceRoot.xml > > > Unable to build an EdmProvider from Edmx files with references to external > name spaces, (Method "readReference" in MetaDataParser.java from > server-core-ext library has a TODO remark to deal with this) > Ex: Having the below reference included in an Edmx file <edmx:Reference > Uri="http://docs.oasis-open.org/odata/odata/v4.0/cs01/vocabularies/Org.OData.Core.V1.xml"> > <edmx:Include Namespace="Org.OData.Core.V1" Alias="OData"/> </edmx:Reference> -- This message was sent by Atlassian JIRA (v6.3.15#6346)