Hi, the force of the java Array don´t work, i get the following error:
ERROR - Error while synchronizing ID {cn=[kw_lehre]}: org.lsc.exception.LscServiceException: java.lang.RuntimeException: java.lang.NoSuchMethodException: None of the fixed arity signatures [(java.lang.Class, int), (java.lang.Class, int[])] or the variable arity signatures [(java.lang.Class, int...)] of the method java.lang.reflect.Array.newInstance match the argument types [jdk.internal.dynalink.beans.StaticClass, java.lang.Long]
King regards, Ali Am 23.02.15 um 11:29 schrieb Clément OUDOT:
2015-02-23 11:21 GMT+01:00 Ali Oezdemir <[email protected]>:Hi Clément, Thank you very much. I solved the problem. I can synchronize the users in OpenLDAP to AD. Now I have another problem: I want to synchronize groups from my OpenLDAP to AD and get this Error: ERROR - Error while modifying entry CN=kw_lehre,OU=Groups,DC=abk-stuttgart,DC=domain in directory :javax.naming.InvalidNameException: CN=kw_lehre,OU=Groups: [LDAP: error code 34 - could not parse [object Array] as a 1.3.6.1.4.1.1466.115.121.1.12 DN]; remaining name 'CN=kw_lehre,OU=Groups' I use the javascript as described in the documentation. The elements are configured correctly because individual elements of the Array can be evaluated but not the complete Array. LSC couldn´t parse the complete Array. I tried it with different delimiter like '$' or ',' but it still doesn´t work, so we can exclude a delimiter problem. I configured the javascript as follows: <string> <![CDATA[rjs: var membersSrcDn = srcBean.getDatasetValuesById("member"); var membersDstDn = []; for (var i=0; i<membersSrcDn.length; i++) { var memberSrcDn = membersSrcDn.get(i); var uid = ""; try { uid = srcLdap.attribute(memberSrcDn, "uid").get(0); } catch(e) { continue; } var destDn = ldap.search("CN=Users", "(sAMAccountName="+uid+")"); if (destDn.length == 0 || destDn.length > 1) { continue; } var destMemberDn = destDn.get(0) + "," + ldap.getContextDn(); membersDstDn.push(destMemberDn); } membersDstDn ]]> </string> Thank you in advance for your help.Try to force a java Array, at the end of the dataset script: var resTab = java.lang.reflect.Array.newInstance(java.lang.String, membersDstDn.length); for ( var i = 0 ; i < membersDstDn.length ; i++) { resTab[i] = membersDstDn[i]; } resTab Clément.
-- Ali Özdemir Rechenzentrum Tel: +49(0)711 28 440 – 133 E-Mail: [email protected] www.meine.abk-stuttgart.de Staatliche Akademie der Bildenden Künste Am Weißenhof 1 D-70191 Stuttgart www.abk-stuttgart.de _______________________________________________________________ Ldap Synchronization Connector (LSC) - http://lsc-project.org lsc-users mailing list [email protected] http://lists.lsc-project.org/listinfo/lsc-users

