0
Fixed

Null reference on entity search when using a DN field added by a relational transformation

Matthew Clark 12 years ago updated by anonymous 8 years ago 9

Attempting an entity search on an adapter with a DN value generated by a relational transformation following the changes for IDB-514, the following error appears:

System.ArgumentNullException: Value cannot be null.
Parameter name: source
at System.Linq.Enumerable.SelectTSource,TResult(IEnumerable`1 source, Func`2 selector)
at Unify.Framework.IO.DistinguishedNameMultiPartComponent.ToString() in c:\workspaces\DEV\FrameworkCore\Source\IO\Unify.Framework.IO.LDIF\DistinguishedNameMultiPartComponent.cs:line 140
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArrayTSource(IEnumerable`1 source)
at Unify.Framework.IO.DistinguishedName.GetStringValue() in c:\workspaces\DEV\FrameworkCore\Source\IO\Unify.Framework.IO.LDIF\DistinguishedName.cs:line 214
at Unify.Connect.Web.EntitySerializer.<>c_DisplayClass5.<EntityDisplayValues>b_2(GroupedNameValueCollectionKey valueKey) in c:\workspaces\DEV\IdentityBroker\Source\Studio\Unify.Connect.Web\Extensions\Entity\EntitySerializer.cs:line 43
at System.Linq.Enumerable.ToDictionaryTSource,TKey,TElement(IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at Unify.Connect.Web.EntitySerializer.EntityDisplayValues(IEntity entity, IDictionary`2 schemaConfiguration) in c:\workspaces\DEV\IdentityBroker\Source\Studio\Unify.Connect.Web\Extensions\Entity\EntitySerializer.cs:line 41
at ASP.Page_Views_Shared_SearchEntities_cshtml.<>cDisplayClass12.<RenderEntities>b_11(TextWriter __razor_helper_writer) in c:\Program Files\UNIFY Solutions\Identity Broker\Web\Views\Shared\SearchEntities.cshtml:line 623
at ASP._Page_Views_Shared_SearchEntities_cshtml.Execute() in c:\Program Files\UNIFY Solutions\Identity Broker\Web\Views\Shared\SearchEntities.cshtml:line 133
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
at System.Web.WebPages.StartPage.ExecutePageHierarchy()
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
at System.Web.Mvc.ControllerActionInvoker.<>c_DisplayClass1c.<InvokeActionResultWithFilters>b_19()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)

The values are correct in the FIM full import file.

The DN format is "CN=SchemaKey,OU=adrtype". The adapter has two keys, detnumber and adrtype, resulting in a DN like: CN=101269+CN=H,OU=H

The values are in the database, eg. "CN=100639+CN=H,OU=H"

This is only happening with a multipart component. If the DN is set to something with multiple components it works fine. The error is being through as the component is populated with a null collection of components. Investigating serialization as a potential cause.

This was because the multipart components were not serializing properly. I have updated their data contract and tested this locally and by patching Test 4. Tony, can you please confirm this in the next build of the service?

Confirmed in latest build of the service.

Reopening for the logging of time

Can this issue be closed?

Yes sorry, issue closed.