Dears,

I forgot to subscribe to the mailing list.
Just to be sure that I receive an answer, I am resending my help request.

Kind regards,
Colin Thorn

Von: Thorn, Colin
Gesendet: Dienstag, 24. Oktober 2017 10:07
An: '[email protected]' <[email protected]>
Betreff: lsc config

Dears,

I am trying to sync some test users from AD to a newly installed openLDAP.
I have managed to solve some issues but I am now stuck at the following one:

root@LAB-LDAP01:~# lsc -v
Oct 24 10:03:45 - ERROR - Unable to load configuration 
(org.lsc.exception.LscConfigurationException: Configuration exception: null)
org.lsc.exception.LscConfigurationException: Configuration exception: null
        at 
org.lsc.configuration.JaxbXmlConfigurationHelper.getConfiguration(JaxbXmlConfigurationHelper.java:162)
 ~[lsc-core-2.1.4.jar:na]
        at org.lsc.Configuration.setUp(Configuration.java:482) 
~[lsc-core-2.1.4.jar:na]
        at org.lsc.Launcher.run(Launcher.java:194) [lsc-core-2.1.4.jar:na]
        at org.lsc.Launcher.launch(Launcher.java:158) [lsc-core-2.1.4.jar:na]
        at org.lsc.Launcher.main(Launcher.java:141) [lsc-core-2.1.4.jar:na]
Caused by: javax.xml.bind.UnmarshalException: null
        at 
javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:335)
 ~[na:1.8.0_141]
        at 
com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:563)
 ~[na:1.8.0_141]
        at 
com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:249)
 ~[na:1.8.0_141]
        at 
com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:214)
 ~[na:1.8.0_141]
        at 
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:157)
 ~[na:1.8.0_141]
        at 
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:162)
 ~[na:1.8.0_141]
        at 
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:171)
 ~[na:1.8.0_141]
        at 
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:189)
 ~[na:1.8.0_141]
        at 
org.lsc.configuration.JaxbXmlConfigurationHelper.getConfiguration(JaxbXmlConfigurationHelper.java:160)
 ~[lsc-core-2.1.4.jar:na]
        ... 4 common frames omitted
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid 
content was found starting with element 'pageSize'. One of 
'{"http://lsc-project.org/XSD/lsc-core-2.1.xsd":saslMutualAuthentication, 
"http://lsc-project.org/XSD/lsc-core-2.1.xsd":sortedBy, 
"http://lsc-project.org/XSD/lsc-core-2.1.xsd":binaryAttributes, 
"http://lsc-project.org/XSD/lsc-core-2.1.xsd":recursiveDelete, 
"http://lsc-project.org/XSD/lsc-core-2.1.xsd":saslQop}' is expected.
        at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
 ~[na:1.8.0_141]
        at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
 ~[na:1.8.0_141]
        at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396)
 ~[na:1.8.0_141]
        at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
 ~[na:1.8.0_141]
        at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284)
 ~[na:1.8.0_141]
        at 
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:452)
 ~[na:1.8.0_141]
        at 
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3230)
 ~[na:1.8.0_141]
        at 
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1790)
 ~[na:1.8.0_141]
        at 
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:740)
 ~[na:1.8.0_141]
        at 
com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorHandlerImpl.startElement(ValidatorHandlerImpl.java:570)
 ~[na:1.8.0_141]
        at 
com.sun.xml.internal.bind.v2.runtime.unmarshaller.ValidatingUnmarshaller.startElement(ValidatingUnmarshaller.java:86)
 ~[na:1.8.0_141]
        at 
com.sun.xml.internal.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:153)
 ~[na:1.8.0_141]
        at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
 ~[na:1.8.0_141]
        at 
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374)
 ~[na:1.8.0_141]
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2784)
 ~[na:1.8.0_141]
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
 ~[na:1.8.0_141]
        at 
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
 ~[na:1.8.0_141]
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
 ~[na:1.8.0_141]
        at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841)
 ~[na:1.8.0_141]
        at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)
 ~[na:1.8.0_141]
        at 
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) 
~[na:1.8.0_141]
        at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
 ~[na:1.8.0_141]
        at 
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
 ~[na:1.8.0_141]
        at 
com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:243)
 ~[na:1.8.0_141]
        ... 10 common frames omitted
Oct 24 10:03:45 - INFO  - Configuration validation failed !

My lsc.xml:

<?xml version="1.0" ?>
<!--
        In the following file, comments are describing each node. Elements are
        referenced through XPath expression, whereas attributes are prefixed 
with
        '@'

        //lsc Root node of the XML configuration file
        @xmlns XML Schema validation is not ready yet (Reserved for futur use)
        @id optional, added by XML API
        @revision mandatory, used by the Web Administration Interface to version
                                this file
         -->
