0
Answered

Powershell connector in IdB fails on import, "You cannot call a method on a null-valued expression"

Matthew Dayne 7 years ago in PowerShell connector updated by anonymous 7 years ago 1

Import All and Import Changes both fail with the same error message: "Change detection engine import all items for connector Staff Advanced Attribute Precedence Connector failed with reason You cannot call a method on a null-valued expression.. Duration: 00:04:36.5985550"

Checked the data the script should be pulling in and it appears to be fine. Logging in powershell script suggests it finishes its part just fine.

Have tried clearing entities from the IdB connector.

Each import fails at varying entity counts, sometimes round numbers like 10000 or 11500 other times 10781.

Answer

+1
Answer
Answered

Regarding the failure at certain points - that'll be because Identity Broker internally batches up entities so that it can more efficiently perform change detection.

I had a quick look at the script - your logging could be replaced/supplemented with https://unifysolutions.jira.com/wiki/display/IDB51/Logger

The failure is inside your script, so better error handling/logging would help you identify what's going wrong with it. It's like one of your calls is returning null, then you're carrying on as though it was fine - thus causing the exception (think null reference exception - but for PowerShell).

GOOD, I'M SATISFIED
Satisfaction mark by Matthew Dayne 7 years ago
+1
Answer
Answered

Regarding the failure at certain points - that'll be because Identity Broker internally batches up entities so that it can more efficiently perform change detection.

I had a quick look at the script - your logging could be replaced/supplemented with https://unifysolutions.jira.com/wiki/display/IDB51/Logger

The failure is inside your script, so better error handling/logging would help you identify what's going wrong with it. It's like one of your calls is returning null, then you're carrying on as though it was fine - thus causing the exception (think null reference exception - but for PowerShell).