0
Answered

Specified argument was out of the range of valid values. attributeValue

Matthew Woolnough 6 years ago in UNIFYBroker/Frontier ichris/chris21 • updated by anonymous 4 years ago 12

Runnning full import. Error below thrown.

20130301,02:06:36,UNIFY Identity Broker,Adapter,Warning,"Adapter import all entities for adapter failed.
Adapter import all entities for adapter 6e91a985-feb0-4d17-9ed9-191d9cd85c86 failed with reason Specified argument was out of the range of valid values.
Parameter name: attributeValue. Duration: 00:00:18.1931715
Error details:
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: attributeValue
   at Unify.Framework.IO.DistinguishedNameComponent..ctor(DNAttributeType attributeType, String attributeValue)
   at Unify.Product.IdentityBroker.EntityFieldValueDistinguishedNameComponentGenerator`2.Transform(TEntity sourceValue)
   at Unify.Product.IdentityBroker.EntityDistinguishedNameGenerator`2.<>c__DisplayClass7.<Transform>b__6(IEntityDistinguishedNameComponentGenerator`2 factory)
   at System.Linq.Enumerable.<>c__DisplayClass12`3.<CombineSelectors>b__11(TSource x)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.<SelectManyIterator>d__14`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Unify.Product.IdentityBroker.EntityDistinguishedNameGenerator`2.GetDistinguishedName(Func`2 componentRetrieval)
   at Unify.Product.IdentityBroker.EntityDistinguishedNameGenerator`2.Transform(TEntity sourceValue)
   at Unify.Product.IdentityBroker.DistinguishedNameAttributeMapper.MapAttributeValues(IEntity leftSideEntity, IEntity rightSideEntity)
   at Unify.Product.IdentityBroker.ComposedDNAttributeMapper.MapAttributeValues(IEntity leftSideEntity, IEntity rightSideEntity)
   at Unify.Product.IdentityBroker.EntityDistinguishedNameStaticRelationValueAdapterBase.TransformEntity(IEntity baseValue, ILookup`2 lookupResults)
   at Unify.Product.IdentityBroker.EntityDistinguishedNameStaticRelationValueAdapterBase.<>c__DisplayClass7.<Transform>b__3(IEntity item)
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Unify.Product.IdentityBroker.EntityDistinguishedNameTimeRelationalValueAdapterBase`1.Transform(IEnumerable`1 sourceValue)
   at Unify.Framework.AggregateValueAdapter`1.<Transform>b__0(T current, IValueAdapter`2 valueAdapter)
   at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
   at Unify.Framework.AggregateValueAdapter`1.Transform(T baseValue)
   at System.Linq.Enumerable.<>c__DisplayClass12`3.<CombineSelectors>b__11(TSource x)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at Unify.Framework.Collections.EnumerableExtensions.<ActionOnLast>d__17`1.MoveNext()
   at System.Linq.Enumerable.<SelectManyIterator>d__14`2.MoveNext()
   at Unify.Framework.Collections.EnumerableExtensions.<ActionOnLast>d__17`1.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at Unify.Framework.Collections.ActionOnExceptionEnumerator`1.MoveNext()
   at Unify.Framework.Collections.EnumerableExtensions.<ActionOnLast>d__17`1.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.<SelectManyIterator>d__14`2.MoveNext()
   at System.Linq.Enumerable.<ConcatIterator>d__71`1.MoveNext()
   at Unify.Framework.IO.LDIFComponentFileGenerator`1.GenerateFile(TextWriter writer, IEnumerable`1 entries)
   at Unify.Product.IdentityBroker.LDIFAdapterBase.<>c__DisplayClass14`1.<CreateLDIFComponentStream>b__13(Stream stream)
   at Unify.Framework.IO.LazyEvaluationStream.Evaluate(Object obj)",Normal

Affected Versions:
Fixed by Version:

This error is due to a component being empty when attempting to create the DN.

The issue has been logged to IDB-889.

What is the dn generator configured for that transformation? And do all the fields always have a value?

No, all fields do not always have a value.
When they do however, the value should be converted to a DN and becomes a reference to the users manager.

I guess not everyone has a manager configured.

Hi Matthew,

This particular transformation hasn't changed from v3.0. How does your v4.0 configuration differ from the v2.x configuration?

I spoke with Matthew Clark earlier, and he said that he got around a similar issue by using the field in that you are using in the dn generator as the join criteria. Would this be possible with your data?

I have created IDB-897 for the new feature of a configurable option for not failing if there is missing information required by the DN generator.

The difference is that the DN in 2.0 didn't have 'CN=' in front of it.
It wasn't LDAP compliant.

Just so we are both on the same page here, I have a Chris21:

Person Object: detnumber attribute.
joins with
Placement Object: detnumber

Placement Object: posnumber
joins with
Relationship Object: pdtcode

We then use Relationship Object: relrelat04 as our managers detnumber, so we need to stick a string "CN=" in front of it.

will the code you've written support this?

Matthew

I get what you're trying to do, and it's almost the same as the induction project. The difference being that the induction uses the source field relrelat01. What is in relrelat04? All sites that Matthew Clark has worked on use the relrelat01 field, and use it for a dn reference.

Matt,

See below for a section being used for the SSICT project. It is the underlying XML but hopefully you can see how fields have been configured:

      <adapter name="Relational.dn" key="9ff0b584-ad00-4960-90b8-3c5a9debdf02">
          <Extended InputKey="posnumber" RelationshipConnectorId="c75c5ce1-4df7-49e1-b389-7f35ae3ec583" RelationshipKey="pdtcode">
            <columnMappings>
              <columnMapping SourceAttribute="relrelat01" TargetAttribute="relrelat01" />
            </columnMappings>
          </Extended>
        </adapter>
        <adapter name="Relational.dn" key="52945807-9904-4a48-b7d8-342d8d3215b9">
          <Extended InputKey="relrelat01" RelationshipConnectorId="adfc9a59-40fe-4d56-8404-c228474f24be" RelationshipKey="detnumber" dnMapperTarget="manager">
            <columnMappings />
            <dn>
              <dnComponent name="Field" id="9f8f8216-486e-4c9b-a98a-6173a8c5895b" attributeType="CN" key="detnumber" />
            </dn>
          </Extended>
        </adapter>

Because detnumber joins against relrelat01, a detnumber will always be populated when a value exists, and no join occurs (and hence no dn generation) when there are no values for either one.

Although a little counter intuitive, this worked like a charm.
Thanks all.

Did you use the relrelat01 field? How is it counter intuitive to use the correct field?

The attribute was not incorrect.

Flowing through an attribute which is not required (relrelat04) so that I can use it in a dn generator is counter intuitive.
Would be better if I could apply the DN generator directly to relrelat04.

This issue is marked as important by priority, but has not been updated recently. Please either progress the issue or deprioritize.

This issue is marked as important by priority, is marked as resolved but has not been closed nor updated recently. Please advise what is outstanding in this case or if genuinely resolved then please close it.