Error "'Row x skipped for data class ''. Data class foreign key lookup on column '' failed." occurs when using a Data Connector import rule that has a foreign key data class mapping

Article:TECH164571  |  Created: 2011-07-13  |  Updated: 2011-12-30  |  Article URL http://www.symantec.com/docs/TECH164571
Article Type
Technical Solution


Issue



When using a Data Connector import rule that has a foreign key data class mapping, the error "Row x skipped for data class '<data class name>'. Data class foreign key lookup on column '<column name>' failed." will occur. This can also appear as "The import rule '<import rule name>' failed. Error: 'name' argument cannot be null. Parameter name: name."


Error



Two similar errors may occur:
 

  • "Row x skipped for data class '<data class name>'. Data class foreign key lookup on column '<column name>' failed."
  • "The import rule '<import rule name>' failed. Error: 'name' argument cannot be null. Parameter name: name."

Environment



Data Connector 7.0 MR4 through Data Connector 7.1 SP1


Cause



There are multiple causes for this:

  1. Multiple resources allready in the CMDB with an empty string for the name and the datasource being used having an emptry string for a Foriegn key resource.This will cause more rows to be returned than expected during the process.
  2. Multiple resources with the same name, for example John Smith, in the CMDB and the Foreign key using that name.  This will cause multiple rows to be returned again causing the error.
  3. When an SQL datasource is being used and the value returned for a Foreign key = NULL.

Solution



There are multiple solutions and workarounds that can be implemented. 

  1. Apply the attached files to the Symantec Management Platform server and it's database.
    • Copy the "DataConnector2.config" file to the Symantec Management Platform server
    • Apply the "DataConnector2.config" file by running the following from a Command Prompt:
      C:\Program Files\Altiris\Notification Server\Bin\AeXConfig.exe /configure "C:\Program Files\Altiris\DataConnector\Config\DataConnector2.config"
      Note: If the Symantec Management Platform Server is not installed onto the C: drive, substitute the correct drive letter in the above command. 
    • Copy the "Missing Stored Procs.sql" file to the database server or to where it can be ran against it.
    • Open SQL Server Management Studio.
    • Open and run the "Missing Stored Procs.sql" SQL query.
  2. This is not a product defect but a side effect of having multiple resources with the same name:
    • In the datasource make sure the guid of the resource being used in the foreign key exists and use that in place of the name
    • If the guid is not available then the data will need to be cleaned up.  Meaning if the problem is a department and two departments exist with the name 'Accounting' one of them would need to be deleted.  It could be exported, deleted then imported again after the connector import has run.
  3. A product defect has been raised for this issue and will be resolved in a future release.  Until that time the datasource will need to be modified so that NULL values are not returned for anything that has a Foreign key reference.  The SQL statement ISNULL would be the most likely candidate to do this, replacing the null with ''


Related Article

Error "Error: 'name' argument cannot be null. Parameter name: name.'" occurs when trying to use a Data Connector rule that includes a foreign key
http://www.symantec.com/business/support/index?page=content&id=TECH178052


Attachments

DataConnector2.config (607 Bytes)
Missing Stored Procs.sql (10 kBytes)




Article URL http://www.symantec.com/docs/TECH164571


Terms of use for this information are found in Legal Notices