On 11/26/2009 02:38 PM, Laurent wrote:
Hi,

 >

 > Well, obviously "objectClass_1: organizationalPerson" isn't a valid

 > objectClass... This string should be "organizationalPerson".

 >

 > Your lsc.properties uses srcBean.getAttributeById('...'). This method,

 > returns an Attribute, as expected. But you want the value of this

 > attribute, so for example use srcBean.getAttributeFirstValueById('...')

 > instead.

I changed the code like this :

lsc.syncoptions.oracle_2_ldap.objectClass.force_value =
srcBean.getAttributeFirstValueById("objectClass_0");
srcBean.getAttributeFirstValueById("objectClass_1");srcBean.getAttributeFirstValueById("objectClass_2");
srcBean.getAttributeFirstValueById("objectClass_3");srcBean.getAttributeFirstValueById("objectClass_4");
srcBean.getAttributeFirstValueById("objectClass_5");srcBean.getAttributeFirstValueById("objectClass_6");
srcBean.getAttributeFirstValueById("objectClass_7");
srcBean.getAttributeFirstValueById("objectClass_8");
srcBean.getAttributeFirstValueById("objectClass_9");
srcBean.getAttributeFirstValueById("objectClass_10")

 >

 > See all the doc on this here:

 > http://lsc-project.org/javadoc/latest/org/lsc/beans/AbstractBean.html

 >

 > Regards,

 > Jonathan

 >

Now, for all the "changetype: add" It seems ok


but for the "changetype: modify" does not work


I see he missed most of the fields in the log:

[java] 228945 - DEBUG - Returned connection 696318316 to pool.

[java] 228985 - ERROR - Error while modifying entry uid=test,ou=people
in directory : javax.naming.directory.SchemaViolationException: [LDAP:
error code 65 - object class 'sambaGroupMapping' requires attribute
'sambaGroupType']; remaining name 'uid=test,ou=people'

[java] 228985 - ERROR - Erreur rencontrée sur l'identifiant
uid=test,ou=people:

[java]

[java] dn: uid=test,ou=people,dc=domaine,dc=fr

[java] changetype: modify

[java] replace: objectclass

[java] objectclass: top

[java] objectclass: organizationalPerson

[java] objectclass: inetOrgPerson

[java] objectclass: posixAccount

[java] objectclass: sambaSamAccount

[java] objectclass: eduPerson

[java] objectclass: supannPerson

[java] objectclass: radiusprofile

[java] objectclass: inetLocalMailRecipient

[java] objectclass: sambaGroupMapping

[java] objectclass: uboPersonne

[java]

[java] 228986 - DEBUG - Checked out connection 696318316 from pool.

Why for the lines "changetype: add" is ok and not with "changetype: add"?

Well, it looks OK to me. Once the object is added to your directory, a modification will only update changed fields - so if nothing changed in the source, there shouldn't be any changes to the directory!

However, I see that in this case, LSC is trying to replace all the objectClass values. This is probably because the list from the source is not quite the same as the list in the destination.

You could try using a merge type for objectClass, which means that values won't be replaced, just added - add a line in lsc.properties like this:
lsc.syncoptions.oracle_2_ldap.objectClass.action = M

Hope this helps,
Jonathan
--
--------------------------------------------------------------
Jonathan Clarke - [email protected]
--------------------------------------------------------------
Ldap Synchronization Connector (LSC) - http://lsc-project.org
--------------------------------------------------------------
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-users mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-users

Reply via email to