Hi again,

I filter on my name so that I  test first but the same thing happens when I 
don't filter (please see logs below). It is as if srcBean.getAttributeValueById 
does not work. Is there any chance?

New config for (sAMAccountName=*):
lsc.tasks = AD2ldap

lsc.tasks.AD2ldap.srcService = org.lsc.jndi.SimpleJndiSrcService
lsc.tasks.AD2ldap.srcService.baseDn = OU=UsersOU
lsc.tasks.AD2ldap.srcService.filterAll = (&(objectClass=user)(sAMAccountName=*))
lsc.tasks.AD2ldap.srcService.pivotAttrs = sAMAccountName
lsc.tasks.AD2ldap.srcService.filterId = 
(&(objectClass=user)(sAMAccountName={sAMAccountName}))
lsc.tasks.AD2ldap.srcService.attrs = description cn sn


lsc.tasks.AD2ldap.dstService = org.lsc.jndi.SimpleJndiDstService
lsc.tasks.AD2ldap.dstService.baseDn = ou=UsersOU
lsc.tasks.AD2ldap.dstService.filterAll = (objectClass=inetOrgPerson)
lsc.tasks.AD2ldap.dstService.pivotAttrs =  uid
lsc.tasks.AD2ldap.dstService.filterId = (&(objectClass=inetOrgPerson)( 
uid={sAMAccountName}))
lsc.tasks.AD2ldap.dstService.attrs = description cn sn objectClass

lsc.tasks.AD2ldap.bean = org.lsc.beans.SimpleBean
lsc.tasks.AD2ldap.dn = "uid=" + srcBean.getAttributeValueById("sAMAccountName") 
+ ",ou=UsersOU"
dn.real_root = dc=velti,dc=net

lsc.syncoptions.AD2ldap = org.lsc.beans.syncoptions.PropertiesBasedSyncOptions
lsc.syncoptions.AD2ldap.default.action = F
lsc.syncoptions.AD2ldap.objectClass.action = K
lsc.syncoptions.AD2ldap.objectClass.create_value = 
"inetOrgPerson","organizationalPerson","person","top","posixAccount"



Logs:
# /opt/lsc-1.2.1/bin/lsc --config /opt/lsc-1.2.1/etc/ --synchronize all
Oct 24 15:41:43 - DEBUG - Reading configuration from /opt/lsc-1.2.1/etc/
Oct 24 15:41:43 - DEBUG - Loading configuration url: 
file:/opt/lsc-1.2.1/etc/lsc.properties
Oct 24 15:41:43 - INFO  - Starting sync for AD2ldap
Oct 24 15:41:43 - INFO  - Connecting to LDAP server 
ldap://10.1.1.10:389/dc=velti,dc=net as cn=Anna 
Panagidou,OU=UsersOU,dc=velti,dc=net
Oct 24 15:41:43 - DEBUG - Using JNDI URL setting of 
"ldap://10.1.1.10:389/dc=velti,dc=net??base?(objectclass=*) "
Oct 24 15:41:43 - DEBUG - Using pagedResults control for 1000 entries at a time
Oct 24 15:41:44 - DEBUG - Adding 'K' sync type for attribute name objectClass.
Oct 24 15:41:44 - DEBUG - Adding 'F' sync type for attribute name default.
Oct 24 15:41:44 - DEBUG - Synchronizing AD2ldap for {samaccountname=etomadaki}
Oct 24 15:41:44 - INFO  - Connecting to LDAP server 
ldap://localhost:389/dc=velti,dc=net as cn=root,dc=velti,dc=net
Oct 24 15:41:44 - DEBUG - Using JNDI URL setting of 
"ldap://localhost:389/dc=velti,dc=net??base?(objectclass=*) "
Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU":  List of attributes 
considered for writing in destination: [sn, cn, description, objectClass]
Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU":  Attribute "sn" is in 
FORCE status
Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU":  Adding attribute "sn" 
with values [Tomadaki]
Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU":  Attribute "cn" is in 
FORCE status
Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU":  Adding attribute "cn" 
with values [Elia Tomadaki]
Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU":  Attribute "description" 
is in FORCE status
Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU":  Attribute "description" 
will not be written to the destination
Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU":  Attribute "objectClass" 
is in KEEP status
Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU":  Adding attribute 
"objectClass" with values [posixAccount]
Oct 24 15:41:44 - ERROR - Error while adding entry uid=,ou=UsersOU in directory 
:javax.naming.InvalidNameException: uid=,ou=UsersOU: [LDAP: error code 34 - 
invalid DN]; remaining name 'uid=,ou=UsersOU'
Oct 24 15:41:44 - ERROR - Error while synchronizing ID uid=,ou=UsersOU: 
java.lang.Exception: Technical problem while applying modifications to directory
Oct 24 15:41:44 - DEBUG - java.lang.Exception: Technical problem while applying 
modifications to directory
java.lang.Exception: Technical problem while applying modifications to directory
        at 
