The reason for the error is an incomplete SQL 'where' clause, which is created by the script "VI_PersonAuto_CreateMatchingRuleWhereClause".
This script takes the "search criteria for employee assignment" of the domain and builds the where clause.
The definition for a matching person to an account depends on the object definition. These "object definitions" are a filter on the database table; in this case the table "ADSAccount". Everytime an object is loaded from the database these filters are checked to find out which object definition matches the object.
The issue will occur if an object was loaded, but the loaded object doesn't match with at least one object definition which was used in the search criteria.
Thus, there must be definitions for "Active Directory contacts" and "Active Directory user accounts", e.g.:
Confirm that the search criteria is defined, as above. For further details, please refer to the Identity Management Guide, Search Criteria for Employee Assignment