<lsc xmlns="http://lsc-project.org/XSD/lsc-core-2.1.xsd"; revision="0">

<!--  ./connections Connections list node, must contain at least two 
connections -->

  <connections>

<!--
        ./connection Connection node, include definition of the required 
parameters.
                                        Depending on the connection type, 
properties vary.
                                        Existing class type are : 
ldapConnection, databaseConnnection
                                        Plugins also provides : nisConnection, 
jndiExecDstConnection
-->
    <ldapConnection>
      <name>projectLDAP</name>
<!--  ./url mandatory, the JNDI URL -->
      <url>xxxxxxxxxxxxx</url>
<!--  ./username mandatory, the DN to bind with -->
      <username>xxxxxxxxxxxxxxx</username>
<!--  ./password mandatory, credentials to bind with -->
      <password>xxxxxxxxxxxxxxxxxxx</password>
<!--  ./authentication mandatory, must contain either ANONYMOUS, SIMPLE, SASL, 
GSSAPI or DIGEST_MD5 -->
      <authentication>SIMPLE</authentication>
<!--  ./referral mandatory, must contain either IGNORE, THROUGH, THROW or 
FOLLOW -->
      <referral>IGNORE</referral>
<!--  ./derefAliases mandatory, must contain either NEVER, SEARCH, FIND, ALWAYS 
-->
      <derefAliases>NEVER</derefAliases>
<!--  ./version mandatory, must contain either VERSION_2, VERSION_3 -->
      <version>VERSION_3</version>
<!--  ./pageSize optional, specify the paged size when searching
      <pageSize>-1</pageSize> -->
<!--  ./factory mandatory, points to LDAP Context Factory, 
com.sun.jndi.ldap.LdapCtxFactory for a SUN JDK -->
      <factory>com.sun.jndi.ldap.LdapCtxFactory</factory>
<!--  ./tlsActivated optional, specify if SSL/TLS is activated to connect to 
the LDAP server -->
      <tlsActivated>false</tlsActivated>
    </ldapConnection>
    <ldapConnection>
      <name>MVC-LAB</name>
<!--  ./url mandatory, the JNDI URL -->
      <url>xxxxxxxxxxxxxxxxx</url>
<!--  ./username mandatory, the DN to bind with -->
      <username>xxxxxxxxxxxxxxxxxxx</username>
<!--  ./password mandatory, credentials to bind with -->
      <password>xxxxxxxxxxxxxxxxxxxxxx</password>
<!--  ./authentication mandatory, must contain either ANONYMOUS, SIMPLE, SASL, 
GSSAPI or DIGEST_MD5 -->
      <authentication>SIMPLE</authentication>
<!--  ./referral mandatory, must contain either IGNORE, THROUGH, THROW or 
FOLLOW -->
      <referral>IGNORE</referral>
<!--  ./derefAliases mandatory, must contain either NEVER, SEARCH, FIND, ALWAYS 
-->
      <derefAliases>NEVER</derefAliases>
<!--  ./version mandatory, must contain either VERSION_2, VERSION_3 -->
      <version>VERSION_3</version>
<!--  ./pageSize optional, specify the paged size when searching -->
      <pageSize>1000</pageSize>
<!--  ./factory mandatory, points to LDAP Context Factory, 
com.sun.jndi.ldap.LdapCtxFactory for a SUN JDK -->
      <factory>com.sun.jndi.ldap.LdapCtxFactory</factory>
<!--  ./tlsActivated optional, specify if SSL/TLS is activated to connect to 
the LDAP server -->
      <tlsActivated>false</tlsActivated>
    </ldapConnection>
  </connections>

<!--  ./audits Audits list node -->
  <audits>

<!--./audit Audit node, here a CSV audit, may also be a LDIF or any contributed 
audit type -->
        <csvAudit>
<!--    ./name mandatory, audit name -->
                <name>csv</name>
<!--    ./append optional, default to false, specify to create a new log file 
or to append to the existing one  -->
                <append>true</append>
<!--    ./operations optional, comma separated list of operations (create, 
delete, update or rename) -->
                <operations>create, delete</operations>
<!--    ./file mandatory, define the location of the file where the CSV data 
will be written -->
                <file>/tmp/dump.csv</file>
<!--    ./datasets optional, comma separated list of datasets modification to 
log -->
                <datasets>cn, dn</datasets>
<!--    ./separator optional, default to ";", specify the values separator -->
                <separator>,</separator>
        </csvAudit>
  </audits>

<!--  ./tasks Task list node, must contain at least one task -->
  <tasks>

<!--  ./task Task node, this is the main node, in which synchronization is 
defined -->
    <task>
<!--  ./name mandatory task node this is the main node, in which 
synchronization is defined -->
      <name>ADtoLDAP-Test</name>
