2012/10/27 Emilio García <[email protected]>:
> Hi there,
>
> I am trying to sync users from OpenLDAP into an AD. I took the sample file
> of the repository:
>
> http://tools.lsc-project.org/projects/lsc/repository/entry/lsc/trunk/sample/ad/etc-opendj2ad/lsc.xml
>
> ce) ~[na:1.7.0_09]
>        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(Unknown
> Sou
> ce) ~[na:1.7.0_09]
>        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(Unknown
> Sou
> ce) ~[na:1.7.0_09]
>        at
> org.lsc.configuration.JaxbXmlConfigurationHelper.getConfiguration(Jax
> XmlConfigurationHelper.java:170) ~[lsc-core-2.0.1.jar:na]
>        ... 5 common frames omitted
> aused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid
> conten
>  was found starting with element 'getCleanFilter'. One of
> '{"http://lsc-project
> org/XSD/lsc-core-2.0.xsd":cleanFilter,
> "http://lsc-project.org/XSD/lsc-core-2.0
> xsd":filterAsync, "http://lsc-project.org/XSD/lsc-core-2.0.xsd":dateFormat,
> "ht
> p://lsc-project.org/XSD/lsc-core-2.0.xsd":interval}' is expected.
>        at
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAX
> arseException(Unknown Source) ~[na:1.7.0_09]
>        at
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unk
> own Source) ~[na:1.7.0_09]
>        at
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(
> nknown Source) ~[na:1.7.0_09]
>        at
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(
> nknown Source) ~[na:1.7.0_09]
>        at
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(
> nknown Source) ~[na:1.7.0_09]
>
> Like if it doesn't like the sample itself...
>
> Then I removed the CleanFilter and it runs but it doesn't seem to try to
> create the new users which is what I want:
>
> Oct 26 17:55:25 - ERROR - Error while looking for
> (&(objectClass=user)(samAccoun
> tName=User1)) in CN=IDVault,DC=TESTDIR,DC=ORGANIZATION,DC=COM:
> javax.naming.NameN
> otFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-0310020A,
> probl
> em 2001 (NO_OBJECT), data 0, best match of:
>         'DC=testdir,DC=organization,DC=com'
>
> My config file is:
>
> <?xml version="1.0" ?>
> <lsc xmlns="http://lsc-project.org/XSD/lsc-core-2.0.xsd"; revision="0">
>     <connections>
>         <ldapConnection>
>             <name>ldap-src-conn</name>
>             <url>ldap://10.10.14.71:389/o=KI</url>
>             <username>cn=Manager,o=KI</username>
>             <password>secret</password>
>             <authentication>SIMPLE</authentication>
>             <referral>IGNORE</referral>
>             <derefAliases>NEVER</derefAliases>
>             <version>VERSION_3</version>
>             <pageSize>100</pageSize>
>             <factory>com.sun.jndi.ldap.LdapCtxFactory</factory>
>             <tlsActivated>false</tlsActivated>
>         </ldapConnection>
>         <ldapConnection>
>             <name>ldap-dst-conn</name>
>
> <url>ldap://10.10.14.72:389/DC=testdir,DC=organization,dc=com</url>
>             <username>LDAPSync</username>
>             <password>secret</password>
>             <authentication>SIMPLE</authentication>
>             <referral>IGNORE</referral>
>             <derefAliases>NEVER</derefAliases>
>             <version>VERSION_3</version>
>             <pageSize>100</pageSize>
>             <factory>com.sun.jndi.ldap.LdapCtxFactory</factory>
>             <tlsActivated>false</tlsActivated>
>         </ldapConnection>
>     </connections>
>     <audits>
>         <csvAudit>
>             <name>csv</name>
>             <append>true</append>
>             <operations>create, delete</operations>
>             <file>c:/audit.csv</file>
>             <datasets>cn, dn</datasets>
>             <separator>;</separator>
>         </csvAudit>
>         <ldifAudit>
>             <name>ldif</name>
>             <append>false</append>
>             <file>c:/audit.ldif</file>
>         </ldifAudit>
>     </audits>
>     <tasks>
>         <task>
>             <name>Users</name>
>             <bean>org.lsc.beans.SimpleBean</bean>
>             <ldapSourceService>
>                 <name>openldap-source-service</name>
>                 <connection reference="ldap-src-conn" />
>                 <baseDn>o=KI</baseDn>
>                 <pivotAttributes>
>                     <string>cn</string>
>                 </pivotAttributes>
>                 <fetchedAttributes>
>                     <string>description</string>
>                     <string>cn</string>
>                     <string>sn</string>
>                     <string>objectClass</string>
>                     <string>mail</string>
>                 </fetchedAttributes>
>                 <getAllFilter>(objectClass=inetorgperson)</getAllFilter>
>
> <getOneFilter>(&amp;(objectClass=inetorgperson)(cn={cn}))</getOneFilter>
>
> <!--<getCleanFilter>(&amp;(objectClass=inetorgperson)(cn={samAccountName}))</getCleanFilter>-->
>             </ldapSourceService>
>             <ldapDestinationService>
>                 <name>ad-dst-service</name>
>                 <connection reference="ldap-dst-conn" />
>
> <baseDn>CN=IDVault,DC=TESTDIR,DC=ORGANIZATION,DC=COM</baseDn>
>                 <pivotAttributes>
>                     <string>samAccountName</string>
>                 </pivotAttributes>
>                 <fetchedAttributes>
>                     <string>description</string>
>                     <string>cn</string>
>                     <string>sn</string>
>                     <string>givenName</string>
>                     <string>objectClass</string>
>                     <string>samAccountName</string>
>                 </fetchedAttributes>
>                 <getAllFilter>(objectClass=user)</getAllFilter>
>
> <getOneFilter>(&amp;(objectClass=user)(samAccountName={cn}))</getOneFilter>
>             </ldapDestinationService>
>             <propertiesBasedSyncOptions>
>                 <mainIdentifier>"CN=" +
> srcBean.getDatasetFirstValueById("cn") +
>
> ",CN=IDVault,DC=TESTDIR,DC=ORGANIZATION,DC=COM"</mainIdentifier>
>                 <defaultDelimiter>;</defaultDelimiter>
>                 <defaultPolicy>FORCE</defaultPolicy>
>                 <conditions>
>                     <create>true</create>
>                 </conditions>
>                 <dataset>
>                     <name>description</name>
>                     <policy>FORCE</policy>
>                     <forceValues>
>
> <string>js:srcBean.getDatasetFirstValueById("sn").toUpperCase() +
>                             " (" + srcBean.getDatasetFirstValueById("mail")
> + ")"</string>
>                     </forceValues>
>                 </dataset>
>                 <dataset>
>                     <name>samAccountName</name>
>                     <policy>KEEP</policy>
>                     <createValues>
>
> <string>js:srcBean.getDatasetFirstValueById("cn")</string>
>                     </createValues>
>                 </dataset>
>                 <dataset>
>                     <name>objectClass</name>
>                     <policy>KEEP</policy>
>                     <createValues>
>                         <string>"user"</string>
>                     </createValues>
>                 </dataset>
>             </propertiesBasedSyncOptions>
>         </task>
>     </tasks>
> </lsc>
>
> PS: I am using the version 2.0.1.
>


Hi,

use cleanFilter instead of getCleanFilter.

Delete audit section as it do not work yet.


Clément.
_______________________________________________________________
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