0
Fixed

Null values stored to database for multivalue attributes

Matthew Clark 7 years ago • updated by anonymous 4 years ago 6

During a full import from a MOSS List adapter, the following error is thrown inside the lazy evaluation stream. This may be because of a bad or incorrect null check in the LDIF components:

Value cannot be null.
at Unify.Framework.IO.LDIFSafeStringFilter.IsSafe(String sourceValue) in c:\workspaces\DEV\FrameworkCore\Source\IO\Unify.Framework.IO.LDIF\LDIFSafeStringFilter.cs:line 46
at Unify.Framework.IO.LDIFValueSpec.WriteComponent(TextWriter writer) in c:\workspaces\DEV\FrameworkCore\Source\IO\Unify.Framework.IO.LDIF\LDIFValueSpec.cs:line 41
at Unify.Framework.IO.LDIFAttrvalSpec.WriteComponent(TextWriter writer) in c:\workspaces\DEV\FrameworkCore\Source\IO\Unify.Framework.IO.LDIF\LDIFAttrvalSpec.cs:line 56
at Unify.Framework.IO.LDIFAttrvalRecord.WriteComponent(TextWriter writer) in c:\workspaces\DEV\FrameworkCore\Source\IO\Unify.Framework.IO.LDIF\LDIFAttrvalRecord.cs:line 60
at Unify.Framework.IO.LDIFComponentFileGenerator`1.GenerateFile(TextWriter writer, IEnumerable`1 entries) in c:\workspaces\DEV\FrameworkCore\Source\IO\Unify.Framework.IO.LDIF\LDIFComponentFileGenerator.cs:line 46
at Unify.Product.IdentityBroker.LDIFAdapterBase.<>c_DisplayClass14`1.<CreateLDIFComponentStream>b_13(Stream stream) in S:\Hg\Product\IdentityBroker\IdentityBroker\Source\Adapter\Unify.IdentityBroker.Adapter.Remoting\LDIFAdapterBase.cs:line 399
at Unify.Framework.IO.LazyEvaluationStream.Evaluate(Object obj) in c:\workspaces\DEV\FrameworkCore\Source\IO\Unify.Framework.IO\LazyEvaluationStream.cs:line 124

Affected Versions:
Fixed by Version:

Adam,

This is because a multivalue field which is null appears in the EntityValue table as a null entry:

2287741 90A5345D-3659-4E71-874B-738ABB6BEAA0 19BC3CA2-C29C-4B84-83DB-243C23E43E4F 5 NULL NULL NULL NULL NULL NULL NULL NULL A2157878-8417-468E-A6DD-D634CEC68B0E 198 0 NULL

The LDIF writer attempts to write all data it is passed, and this value is null. An additional level of protection could be put on the writer such that it doesn't write LDIF containing null values.

The LDIF writer protection has been pushed to Framework.

Reopening due to closing the wrong issue

Remarking as resolved. Resolution to be confirmed.

Confirmed in local testing of the Org Profile connector. Closed.