org.lsc.AbstractSynchronize.synchronize2Ldap(AbstractSynchronize.java:399) 
[lsc-core-1.2.1.jar:na]
        at org.lsc.SimpleSynchronize.launchTask(SimpleSynchronize.java:272) 
[lsc-core-1.2.1.jar:na]
        at org.lsc.SimpleSynchronize.launch(SimpleSynchronize.java:155) 
[lsc-core-1.2.1.jar:na]
        at org.lsc.Launcher.run(Launcher.java:151) [lsc-core-1.2.1.jar:na]
        at org.lsc.Launcher.main(Launcher.java:123) [lsc-core-1.2.1.jar:na]
dn: uid=,ou=UsersOU,dc=velti,dc=net
changetype: add
sn: Tomadaki
cn: Elia Tomadaki
objectClass: posixAccount

Oct 24 15:41:44 - DEBUG - Synchronizing AD2ldap for {samaccountname=tneda}
Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU":  List of attributes 
considered for writing in destination: [sn, cn, description, objectClass]
Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU":  Attribute "sn" is in 
FORCE status
Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU":  Adding attribute "sn" 
with values [Tozija]
Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU":  Attribute "cn" is in 
FORCE status
Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU":  Adding attribute "cn" 
with values [Neda Tozija]
Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU":  Attribute "description" 
is in FORCE status
Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU":  Attribute "description" 
will not be written to the destination
Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU":  Attribute "objectClass" 
is in KEEP status
Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU":  Adding attribute 
"objectClass" with values [posixAccount]
Oct 24 15:41:44 - ERROR - Error while adding entry uid=,ou=UsersOU in directory 
:javax.naming.InvalidNameException: uid=,ou=UsersOU: [LDAP: error code 34 - 
invalid DN]; remaining name 'uid=,ou=UsersOU'
Oct 24 15:41:44 - ERROR - Error while synchronizing ID uid=,ou=UsersOU: 
java.lang.Exception: Technical problem while applying modifications to directory
Oct 24 15:41:44 - DEBUG - java.lang.Exception: Technical problem while applying 
modifications to directory
java.lang.Exception: Technical problem while applying modifications to directory
        at 
org.lsc.AbstractSynchronize.synchronize2Ldap(AbstractSynchronize.java:399) 
[lsc-core-1.2.1.jar:na]
        at org.lsc.SimpleSynchronize.launchTask(SimpleSynchronize.java:272) 
[lsc-core-1.2.1.jar:na]
        at org.lsc.SimpleSynchronize.launch(SimpleSynchronize.java:155) 
[lsc-core-1.2.1.jar:na]
        at org.lsc.Launcher.run(Launcher.java:151) [lsc-core-1.2.1.jar:na]
        at org.lsc.Launcher.main(Launcher.java:123) [lsc-core-1.2.1.jar:na]
dn: uid=,ou=UsersOU,dc=velti,dc=net
changetype: add
sn: Tozija
cn: Neda Tozija
objectClass: posixAccount


and so on


Anna























Anna Panagidou | Senior Systems Administrator

Velti
44 Kifisias Ave.
15125 Marousi, Athens, Greece
T   +30.211.101.2555
M  +30.694.418.1701
E   [email protected]
www.velti.com

