UBL-CR-002:Invalid or Missing Namespace
The UBL invoice must use the correct XML namespaces for UBL 2.1.
Engine Classification
Set UBLVersionID to 2.1 per UBL conformance rule
Confidence: 95% · Applied automatically in pipeline
What is UBL-CR-002?
UBL-CR-002 is a fatal validation rule defined in the ubl-2.1 specification. It validates the UBLVersionID element in the UBL invoice XML.
When this rule fires, the invoice is non-compliant and will be rejected by Peppol access points and national validation services. The sending system receives a rejection response and the invoice does not reach the buyer.
Target path: /Invoice/cbc:UBLVersionID
Why This Error Matters
Invoice will be rejected by PEPPOL/EN16931 validators. Safe to remove - this element is explicitly prohibited and contains no required business data.
UBL-CR-002 is a hard failure. Invoices that trigger this rule are rejected at the access point and never reach the recipient. In Peppol networks, this means your sending system receives an MLR (Message Level Response) with a rejection status. The invoice must be corrected and re-sent, adding delay to your payment cycle.
Invoice Navigator can automatically correct this error in your pipeline. The fix is applied with full audit evidence, so your compliance trail remains intact.
Validator Behavior
- ·Causes invoice rejection
- ·Fails UBL schema validation
- ·Error returned: UBL-CR-002
- ·Specification: ubl-2.1
How to Fix It
Add main namespace
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
Add CBC namespace
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
Add CAC namespace
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
XML Example
Generic example based on the rule's target XPath. Your actual XML structure may differ.
<!-- Missing or empty element triggers cbc:UBLVersionID error --> <cbc:UBLVersionID></cbc:UBLVersionID>
<!-- Provide the required value --> <cbc:UBLVersionID>VALID_VALUE</cbc:UBLVersionID>
Technical Reference
/Invoice/cbc:UBLVersionIDCode Example
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"\n xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"\n xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">Common Causes
- ·Source ERP exports full UBL 2.1 instead of EN16931 subset
- ·Generic UBL template includes optional elements not needed for e-invoicing
- ·Conversion from another format added unsupported elements
- ·Manual XML editing introduced non-standard elements
- ·Invoice software not configured for EN16931 compliance
Seeing this in production? The API handles UBL-CR-002 automatically. See the fix response →
Commonly Seen In
Frequently Asked Questions
The UBL invoice must use the correct XML namespaces for UBL 2.1.
Add the correct UBL 2.1 namespace declarations to your invoice root element. You can also use Invoice Navigator's automatic Fixer tool to correct this instantly.
Yes, UBL-CR-002 is a critical error that will cause invoice rejection. It must be fixed before submission to ensure your invoice is accepted by the recipient's system.
Many instances of UBL-CR-002 can be automatically corrected using Invoice Navigator's Fixer tool. Upload your invoice and the tool will identify and fix common issues, including invalid or missing namespace.
UBL-CR-002 is commonly seen in exports from Custom XML generators, Template errors. These software packages sometimes generate invoices that need adjustment to meet full compliance standards.
Related Errors
Last updated: 21 February 2026
Handle UBL-CR-002 Automatically in Your Pipeline
The compliance engine auto-remediates this error with controlled safety policies and evidence pack generation.