Resolving "Missing Type Definitions" Errors in ReqIF Imports

Kemi
Kemi
  • Updated

Overview

This article explains how to troubleshoot and resolve missing type definitions in ReqIF imports, particularly the error:

rust

CopyEdit

FATAL ERROR: org.eclipse.emf.ecore.xml.type.impl.AnyTypeImpl cannot be cast to org.eclipse.rmf.reqif10.DatatypeDefinitionXHTML The file cannot be validated!

This issue typically occurs when an attribute value lacks a corresponding AttributeDefinition, often due to errors in preprocessing scripts.

1. What Causes Missing Type Definitions in ReqIF Files?

Common Causes:

  • The ReqIF file was preprocessed incorrectly, altering or removing type definitions.

  • An attribute in the ReqIF file references a missing AttributeDefinition.

  • A script or tool that processed the file did not retain all necessary type definitions.

  • The ReqIF was exported incorrectly from the source system (e.g., Integrity, DOORS).

Why Does This Happen?

  • ReqIF requires all attributes to have defined types (e.g., text, enumeration, XHTML).

  • If the DatatypeDefinitionXHTML is missing, any attribute expecting rich text cannot be validated.

2. How to Identify the Missing Type Definitions

A. Use a ReqIF Debugging Tool

✔ Tools like Consequent can analyze ReqIF files and report missing type definitions.
✔ Note: Consequent will only identify one missing type definition at a time, stopping at the first critical error.

B. Manually Inspect the ReqIF File

✔ Open the ReqIF file in a text editor (e.g., Notepad++, Visual Studio Code).
✔ Search for the following missing type reference:

php-template

CopyEdit

<AttributeValueXHTML>

✔ Identify which AttributeValue element does not have a corresponding AttributeDefinition in the file.

C. Compare with a Valid ReqIF Export

✔ If possible, export a valid ReqIF file from the same tool and compare the structure.
✔ Check for missing <DatatypeDefinitionXHTML> elements that should be present.

3. How to Fix the Issue in the ReqIF File

A. Manually Add the Missing Attribute Definition

✔ If the ReqIF is editable, add the missing <DatatypeDefinitionXHTML> reference in the <SpecType> section.

B. Reprocess the ReqIF with a Corrected Script

✔ If the issue stems from a preprocessing script, work with the developer to fix how it handles type definitions.
✔ Ensure the script does not strip out necessary definitions during processing.

C. Re-export the ReqIF from the Source System

✔ If possible, redo the export from the original tool (Integrity, DOORS) with correct settings.
✔ Some tools have options to preserve all data types—these should be enabled.

4. Best Practices to Prevent ReqIF Type Definition Errors

Test ReqIF exports in a validation tool before importing them into Jama.
Avoid preprocessing ReqIF files unless necessary.
Ensure scripts retain all required attribute definitions.
Compare problematic ReqIF files with a known working version.

5. Conclusion

  • This error occurs when an attribute lacks a corresponding type definition in the ReqIF file.

  • It is often caused by preprocessing scripts that strip out necessary data.

  • Using a debugging tool or manually inspecting the ReqIF file can help locate missing definitions.

  • Fixing the issue requires either modifying the ReqIF file, updating the script, or re-exporting from the source tool.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.