<!--  ./bean optional bean node, default to org.lsc.beans.SimpleBean, define 
the pivot object used to store datasets and values -->
      <bean>org.lsc.beans.SimpleBean</bean>
<!--  ./sourceService mandatory node containing definition of the source 
service settings
                        possible builtin types are :
                                databaseSourceService, ldapSourceService
                                        Plugins also provides: 
syncreplSourceService, nisSourceService
                -->
      <LdapSourceService>
        <name>ADsyncTest-src</name>
        <connection reference="MVC-LAB" />
        <baseDn>OU=OpenLDAP,DC=MVC-LAB,DC=local</baseDn>
        <pivotAttributes>
          <string>userPrincipalName</string>
        </pivotAttributes>
        <fetchedAttributes>
          <string>cn</string>
          <string>sn</string>
          <string>givenName</string>
          <string>description</string>
          <string>objectClass</string>
          <string>sAMAccountName</string>
          <string>telephoneNumber</string>
          <string>title</string>
          <string>department</string>
          <string>displayName</string>
        </fetchedAttributes>
        <getAllFilter><![CDATA[(objectClass=user)]]></getAllFilter>
        
<getOneFilter><![CDATA[(&(objectClass=user)(sAMAccountName={uid}))]]></getOneFilter>
        
<cleanFilter><![CDATA[(&(objectClass=user)(sAMAccountName={uid}))]]></cleanFilter>
        <interval>6</interval>
      </LdapSourceService>
<!--  ./destinationService mandatory node containing definition of the source 
service settings
                        @class define the implementation, possible builtin 
types are :
                                databaseDestinationService, 
ldapDestinationService
                                        Plugins also provides: 
jndiExecDstService   -->
      <ldapDestinationService>
<!--    A ldap destination service will have to contain at least a name, a 
connection reference, a base DN, a filter to list
                        entries, a filter to get a particular entry, a list of 
pivot attributes and a list of fetched attributes -->
        <name>ADsyncTest-dst</name>
        <connection reference="projectLDAP" />
<!--    ./baseDn This mandatory node provide the directory base branch that 
will be used to look for entries (list and get) -->
        <baseDn>OU=OpenLDAP,DC=projectldap,DC=local</baseDn>
<!--    ./pivotAttributes This mandatory node must include string nodes with 
attributes name that will be used with their values
                        as pivot datasets (used to get the corresponding entry 
and to identify the counter-part object, here in the source database
                        used during the clean phase to delete the corresponding 
entry if no corresponding object is found)-->
        <pivotAttributes>
          <string>email</string>
        </pivotAttributes>
<!--    ./fetchedAttributes This mandatory node must include string nodes with 
attributes name that will fill the full object.
                        In a LDAP destination service, fetched attributes will 
be written to the target directory, whereas source provided datasets
                        that are not listed their will silently be canceled, 
i.e. not synchronized with the directory. -->
        <fetchedAttributes>
          <string>cn</string>
          <string>sn</string>
          <string>mail</string>
          <string>givenName</string>
          <string>description</string>
          <string>uid</string>
          <string>phoneNumber</string>
          <string>directoryId</string>
          <string>title</string>
          <string>department</string>
          <string>displayName</string>
        </fetchedAttributes>
        <getAllFilter><![CDATA[(objectClass=inetOrgPerson)]]></getAllFilter>
        
<getOneFilter><![CDATA[(&(objectClass=inetOrgPerson)(uid={uid}))]]></getOneFilter>
      </ldapDestinationService>
<!--  ./syncOptions This mandatory node describes how to handle the various 
situations encountered while synchronizing datasets.
                        It must contains a main identifier construction rule 
and a default policy.
                        It may contains synchronization conditions, a default 
delimiter and datasets synchronization rules (attribute nodes) -->
      <propertiesBasedSyncOptions>
<!--    ./mainIdentifier This mandatory node must contain a string Javascript 
expression that will enforce the object main identifier.-->
        <mainIdentifier>"mail=" + srcBean.getDatasetValueById("mail") + 
",ou=OpenLDAP,dc=MVC-LAB,dc=local"</mainIdentifier>
<!--    ./defaultDelimiter This mandatory node must contain a string Javascript 
expression that will enforce the object main identifier.-->
        <defaultDelimiter>;</defaultDelimiter>
<!--    ./defaultPolicy This mandatory node must contain a string Javascript 
expression that will enforce the object main identifier.-->
        <defaultPolicy>FORCE</defaultPolicy>
<!--    ./conditions This optional node may contain one or more of the four 
node : create, update, delete and changeId -->
        <conditions>
<!--       ./create This optional node may contain a boolean Javascript 
expression that will indicate whenever a new entry must be created or not -->
                <create>true</create>
