0
Answered

Connector failed with reason The key <null> has been duplicated

Eddie Kirkman 2 years ago in UNIFYBroker/Aurion • updated by anonymous 2 years ago 21 1 duplicate

Aurion Security connector. Supposedly the prod and test instances are identically configured. In TEST I can connect security connector, retrieve and configure schema and then import all and get the users. In Prod, the connect and schema retrieval works, but the import all gives the following error. I have a copy of the XML file generated by the query and cannot see anything obviously wrong with it. Just wondering if you can suggest where I might look next?

Connector processing failed.
Connector Processing page 1 for

connector ProdSec failed with reason The key <null> has been

duplicated.. Duration: 00:00:00.0156193.
Error details:
System.ArgumentException: The key <null> has been duplicated.
at Unify.Product.IdentityBroker.EntityRepositoryExtensions.DuplicateKeyBase(MultiKeyValue`1 arg1)

at

Unify.Framework.Collections.EnumerableExtensions.ToDictionaryWithKeyClashError[TKey,TValue,TOriginal](IEnumerable`1

originalEnumerable, Func`2 keySelector, Func`2 valueSelector, Action`3

duplicateAction)
at

Unify.Product.IdentityBroker.EntityRepositoryExtensions.ConvertConnectorEntitiesWithRepositoryEntities(IEnumerable`1

connectorEntities, IMultiKey`1 schemaKey, Func`2 retrieveEntities, Guid

connectorId, IEnumerable`1 originalEntities, IHashSet`1 seenKeys)

at

Unify.Product.IdentityBroker.EntityRepositoryExtensions.ConvertConnectorEntitiesWithRepositoryEntities(IEnumerable`1

connectorEntities, IMultiKey`1 schemaKey, IKnownEntityContextBase`3

context, Guid connectorId, IEnumerable`1 originalEntities, IHashSet`1

seenKeys)
at

Unify.Product.IdentityBroker.RepositoryChangeDetectionWorkerBase.PerformChangeDetectionOnConnectorEntityPage(IEnumerable`1

connectorEntities, Int32& index, Int32 entitiesProcessedSoFar,

IEntityChangesReportGenerator`2 reportGenerator, IHashSet`1 seenKeys)

at

Unify.Product.IdentityBroker.RepositoryChangeDetectionWorkerBase.<>c__DisplayClass11_0.<PerformChangeDetection>b__0(IEnumerable`1

page)
at Unify.Framework.Visitor.ThreadsafeVisitorEvaluator`1.ThreadsafeItemEvaluator.Evaluate()

Affected Versions:
Fixed by Version:

Answer

Answer
Under review

Is it failing with the same connector configuration file? Or are you rebuilding? If rebuilding please confirm that the schema field mappings are there and match what was in test.

GOOD, I'M SATISFIED

Thanks for the help

Satisfaction mark by Eddie Kirkman 2 years ago

Duplicates 1

Answer
Under review

Is it failing with the same connector configuration file? Or are you rebuilding? If rebuilding please confirm that the schema field mappings are there and match what was in test.

Just to confirm. The issue giving the "The key <null> has been duplicated" error was to do with the schema mapping in the connector. Viewed in the GUI the mappings between the query and schema were showing, but when looking in the underlying XML they were missing, so all attributes mapped to null and it fell over. The fix for me was to clear the schema, recreate it, fix up the mappings again and save the change. I suspect just making one change would have done it too.

Correct, just saving the connector settings again would have added the schema mapping.

A change has been made to the connector (awaiting release) that has the connector import use the same default schema that appears in the UI before the mapping is saved.

Under review

Hi Matt,

Could you please check that the schema mappings are configured correctly, as per http://voice.unifysolutions.net/topics/2821-connector-failed-with-reason-the-key-null-has-been-duplicated/

Where can I find the mapping? I did see an error on one of the connectors referring to this, but couldn't find anything about it in the doco.



Looking in XML, there is same mapping 

          <apiSchema name="AQT_Output">
            <queries>
              <query queryId="QRY_UNIFY_SECUSE" />
            </queries>
            <attribute name="User" target="User" />
            <attribute name="OsUserId" target="OsUserId" />
            <attribute name="Name" target="Name" />
            <attribute name="PersonNumber" target="PersonNumber" />
            <attribute name="Status" target="Status" />
            <attribute name="PasswordExpired" target="PasswordExpired" />
            <attribute name="ExternalMailType" target="ExternalMailType" />
            <attribute name="EmailAddress" target="EmailAddress" />
            <attribute name="MessageGroupCode" target="MessageGroupCode" />
          </apiSchema>

Hi Matt,

Are you sure that the Names you have supplied for the Mappings are correct? I'm not very familiar with Aurion but I believe these are usually written in Snake_Case, as in the screenshot on https://unifysolutions.jira.com/wiki/display/IDBAUR51/Aurion+Security+User+Connector

Not sure about the underlying workings of Aurion. I'm just going by what the schema detection brings back. 




The previous solution has a mapping of snake case to pascal case. Is the schema detection doing this automatically?

I updated the source to be Pascal case and the import works.  The schema detection appears to be broken.

On some of the other connectors when I attempt to request schema, I get the error "Value cannot be null. Parameter name: key".  Not sure if this is related, or if I should create a seperate issue.

Hi Matt,

This is a known issue with a fix to be included in the next release. Please let me know if you need it and I can supply a patch in advance.

Known by whom?  Is there a 'known issues' page where I can see this, so I'm not wasting my time?

A patch would save me a great deal of time. Thanks.


Apologies for the inconvenience. This was only discovered by Product Group on Friday last week so no issue currently exists for this. I'll convert this comment chain into an issue for future reference.

Please extract Web.zip and follow the folder hierarchy to update ApplySchemaProvider.cshtml

Searching for this error in voice doesn't return any result, so this probably isn't the best way to communicate known issues if this is it. 





Hi Matt,

Please try starting from the forum for the relevant product, e.g. for Identity Broker try searching from http://voice.unifysolutions.net/forums/6-identity-broker-forum/

OK, I didn't realise the search was partitioned to a single topic.  That seems a little odd, but seems to work better. Thanks.