0
Fixed

Aurion export error: Object must implement IConvertible. at System.Convert.ChangeType

Carol Wapshere 1 month ago in UNIFYBroker/Aurion • updated by Beau Harrison 1 month ago 6

When trying to export Contact_Phone_Number to Aurion I get "Other", "One or more errors occurred" reported in MIM.

The error is on the screen in the Adapter (though not in the Broker log file). I've pasted the error below.

Aurion should already be set up to allow exports to this field as the existing solution does that. I've checked the field name and mapping is the same in the Connector config file for both new and old solutions.

Broker version: 5.3.1. Revision #0

Aurion connector version: 5.3.0.0

It's trying to export a string value for two entities. The export flow rule from MIM is a direct flow and the metaverse attribute is a single-valued string.

Her's the error message from the Adapter screen:

Adapter update entities [Count:2] to adapter Aurion Personnel (549d90e8-e7df-4729-9e4c-58c73d1c98d3) failed with reason System.AggregateException: One or more errors occurred. ---> 
Unify.Product.IdentityBroker.EntitySchemaValidationException: Provided value System.Linq.Enumerable+d__14`2[Unify.Framework.DistinguishedNameValue,System.String] failed validation for type String ---> System.InvalidCastException: Object must implement IConvertible.
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at Unify.Product.IdentityBroker.EntityObjectTypeSchemaValidator`2.CreateValue(Object dataValue)
--- End of inner exception stack trace ---
at Unify.Product.IdentityBroker.EntityObjectTypeSchemaValidator`2.CreateValue(Object dataValue)
at Unify.Product.IdentityBroker.DistinguishedNameGeneratorReverseTransformation.Transform(IEntity[] sourceValue)
at Unify.Framework.AggregateArrayedValueAdapter`2.<>c.b__2_0(TElement[] current, IValueAdapter`2 valueAdapter)
at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
at Unify.Framework.AggregateArrayedValueAdapter`2.Transform(TElement[] baseValue)
at Unify.Framework.AggregateArrayedValueAdapter`2.<>c.b__2_0(TElement[] current, IValueAdapter`2 valueAdapter)
at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
at Unify.Framework.AggregateArrayedValueAdapter`2.Transform(TElement[] baseValue)
at Unify.Product.IdentityBroker.Adapter.GetReverseTransformedEntities(IEnumerable`1 entities)
at Unify.Product.IdentityBroker.Adapter.d__112.MoveNext() --- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Unify.Product.IdentityBroker.Adapter.d__111.MoveNext() --- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Unify.Product.IdentityBroker.Adapter.d__70.MoveNext() --- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Unify.Product.IdentityBroker.Adapter.d__69.MoveNext() --- End of inner exception stack trace ---
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at Unify.Framework.Auditing.AuditingExtensions.<>c__DisplayClass7_0`1.b__0(Task`1 t)
at Unify.Framework.Auditing.AuditingExtensions.<>c__DisplayClass5_0`1.b__0(Task`1 t)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Unify.Product.IdentityBroker.AdapterNotifierDecorator.d__39.MoveNext() --- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Unify.Product.IdentityBroker.RequestHandlers.BulkRequestEntityGroupProcessor.d__18.MoveNext() --- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Unify.Product.IdentityBroker.RequestHandlers.BulkRequestEntityGroupProcessor.d__12.MoveNext() ---> (Inner Exception #0) Unify.Product.IdentityBroker.EntitySchemaValidationException: Provided value System.Linq.Enumerable+d__14`2[Unify.Framework.DistinguishedNameValue,System.String] failed validation for type String ---> System.InvalidCastException: Object must implement IConvertible.
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at Unify.Product.IdentityBroker.EntityObjectTypeSchemaValidator`2.CreateValue(Object dataValue) --- End of inner exception stack trace ---
at Unify.Product.IdentityBroker.EntityObjectTypeSchemaValidator`2.CreateValue(Object dataValue)
at Unify.Product.IdentityBroker.DistinguishedNameGeneratorReverseTransformation.Transform(IEntity[] sourceValue)
at Unify.Framework.AggregateArrayedValueAdapter`2.<>c.b__2_0(TElement[] current, IValueAdapter`2 valueAdapter)
at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
at Unify.Framework.AggregateArrayedValueAdapter`2.Transform(TElement[] baseValue)
at Unify.Framework.AggregateArrayedValueAdapter`2.<>c.b__2_0(TElement[] current, IValueAdapter`2 valueAdapter)
at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
at Unify.Framework.AggregateArrayedValueAdapter`2.Transform(TElement[] baseValue)
at Unify.Product.IdentityBroker.Adapter.GetReverseTransformedEntities(IEnumerable`1 entities)
at Unify.Product.IdentityBroker.Adapter.d__112.MoveNext() --- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Unify.Product.IdentityBroker.Adapter.d__111.MoveNext() --- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Unify.Product.IdentityBroker.Adapter.d__70.MoveNext() --- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Unify.Product.IdentityBroker.Adapter.d__69.MoveNext()<--- . Duration: 00:00:00.0156171
Affected Versions:
Fixed by Version:
Under review

Hi Carol,

Can you provide your extensibility configuration? A screenshot of the export would also be helpful.

Via email:

I’m still waiting for the upgrade but tried the patch on the existing 5.3.0.0 service. Still get export errors but the message on the Adapters page has changed:

Adapter update entities [Count:2] to adapter Aurion Personnel (549d90e8-e7df-4729-9e4c-58c73d1c98d3) failed with reason System.AggregateException: One or more errors occurred. ---> System.MissingMethodException: Method not found: 'Void Unify.Product.IdentityBroker.DistinguishedNameGeneratorReverseTransformation..ctor(Unify.Framework.Collections.GroupedNameValueCollectionKey, Unify.Framework.Collections.GroupedNameValueCollectionKey, System.String, Unify.Product.IdentityBroker.IEntitySchema, System.Func`1<System.String>, System.String, Boolean)'. at Unify.Product.IdentityBroker.DistinguishedNameGeneratorTransformationFactory.CreateReverseTransformation(IAdapterEntityTransformationFactoryInformation factoryInformation) at Unify.Product.IdentityBroker.EntitySequentialAdapterFactory.<>c__DisplayClass7_0.<CreateReverseTransformation>b__0(ITransformationFactory innerFactory) at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()

*** Truncated ***

Make sure the Unify.IdentityBroker.Adapter.EntityTransformation.dll from the first patch is not in the Services directory. The changes originally made to that file were unneeded in the second patch.

It wasn't in the Services folder, but was still in the Patches sub-folder (which I had used as a staging folder). I've cleared that folder and re-started the service - still getting an error but now it says "No value for reverse distinguished name transformation".

The export ran that time! I'm running an import of the Person connector now to confirm the values really did change, but the connector states that there were two saved entities so looks very promising.

This has been working fine since.