<!--       ./update This optional node may contain a boolean Javascript 
expression that will indicate whenever a existing entry must be updated or not 
-->
                <update>true</update>
<!--       ./delete This optional node may contain a boolean Javascript 
expression that will indicate whenever a existing entry must be deleted or not 
-->
                <delete>true</delete>
<!--       ./changeId This optional node may contain a boolean Javascript 
expression that will indicate whenever an existing object main identifier must 
be changed or not -->
                <changeId>true</changeId>
        </conditions>
<!--    ./dataset This multi-valued node may contain a structure that will 
describe how to synchronize the corresponding dataset -->
        <dataset>
<!--      ./name Mandatory node containing the dataset name -->
          <name>objectClass</name>
<!--      ./policy Mandatory node containing the policy to apply to this 
dataset. Contains KEEP, FORCE or MERGE value -->
          <policy>KEEP</policy>
<!--      ./defaultValues Optional node containing a list of string values that 
will be used if noone is provided by datasource -->
          <defaultValues></defaultValues>
<!--      ./forceValues Optional node containing a list of string values that 
will be used to force destination service dataset values -->
          <forceValues></forceValues>
<!--      ./createValues Optional node containing a list of string values that 
will be used to force destination service dataset values when creating object 
-->
          <createValues>
            <string>"user"</string>
            <string>"organizationalPerson"</string>
            <string>"person"</string>
            <string>"top"</string>
          </createValues>
<!--      ./delimiter Used when multiples values are provided in a single 
joined value -->
          <delimiter>,</delimiter>
        </dataset>
        <dataset>
         <name>uid</name>
         <policy>KEEP</policy>
          <createValues>
            <string>srcBean.getDatasetFirstValueById("sAMAccountName")</string>
          </createValues>
        </dataset>
        <dataset>
         <name>cn</name>
         <policy>KEEP</policy>
          <createValues>
            <string>srcBean.getDatasetFirstValueById("cn")</string>
          </createValues>
        </dataset>
        <dataset>
         <name>sn</name>
         <policy>KEEP</policy>
          <createValues>
            <string>srcBean.getDatasetFirstValueById("sn")</string>
          </createValues>
        </dataset>
        <dataset>
         <name>givenName</name>
         <policy>KEEP</policy>
          <createValues>
            <string>srcBean.getDatasetFirstValueById("givenName")</string>
          </createValues>
        </dataset>
        <dataset>
         <name>description</name>
         <policy>KEEP</policy>
          <createValues>
            <string>srcBean.getDatasetFirstValueById("description")</string>
          </createValues>
        </dataset>
        <dataset>
         <name>telephoneNumber</name>
         <policy>KEEP</policy>
          <createValues>
            <string>srcBean.getDatasetFirstValueById("phoneNumber")</string>
          </createValues>
        </dataset>
        <dataset>
         <name>title</name>
         <policy>KEEP</policy>
          <createValues>
            <string>srcBean.getDatasetFirstValueById("title")</string>
          </createValues>
        </dataset>
        <dataset>
         <name>department</name>
         <policy>KEEP</policy>
          <createValues>
            <string>srcBean.getDatasetFirstValueById("department")</string>
          </createValues>
        </dataset>
        <dataset>
         <name>displayName</name>
         <policy>KEEP</policy>
          <createValues>
            <string>srcBean.getDatasetFirstValueById("displayName")</string>
          </createValues>
        </dataset>
        <dataset>
         <name>mail</name>
         <policy>KEEP</policy>
          <createValues>
            <string>srcBean.getDatasetFirstValueById("sAMAccountName") + 
"@video.mvc-lab.local"</string>
          </createValues>
        </dataset>
        <dataset>
         <name>directoryId</name>
         <policy>KEEP</policy>
          <createValues>
            <string>srcBean.getDatasetFirstValueById("sAMAccountName") + 
"@video.mvc-lab.local"</string>
          </createValues>
        </dataset>
      </propertiesBasedSyncOptions>
    </task>
  </tasks>
<!-- ./security This mandatory node contains the security settings used by LSC 
-->
  <security>
<!-- ./encryption This optional node contains the encryption settings -->
    <encryption>
<!--  ./keyfile This optional node contains the keyfile location -->
      <keyfile>etc/lsc.key</keyfile>
<!--  ./algorithm This optional node contains the encryption algorithm -->
      <algorithm>AES</algorithm>
<!--  ./strength This optional node contains the algorithm key length -->
      <strength>128</strength>
    </encryption>
  </security>
</lsc>


Thanks for the help,
Kind regards,

Colin Thorn
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-users mailing list
[email protected]
https://lists.lsc-project.org/cgi-bin/mailman/listinfo/lsc-users

Reply via email to