Invoice import stops with NumberFormatException, even though most fields look plausible. An archived Mustang report describes one rejected decimal value aborting the whole import, with examples including additional whitespace and locale-formatted numbers. Q1 Map the exception to a particular XML location before attempting a correction.
Separate display formatting from the datatype
A human-formatted number such as 1.234,56 is not the same character sequence as the technical decimal value 1234.56. XML Schema defines decimal notation using a period and no attached unit. Q2 Nevertheless, a parser exception does not automatically establish that the business amount is wrong: an importer can handle whitespace differently from a preceding schema-validation layer.
Find the failing field
- Preserve the unchanged input. Keep the file, hash, importer version and first exception. Before repeating an import, determine whether any earlier stage already created records. Retrying must not unintentionally create duplicate processing.
- Locate the exact value. Use the stack trace and importer diagnostics to identify the XML path and raw string. Record the affected line item and numeric field rather than merely saying “incorrect amount”. Redact unrelated invoice information.
- Compare schema and business value separately. Validate the original XML against the intended schema and rules. If it passes but import fails, differing parser behaviour is significant evidence. If the schema already rejects it, correct the source export first.
- Trace the format conversion. Check whether grouping separators, decimal commas, non-breaking spaces or a unit were copied from a display field into numeric XML. Global replacement can alter other fields or change the value. Apply the known datatype and source-system formatting rules instead.
- Isolate the failure visibly. Retain the affected document in a review state with its location and error. Do not silently import an unresolved mandatory amount as zero. Continuing other documents requires explicit identity tracking and protection against duplicate processing.
Correct the appropriate layer
Test the repaired exporter or importer with the original failing case and representative valid decimal values. Then compare imported amounts with the source invoice. Removing the exception is not sufficient evidence that the data was transferred correctly.
For handoff, a minimal XML excerpt, raw value, path, stack trace and version details are usually enough. This guide concerns technical data processing rather than approval of the substantive invoice amounts. Preserve the original raw value in the investigation record so that an apparently helpful normalisation can be checked later.
Frequently asked questions
Can I replace every comma with a period?
No. Without knowing the source format, grouping separators and decimal places can be interpreted incorrectly.
Should the importer use zero whenever parsing fails?
Not for an unresolved invoice amount. A visible review status preserves the fact that the value was not reliably imported.
Prepare a findings note
Summarise your observations for your enquiry. The note is created in your browser and is not saved or sent here. You can then copy it into the contact form.
Unknown is fine. Do not enter passwords, customer data or complete confidential logs.
Support with this issue
We can review numeric formats, importer failures and traceable handling of affected invoices.