Velti is a global leader in mobile marketing and advertising solutions for 
mobile operators, ad agencies, brands and media groups.
San Francisco | New York | Los Angeles | Dublin | London | Paris | Madrid | 
Dusseldorf | Athens | Sofia | Moscow | Dubai | New Delhi | Singapore | Beijing 
| Shanghai | Sydney-----Original Message-----
From: Clément OUDOT [mailto:[email protected]]
Sent: Monday, October 24, 2011 3:33 PM
To: Anna Panagidou
Cc: [email protected]
Subject: Re: [lsc-users] srcBean.getAttributeValueById does not return a value 
from Active Directory

Le 24 octobre 2011 13:57, Anna Panagidou <[email protected]> a écrit :
> Hi,
>
>
> Thanks for the answer. I have tried that too but without luck. Can you take a 
> look and see if there is something I am missing?
> My new config:
> lsc.tasks = AD2ldap
>
> lsc.tasks.AD2ldap.srcService = org.lsc.jndi.SimpleJndiSrcService
> lsc.tasks.AD2ldap.srcService.baseDn = OU=UsersOU
> lsc.tasks.AD2ldap.srcService.filterAll = 
> (&(objectClass=user)(sAMAccountName=apanagidou))
> lsc.tasks.AD2ldap.srcService.pivotAttrs = sAMAccountName
> lsc.tasks.AD2ldap.srcService.filterId = 
> (&(objectClass=user)(sAMAccountName={sAMAccountName}))
> lsc.tasks.AD2ldap.srcService.attrs = description cn sn
>
>
> lsc.tasks.AD2ldap.dstService = org.lsc.jndi.SimpleJndiDstService
> lsc.tasks.AD2ldap.dstService.baseDn = ou=UsersOU
> lsc.tasks.AD2ldap.dstService.filterAll = (objectClass=inetOrgPerson)
> lsc.tasks.AD2ldap.dstService.pivotAttrs =  uid
> lsc.tasks.AD2ldap.dstService.filterId = (&(objectClass=inetOrgPerson)( 
> uid={sAMAccountName}))
> lsc.tasks.AD2ldap.dstService.attrs = description cn sn objectClass
>
> lsc.tasks.AD2ldap.bean = org.lsc.beans.SimpleBean
> lsc.tasks.AD2ldap.dn = "uid=" + 
> srcBean.getAttributeValueById("sAMAccountName") + ",ou=UsersOU"
> dn.real_root = dc=velti,dc=net
>
> lsc.syncoptions.AD2ldap = org.lsc.beans.syncoptions.PropertiesBasedSyncOptions
> lsc.syncoptions.AD2ldap.default.action = F
> lsc.syncoptions.AD2ldap.objectClass.action = K
> lsc.syncoptions.AD2ldap.objectClass.create_value = 
> "inetOrgPerson","organizationalPerson","person","top","posixAccount"
>
> The logs again:
>
>
> # /opt/lsc-1.2.1/bin/lsc --config /opt/lsc-1.2.1/etc/ --synchronize all
> Oct 24 14:55:41 - DEBUG - Reading configuration from /opt/lsc-1.2.1/etc/
> Oct 24 14:55:41 - DEBUG - Loading configuration url: 
> file:/opt/lsc-1.2.1/etc/lsc.properties
> Oct 24 14:55:41 - INFO  - Starting sync for AD2ldap
> Oct 24 14:55:41 - INFO  - Connecting to LDAP server 
> ldap://10.1.1.10:389/dc=velti,dc=net as cn=Anna 
> Panagidou,OU=UsersOU,dc=velti,dc=net
> Oct 24 14:55:41 - DEBUG - Using JNDI URL setting of 
> "ldap://10.1.1.10:389/dc=velti,dc=net??base?(objectclass=*) "
> Oct 24 14:55:41 - DEBUG - Using pagedResults control for 1000 entries at a 
> time
> Oct 24 14:55:41 - DEBUG - Adding 'K' sync type for attribute name objectClass.
> Oct 24 14:55:41 - DEBUG - Adding 'F' sync type for attribute name default.
> Oct 24 14:55:41 - DEBUG - Synchronizing AD2ldap for 
> {samaccountname=apanagidou}
> Oct 24 14:55:41 - INFO  - Connecting to LDAP server 
> ldap://localhost:389/dc=velti,dc=net as cn=root,dc=velti,dc=net
> Oct 24 14:55:41 - DEBUG - Using JNDI URL setting of 
> "ldap://localhost:389/dc=velti,dc=net??base?(objectclass=*) "
> Oct 24 14:55:41 - DEBUG - In entry "uid=,ou=UsersOU":  List of attributes 
> considered for writing in destination: [sn, cn, description, objectClass]
> Oct 24 14:55:41 - DEBUG - In entry "uid=,ou=UsersOU":  Attribute "sn" is in 
> FORCE status
> Oct 24 14:55:41 - DEBUG - In entry "uid=,ou=UsersOU":  Adding attribute "sn" 
> with values [Panagidou]
> Oct 24 14:55:41 - DEBUG - In entry "uid=,ou=UsersOU":  Attribute "cn" is in 
> FORCE status
> Oct 24 14:55:41 - DEBUG - In entry "uid=,ou=UsersOU":  Adding attribute "cn" 
> with values [Anna Panagidou]
> Oct 24 14:55:41 - DEBUG - In entry "uid=,ou=UsersOU":  Attribute 
> "description" is in FORCE status
> Oct 24 14:55:41 - DEBUG - In entry "uid=,ou=UsersOU":  Attribute 
> "description" will not be written to the destination
> Oct 24 14:55:41 - DEBUG - In entry "uid=,ou=UsersOU":  Attribute 
> "objectClass" is in KEEP status
> Oct 24 14:55:41 - DEBUG - In entry "uid=,ou=UsersOU":  Adding attribute 
> "objectClass" with values [posixAccount]
> Oct 24 14:55:41 - ERROR - Error while adding entry uid=,ou=UsersOU in 
> directory :javax.naming.InvalidNameException: uid=,ou=UsersOU: [LDAP: error 
> code 34 - invalid DN]; remaining name 'uid=,ou=UsersOU'
> Oct 24 14:55:41 - ERROR - Error while synchronizing ID uid=,ou=UsersOU: 
> java.lang.Exception: Technical problem while applying modifications to 
> directory
> Oct 24 14:55:41 - DEBUG - java.lang.Exception: Technical problem while 
> applying modifications to directory
> java.lang.Exception: Technical problem while applying modifications to 
> directory
>        at 
> org.lsc.AbstractSynchronize.synchronize2Ldap(AbstractSynchronize.java:399) 
> [lsc-core-1.2.1.jar:na]
>        at org.lsc.SimpleSynchronize.launchTask(SimpleSynchronize.java:272) 
> [lsc-core-1.2.1.jar:na]
>        at org.lsc.SimpleSynchronize.launch(SimpleSynchronize.java:155) 
> [lsc-core-1.2.1.jar:na]
>        at org.lsc.Launcher.run(Launcher.java:151) [lsc-core-1.2.1.jar:na]
>        at org.lsc.Launcher.main(Launcher.java:123) [lsc-core-1.2.1.jar:na]
> dn: uid=,ou=UsersOU,dc=velti,dc=net
> changetype: add
> sn: Panagidou
> cn: Anna Panagidou
> objectClass: posixAccount
>
> Oct 24 14:55:41 - ERROR - All entries: 1, to modify entries: 1, modified 
> entries: 0, errors: 1
>

The error is here:

Oct 24 14:55:41 - ERROR - Error while adding entry uid=,ou=UsersOU in
directory :javax.naming.InvalidNameException: uid=,ou=UsersOU: [LDAP:
error code 34 - invalid DN]; remaining name 'uid=,ou=UsersOU'

you don't get any value for sAMAccountName in your source entry.

And this is really weird:

 lsc.tasks.AD2ldap.srcService.filterAll =
(&(objectClass=user)(sAMAccountName=apanagidou))

why do you filter on a specific value?
_______________________________________________________________
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