After registering several XSD files, we are seeing an error thrown when clicking on one specific XSD object:
java.io.FileNotFoundException: File or its dependencies not found: ../ServiceViews/Sample.xsd
TDM Portal 4.10 and later
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).
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.