2014-02-18 10:27 GMT+01:00 bossant <[email protected]>: > Hi LSC users, > > I noticed that when I use LSC 2.0.3 to synchronize JDBC (Oracle) source > to LDAP (OpenLDAP) destination is asynchronous mode it fails as soon as one > of the result column in JDBC contains a NULL value. The offending code is > in LscAttributes class, in method getStringValueAttribute. I have added the > check on set size (&& ((Set)value).size() == 1) to avoid throwing a > NoSuchElementException: > > @SuppressWarnings("rawtypes") > public String getStringValueAttribute(String attribute) { > Object value = values.get(attribute); > if(value instanceof Set && ((Set)value).size() == 1) { > return ((Set)value).iterator().next().toString(); > } else if(value instanceof List){ > return ((List)value).get(0).toString(); > } > return value != null ? value.toString() : null; > } > > > I tried to use nullValue attribute (set to empty string "") in iBatis XML > configuration file but it still considers the attribute as an empty Set. > How to deal with empty/NULL properties in asynchronous mode ? > The same configuration used in synchronous mode does run successfully. > > Well, seems this is a bug. Can you report it on http://tools.lsc-project.org/projects/show/lsc ?
Clément.
_______________________________________________________________ Ldap Synchronization Connector (LSC) - http://lsc-project.org lsc-users mailing list [email protected] http://lists.lsc-project.org/listinfo/lsc-users

