See http://lsc-project.org/wiki/documentation/1.2/configuration/syncoptions
Regards, Raphaël Ouazana. Le Jeu 17 juin 2010 12:07, [email protected] a écrit : > I have an other problem : > The phone numbers are added from source too destination when there was no > telephone number in destination. Howerver, when I modify the phone number > in the source the phone number is not modified in the destination. > In my configuration file there was : > > lsc.tasks.ADpam.srcService.pivotAttrs = ou st > lsc.tasks.ADpam.srcService.attrs = ou st telephoneNumber objectClass > lsc.tasks.ADpam.dstService.pivotAttrs = ou st > lsc.tasks.ADpam.dstService.attrs = ou st telephoneNumber objectClass > > I tried to add telephoneNumber in pivotAttrs but nothing happened... > Have you got suggestions? > > -------- Message d'origine-------- > De: Raphaël Ouazana-Sustowski [mailto:[email protected]] > Date: jeu. 17/06/2010 10:36 > À: François Chapuis ([email protected]) > Cc: Gunter Holzer; [email protected] > Objet : Re: RE : RE : ldap2ldap synchro task configuration > > Please respect the syntax. > properties files and Javascript are special, you can't write that. > > Ths syntax is : > lsc.tasks.<taskName>.dn = <script> > > where <script> is a Javascript script like this one, and where you must > escape carriage return. > > Le Jeu 17 juin 2010 10:22, [email protected] a écrit : >> The script didn't worked (the destination dn was undefined) and I >> changed >> it into : >> >> var dn = "" + srcBean.getDistinguishedName() ; >> var pos = dn.lastIndexOf("dc=testDomain,dc=com") ; >> if (pos > 0) { >> dn = dn.substring(0, pos - 1); >> } >> lsc.tasks.ADpam.dn = dn; >> >> With this script the telephone Number are added but there still have a >> lot >> of errors : >> juin 17 10:13:59 - ERROR - org.mozilla.javascript.EcmaError: >> ReferenceError: "dn >> " n'est pas dÚfini (<cmd>#1) >> juin 17 10:13:59 - ERROR - org.mozilla.javascript.EcmaError: >> ReferenceError: "dn >> " n'est pas dÚfini (<cmd>#1) >> juin 17 10:13:59 - ERROR - org.mozilla.javascript.EcmaError: >> ReferenceError: "dn >> " n'est pas dÚfini (<cmd>#1) >> juin 17 10:13:59 - INFO - # Updating entry >> ou=UnitLevel2b,ou=UnitLevel1a >> for AD >> pam >> dn: ou=UnitLevel2b,ou=UnitLevel1a,dc=testDomain,dc=com >> changetype: modify >> add: telephoneNumber >> telephoneNumber: 0477000000 >> These errors are printed for each unit... Do I have to ignore these >> errors? >> >> Morover the unit I wanted to be created is not : >> juin 17 10:13:59 - ERROR - org.mozilla.javascript.EcmaError: >> ReferenceError: "dn >> " n'est pas dÚfini (<cmd>#1) >> juin 17 10:13:59 - WARN - No DN set! Trying to generate an DN based on >> the uid >> attribute! >> juin 17 10:13:59 - ERROR - Error while synchronizing ID {ou=UnitLevel4c, >> st=4c}: >> java.lang.RuntimeException: -- Development error: No RDN found (uid by >> default) >> ! >> How can I create the missing unit in the destination? >> >> François Chapuis >> >> >> -------- Message d'origine-------- >> De: Raphaël Ouazana-Sustowski [mailto:[email protected]] >> Date: jeu. 17/06/2010 10:00 >> À: François Chapuis ([email protected]) >> Cc: Gunter Holzer; [email protected] >> Objet : Re: RE : ldap2ldap synchro task configuration >> >> This is my fault... the script was not tested (and is still not...). >> Please try: >> lsc.tasks.ADpam.dn = var dn = "" + srcBean.getDistinguishedName() ; \ >> var pos = dn.lastIndexOf("dc=testDomain,dc=com") ; \ >> if (pos > 0) { \ >> dn = dn.substring(0, pos - 1); \ >> } \ >> dn >> >> Regards, >> Raphaël Ouazana. >> >> >> Le Jeu 17 juin 2010 09:53, [email protected] a écrit : >>> It worked when I had filtered with one item : >>> lsc.tasks.ADpam.srcService.filterAll = >>> (&(ou=UnitLevel2b)(objectClass=organizationalUnit)) >>> Thank you all for your help >>> However I tried to synchromize all units together by changing the >>> command >>> filter >>> lsc.tasks.ADpam.srcService.filterAll = >>> (&(ou=*)(objectClass=organizationalUnit)) >>> Now I have a problem with the DN when a unit was in the source but not >>> in >>> the destination. I wished the unit in the source to be added in the >>> destination. >>> Here are an extract of the errors: >>> juin 17 09:38:36 - ERROR - org.mozilla.javascript.EcmaError: >>> ReferenceError: "dn >>> " n'est pas dÚfini (<cmd>#1) >>> juin 17 09:38:36 - WARN - No DN set! Trying to generate an DN based on >>> the uid >>> attribute! >>> juin 17 09:38:36 - ERROR - Error while synchronizing ID >>> {ou=UnitLevel4c, >>> st=4c}: >>> java.lang.RuntimeException: -- Development error: No RDN found (uid by >>> default) >>> ! >>> juin 17 09:38:36 - ERROR - org.mozilla.javascript.EcmaError: >>> ReferenceError: "dn >>> " n'est pas dÚfini (<cmd>#1) >>> juin 17 09:38:36 - ERROR - org.mozilla.javascript.EcmaError: >>> ReferenceError: "dn >>> " n'est pas dÚfini (<cmd>#1) >>> juin 17 09:38:36 - ERROR - org.mozilla.javascript.EcmaError: TypeError: >>> Cannot c >>> all method "substring" of null (<cmd>#1) >>> >>> I think that Because the dn is not already created in the destination >>> It >>> can't change it. How about creating it? >>> There are a lot more errors after but I think they are linked with. >>> >>> Regards, >>> François Chapuis >>> >>> -------- Message d'origine-------- >>> De: Raphaël Ouazana-Sustowski [mailto:[email protected]] >>> Date: jeu. 17/06/2010 09:29 >>> À: François Chapuis ([email protected]) >>> Cc: Gunter Holzer; [email protected] >>> Objet : Re: ldap2ldap synchro task configuration >>> >>> Hi, >>> >>> OK I see the problem: the dn is complete so the suffix is added twice. >>> >>> Please try the following: >>> lsc.tasks.ADpam.dn = srcBean.getDistinguishedName().substring(0, >>> dn.lastIndexOf("dc=testDomain,dc=com") - 1) >>> >>> >>> Le Jeu 17 juin 2010 09:24, [email protected] a écrit : >>>> Hi, >>>> I changed it but it makes the same error. It seems that it wants to >>>> delete >>>> the previous item but can't do it because this item has children. >>>> Here is again the error : >>>> juin 17 09:15:04 - WARN - WARNING: updating the RDN of the entry will >>>> cancel ot >>>> her modifications! Relaunch synchronization to complete update. >>>> juin 17 09:15:04 - ERROR - Object ou=UnitLevel2b,ou=UnitLevel1a not >>>> deleted beca >>>> use it has children (LDAP error code 66 received). To delete this >>>> entry >>>> and it's >>>> subtree, set the dst.java.naming.recursivedelete property to true >>>> juin 17 09:15:04 - ERROR - Error while synchronizing ID >>>> ou=UnitLevel2b,ou=UnitLe >>>> vel1a: java.lang.Exception: Technical problem while applying >>>> modifications >>>> to di >>>> rectory >>>> dn: ou=UnitLevel2b,ou=UnitLevel1a,dc=testDomain,dc=com >>>> changetype: modrdn >>>> newrdn: ou=UnitLevel2b >>>> deleteoldrdn: 1 >>>> newsuperior: ou=UnitLevel1a,dc=testDomain,dc=com,dc=testDomain,dc=com >>>> >>>> Do I really have to set the dst.java.naming.recursivedelete property >>>> to >>>> true? Is there any other way not to delete the element? >>>> >>>> Regards, >>>> François Chapuis >>>> >>>> -------- Message d'origine-------- >>>> De: Raphaël Ouazana-Sustowski [mailto:[email protected]] >>>> Date: mer. 16/06/2010 18:03 >>>> À: François Chapuis ([email protected]) >>>> Cc: Gunter Holzer; [email protected] >>>> Objet : Re: RE : [lsc-users] RE : RE : ldap2ldap synchro tasks >>>> >>>> If the dn is the same after and before, why don't you simply put: >>>> lsc.tasks.ADpam.dn = srcBean.getDistinguishedName() >>>> >>>> Regards, >>>> Raphaël Ouazana. >>>> >>>> Le Mer 16 juin 2010 18:00, [email protected] a écrit : >>>>> I wanted to use the second solution so here was my DN creator : >>>>> lsc.tasks.ADpam.dn = "ou=" + srcBean.getAttributeValueById("ou") + >>>>> ","+srcBean.getDistinguishedName() >>>>> There is now a new error >>>>> juin 16 17:47:06 - WARN - WARNING: updating the RDN of the entry >>>>> will >>>>> cancel ot >>>>> her modifications! Relaunch synchronization to complete update. >>>>> juin 16 17:47:06 - ERROR - Object ou=UnitLevel2b,ou=UnitLevel1a not >>>>> deleted beca >>>>> use it has children (LDAP error code 66 received). To delete this >>>>> entry >>>>> and it's >>>>> subtree, set the dst.java.naming.recursivedelete property to true >>>>> juin 16 17:47:06 - ERROR - Error while synchronizing ID >>>>> ou=UnitLevel2b,ou=UnitLe >>>>> vel1a: java.lang.Exception: Technical problem while applying >>>>> modifications >>>>> to di >>>>> rectory >>>>> dn: ou=UnitLevel2b,ou=UnitLevel1a,dc=testDomain,dc=com >>>>> changetype: modrdn >>>>> newrdn: ou=UnitLevel2b >>>>> deleteoldrdn: 1 >>>>> newsuperior: >>>>> ou=UnitLevel2b,ou=UnitLevel1a,dc=testDomain,dc=com,dc=testDomain,dc >>>>> =com >>>>> >>>>> It maybe want to delete the current slot in order to create a new one >>>>> to >>>>> the specified dn but it can't because it has children. Quite strange >>>>> because I don't want to change the dn (the new and the ancient are >>>>> the >>>>> same). >>>>> >>>>> >>>>> -------- Message d'origine-------- >>>>> De: Raphaël Ouazana-Sustowski [mailto:[email protected]] >>>>> Date: mer. 16/06/2010 17:25 >>>>> À: François Chapuis ([email protected]) >>>>> Cc: Gunter Holzer; [email protected] >>>>> Objet : Re: [lsc-users] RE : RE : ldap2ldap synchro tasks >>>>> >>>>> Hi, >>>>> >>>>> In fact the two solutions seems to be feasible: >>>>> >>>>> Le Mer 16 juin 2010 17:07, [email protected] a écrit : >>>>>> I think that two solutions are possible but I don't know how to do >>>>>> it >>>>>> my method filterAll : >>>>>> lsc.tasks.ADpam.srcService.filterAll = >>>>>> (&(ou=*)(objectClass=organizationalUnit)) >>>>>> This method should be modified in something like: >>>>>> lsc.tasks.ADpam.srcService.filterAll = >>>>>> (&(ou=*)(objectClass=organizationalUnit)(dn=ou=UnitLevel1a,dc=testDomain,dc=com)) >>>>>> (this doesn't work because dn in not an attribute) and I will have >>>>>> two >>>>>> make one task by level of hierarchy. >>>>> >>>>> No, but extended filters (if AD support them) exist: >>>>> (entryDN:dnSubtreeMatch:=ou=UnitLevel1a,dc=testDomain,dc=com) >>>>> >>>>>> The other solution is to modify the dn where it is printed >>>>>> here is the curent dn constructor: >>>>>> lsc.tasks.ADpam.dn = "ou=" + srcBean.getAttributeValueById("ou") + >>>>>> ",ou=UnitLevel1a" >>>>>> lsc.tasks.ADpam.dn = "ou=" + srcBean.getAttributeValueById("ou") >>>>>> +"," >>>>>> srcBean.getDN() >>>>>> but this method doesn't exist. >>>>>> Have you got suggestions? >>>>> >>>>> I think you are looking for the getDistinguishedName() method (named >>>>> getDistinguishName in old versions). >>>>> >>>>> Regards, >>>>> Raphaël Ouazana. >>>>> >>>>>> -------- Message d'origine-------- >>>>>> De: Gunter Holzer [mailto:[email protected]] >>>>>> Date: mer. 16/06/2010 15:37 >>>>>> À: François Chapuis ([email protected]) >>>>>> Cc: [email protected] >>>>>> Objet : AW: RE : ldap2ldap synchro tasks >>>>>> >>>>>> How does your DN constructor look like? >>>>>> >>>>>> lsc.tasks.ADuser.dn = "CN=" + srcBean.getAttributeValueById("CN") + >>>>>> ",OU=OpenLDAP" >>>>>> >>>>>> Von: [email protected] [mailto:[email protected]] >>>>>> Gesendet: Mittwoch, 16. Juni 2010 15:32 >>>>>> An: Gunter Holzer >>>>>> Cc: [email protected] >>>>>> Betreff: RE : ldap2ldap synchro tasks >>>>>> >>>>>> >>>>>> This time it runned but I have some errors and warning >>>>>> The first error comes from the fact that there is no UnitLevel4c in >>>>>> my >>>>>> destination serveur but I wanted this unit to be added : >>>>>> juin 16 14:55:05 - ERROR - Error while adding entry >>>>>> ou=UnitLevel4c,ou=UnitLevel1 >>>>>> a in directory :javax.naming.directory.SchemaViolationException: >>>>>> [LDAP: >>>>>> error co >>>>>> de 65 - entry has no objectClass attribute]; remaining name >>>>>> 'ou=UnitLevel4c,ou=U >>>>>> nitLevel1a' >>>>>> juin 16 14:55:05 - ERROR - Error while synchronizing ID >>>>>> ou=UnitLevel4c,ou=UnitLe >>>>>> vel1a: java.lang.Exception: Technical problem while applying >>>>>> modifications >>>>>> to di >>>>>> rectory >>>>>> dn: ou=UnitLevel4c,ou=UnitLevel1a,dc=testDomain,dc=com >>>>>> changetype: add >>>>>> ou: UnitLevel4c >>>>>> telephoneNumber: 0478444500 >>>>>> st: 4c >>>>>> >>>>>> >>>>>> The following INFO shows that all my sub-entries which were not >>>>>> direct >>>>>> sub-entries of UnitLevel1a are changed to sub-entries of UnitLevel1 >>>>>> and >>>>>> their telephoneNumber are not modified. >>>>>> My hierarchy was like that in the source: >>>>>> ou=UnitLevel1a >>>>>> ou=UnitLevel2a >>>>>> ou=UnitLevel3a >>>>>> ou=UnitLevel4a >>>>>> ou=UnitLevel4b >>>>>> ou=UnitLevel3b >>>>>> ou=UnitLevel4c >>>>>> ou=UnitLevel2b >>>>>> ou=UnitLevel3c >>>>>> And after synchronization in the destination: >>>>>> ou=UnitLevel1a >>>>>> ou=UnitLevel2a >>>>>> ou=UnitLevel2b >>>>>> ou=UnitLevel3a >>>>>> ou=UnitLevel3b >>>>>> ou=UnitLevel3c >>>>>> ou=UnitLevel4a >>>>>> ou=UnitLevel4b >>>>>> And except UnitLevel2a and UnitLevel2b no on has got the new >>>>>> telephone >>>>>> number. >>>>>> One of the INFO : >>>>>> juin 16 14:55:05 - INFO - # Renaming entry >>>>>> ou=UnitLevel4b,ou=UnitLevel3a,ou=Uni >>>>>> tLevel2a,ou=UnitLevel1a for ADpam >>>>>> dn: >>>>>> ou=UnitLevel4b,ou=UnitLevel3a,ou=UnitLevel2a,ou=UnitLevel1a,dc=testDomain,dc >>>>>> =com >>>>>> changetype: modrdn >>>>>> newrdn: ou=UnitLevel4b >>>>>> deleteoldrdn: 1 >>>>>> newsuperior: ou=UnitLevel1a,dc=testDomain,dc=com >>>>>> >>>>>> What is the procedure in order to not to change the rdn? >>>> >>> >>> >>> >>> >>> >>> >> >> >> >> >> >> > > > > > > _______________________________________________________________ Ldap Synchronization Connector (LSC) - http://lsc-project.org lsc-users mailing list [email protected] http://lists.lsc-project.org/listinfo/lsc-users

