Årsregnskap Altinn 3 — Valideringsfeil

Symptom

A user’s annual accounts submission to Altinn 3 is rejected with a validation error from Brønnøysundregistrene.

Fix and Recovery

No data is lost — the Altinn 3 instance remains open.

  1. Read the validation error to identify the failing XML element.

  2. Find the corresponding mapper in finsta-arsreg-altinn3-mapping/…​/mapper/underskjema/ by searching for the JAXB class name.

  3. Fix the mapping (see Common Fixes).

  4. Deploy the fix.

  5. The user retries the submission.

Common Fixes

Missing required field

Change findCurrentLineAmount (omits when 0/null) to findRequiredCurrentLineAmount (always emits). The JAXB model may not mark a field as required even when the API rejects its absence (#1209).

Wrong value

Check for incorrect AnnualStatementLineKey, wrong type conversion, or copy-paste errors in note lookups.

Reference