XML file import fails and returns SNX import errors

When you import a data XML file, any records processed by the server and logged in the SNX Importer form as FAILED are written to an {original filename}_errors.xml file. You can edit the import errors XML file to fix the data and then re-import the fixed data.

To fix data with errors and re-import data:

  1. Review the {original filename}_errors.xml file.

The import errors file is located in the same folder where the import data XML file is located.

  1. Edit the {original filename}_errors.xml file to correct the errors.

The reason each error occurred is displayed in a comment just prior to each data entity.

  1. Save the {original filename}_errors.xml file with a different name.

  2. In the SNX Importer form, import the file saved in step 3.

If the import errors file is too big to edit manually, and the same errors have occurred throughout the errors file, we recommend that you instead modify the process for creating the import data XML file to correct the errors.

The following table lists possible solutions for some common SNX import errors:

Error Message

Possible Solution

Could not find [entity] with ID=[ID]

Typically, this occurs when reference or dependent data missing in N4.

To resolve this, make sure the missing entity is either imported first or manually added in N4.

Required field missing: "field".

Typically, if a field is required in a form in N4, then most likely it is required in the import data XML file when creating an entity.

To resolve this, validate the import data XML file against the snx.xsd schema to ensure all of the required attributes are present. If this error still occurs, then add the required attribute to the import data XML file.

DomainQuery returned 2 results but a unique row was expected.

This occurs when using multiple threads and two different threads are trying to create the same missing reference data at the same time.

For example, if:

Thread 1 is executing:
<unit id="FCIU2408706"......
<damage type="23" component="DOORS" location="Doors" reported-date="2009-03-06T10:51:30" severity="MINOR"/>
</unit>

Thread 2 is executing:
<unit id="FSCU3236283".....
<damage type="23" component="DOORS" location="Doors" reported-date="2008-08-17T07:10:56" severity="MINOR"/>
</unit>

In the above examples, both unit elements have the same damage component DOORS. If the damage component DOORS does not exist in N4, then both threads try to create this damage component. If the threads are running simultaneously, this can result in duplicate damage component records for DOORS.

To resolve this, import all reference and dependent data before importing this data.

The booking with id XXX has no booking item for the entered container type and the line operator (shipping line) XXX does not allow creation of booking items directly through the snx import. Please go to the booking through the Manage Bookings screen and add the needed booking item.

This occurs when the line operator does not allow the creation of ad-hoc bookings and booking items in N4.

To resolve this, in the Configuration Organizations Line Operators Line Operators view Line Operator form Booking Rules tab for this line operator, select the Booking Ad Hoc check box.

Invalid value "--" for field XXX

This occurs when an attribute type is of enumeration, in which case it expects one of the standard values defined in the snx.xsd schema, but the attribute's value was not one of the standard values.

To resolve this, if the attribute is a required field, assign it one of the standard values in the import data XML file. Otherwise, if the attribute is optional you can remove it from the import data XML file.

Unable to find call point for the order number: 0

This occurs when importing a carrier-service with the call-order attribute and there is no call point defined for call-order="0".

To resolve this, make sure that the call order sequence includes the number 0 (zero) and contains all call points regardless of the numerical order. For example, a call-order sequence of 0,1,2,3,4,5,6,7 or 3,2,4,5,7,1,0,6 is valid. However, a call-order sequence of 0,2,3,4,5,6,7 or 1,2,3,4,5,6,7 is not valid since it is missing call-order 1 and 0 respectively.

Date field Apply Date cannot be earlier than about 99 years before today.

or

Date field Apply Date cannot be later than about 99 years from today.

This occurs when a date field is either more than 99 years before or after the current year. Some examples for the year 2010 are:

1910-10-07T12:12:12

2110-10-07T12:12:12

To resolve this, correct the date in the data import XML file.