USPS Import Fails With Column Count Mismatch Error

Problem

The USPS importer fails to complete. This can result in some data showing in the application, but much of it is missing. The uspsimport log shows an exception similar to the following: Caused by: org.ssdt_ohio.model.exception.UnexpectedException: Column count mismatch - line number x of usps_999999_extractname.txt contains x columns, but the header contains x columns. 

The USPS extracts are tab delimited, so this problem typically indicates an actual data element in the classic system contains a tab character(s). No extra tabs can be contained in the extracts.

Solution

Remove tabs from the classic record in question and re-extract.

  1. Open the extract causing the issue and find the record in question by navigating to the line number indicated.

  2. Use this information to find the offending record and open that record in classic (or use datatrieve if the record does not have a corresponding classic UI).

  3. Remove all tab characters

  4. Re-extract the classic data

  5. Rerun the import process using the corrected extracts

If you need further assistance locating where the stray tabs are viewing the extract in an editor that allows you to see command characters can help. One such editor that we commonly use is notepad++.

Related articles