Registered XSD object throws "File or its dependencies not found" error in the TDM Portal UI
search cancel

Registered XSD object throws "File or its dependencies not found" error in the TDM Portal UI

book

Article ID: 380557

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

After registering several XSD files, we are seeing an error thrown when clicking on one specific XSD object:

Error

java.io.FileNotFoundException: File or its dependencies not found: ../ServiceViews/Sample.xsd

Environment

TDM Portal 4.10 and later

Cause

When registering XSD files, the files are processed/parsed by XML/XSD framework, which doesn't have any awareness of our gtrep repository and registered files. It can only locate the files in the file system (or through http links). So the file is missing or cannot be located because of the relative path defined by the import statement is unknown, or cannot be located (which is technically the same as if they are missing).

Resolution

To resolve this type of error, we will need to look at all imported XSD files in each of the XSD files you want to register, and replace the relative path, with the absolute path where these files are located on the TDM Portal server.

For example, say I have my registered XSD file inside the C:/XSD_Samples directory. My XSD file throwing the error has the following import statement:
<xsd:import namespace="http://xmlns.xxxxx.net/hubError/1_0" schemaLocation="../Common/Sample_1.xsd"/>

Modify the import statement to use the absolute path to the Sample_1.xsd file on the TDM Server, which is:
<xsd:import namespace="http://xmlns.xxxxx.net/hubError/1_0" schemaLocation="C:/XSD_Samples/Sample_1.xsd"/>

Note: This needs to be done for every XSD file that contains imports from other XSD files.

Most important, the dependent xsds needs to be placed in the same folder as the primary xsd or the folders defined.