Page 1 of 1

Another Product Import Issue

Posted: Thu Aug 20, 2009 2:38 pm
by VoShay
Here's my latest foul-up-
Exception has been thrown by the target of an invocation.
ImportOrUpdate unsuccessful for Product
ProductId = 0
Name = 1.3mm to 2.1mm DC Power Plug Adaptor
Error message: Exception has been thrown by the target of an invocation.

at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at CommerceBuilder.DataClient.Api.ObjectHandlers.ImportHandler.<.ctor>b__36(Object& acObject)
at CommerceBuilder.DataClient.Api.ObjectHandlers.ImportHandler.ImportChildObjectsArray(Array schemaObjectsArray, Type acType, String objName, String idFieldName, String displayNamePropertyName, Object parentId, TryLoadExistingObject tryLoadExistingObject, TranslateObjectAssociatedIds translateObjectAssociatedIds, SaveACObject saveACObject, ImportObjectChildsAndAssociations importObjectChildsAndAssociations, String csvFields)

Re: Another Product Import Issue

Posted: Sun Aug 30, 2009 9:11 pm
by Naveed
I am unable to reproduce the case with the provided data.

You have not provided the complete stack trace in you exception details, but I think you are getting some SQL truncation error , if so, then please revise the CSV data and see if data for product (for which you are getting an error ) is not exceeding the max field length limits.

Re: Another Product Import Issue

Posted: Wed Sep 02, 2009 4:59 pm
by VoShay
Here's my error data for my two lines that won't upload.

Re: Another Product Import Issue

Posted: Sun Sep 13, 2009 11:03 pm
by Naveed
I have reviewed the provided log files and found that all logged errors or the same type, similar this one:
ImportOrUpdate unsuccessful for Product
ProductId = 0
Name = Right angle coax power plug.2.1mm I.D.,5.5mm O.D. with solder terminals .22in x .1in cable opening.
Error message: Exception has been thrown by the target of an invocation.
Base Exception: String or binary data would be truncated.
It indicates a SQL exception when inserting data in to database. The truncation error occurs when some string type data exceeds the respective database field length. You have to manually review your data for failed products and for lengthy field the data should be trimmed before import.

Re: Another Product Import Issue

Posted: Wed Sep 16, 2009 4:33 pm
by VoShay
Managed to fix it all up and find the the problems. Everything is importing fine now. Thanks for the assistance again Naveed.