试图通过LSC(Ldap同步连接器)使活动目录打开Ldap同步



我尝试使用lsc使活动目录与openldap同步。我遵循这里的教程:lsc-project.org/wiki/documentation/tutorial/openldaptoactivedirectory.

在最后,当我尝试做一个命令(我使用cygwin): "/usr/bin/lsc -f/etc/lsc/ad2openldap" -s all -c all -n"我得到这个:

Mar 28 22:36:09 - DEBUG - Loading XML configuration from: C:lscetcad2openldaplsc.xml
Mar 28 22:36:09 - INFO  - Reflections took 172 ms to scan 1 urls, producing 51 keys and 103 values
Mar 28 22:36:09 - DEBUG - Importing XML schema file: schemas/lsc-core-2.0.xsd
Mar 28 22:36:10 - ERROR - org.lsc.exception.LscConfigurationException: javax.xml.bind.UnmarshalException
 - with linked exception:
[org.xml.sax.SAXParseException; systemId: file:/C:/lsc/etc/ad2openldap/lsc.xml; lineNumber: 90; columnNumber: 26; cvc-complex-type.2.4.a: Invalid content was found starting with element 'asyncLdapSourceService'. One of '{"http://lsc-project.org/XSD/lsc-core-2.0.xsd":name}' is expected.]
org.lsc.exception.LscConfigurationException: javax.xml.bind.UnmarshalException
 - with linked exception:
[org.xml.sax.SAXParseException; systemId: file:/C:/lsc/etc/ad2openldap/lsc.xml; lineNumber: 90; columnNumber: 26; cvc-complex-type.2.4.a: Invalid content was found starting with element 'asyncLdapSourceService'. One of '{"cause I can't post more 2 links, this is the same":name}' is expected.]
        at org.lsc.configuration.JaxbXmlConfigurationHelper.getConfiguration(JaxbXmlConfigurationHelper.java:172) ~[lsc-core-2.0.3.jar:na]
        at org.lsc.Configuration.setUp(Configuration.java:481) [lsc-core-2.0.3.jar:na]
        at org.lsc.Configuration.setUp(Configuration.java:456) [lsc-core-2.0.3.jar:na]
        at org.lsc.Launcher.run(Launcher.java:206) [lsc-core-2.0.3.jar:na]
        at org.lsc.Launcher.launch(Launcher.java:159) [lsc-core-2.0.3.jar:na]
        at org.lsc.Launcher.main(Launcher.java:142) [lsc-core-2.0.3.jar:na]
Caused by: javax.xml.bind.UnmarshalException: null
        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(Unknown Source) ~[na:1.8.0]
        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(Unknown Source) ~[na:1.8.0]
        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(Unknown Source) ~[na:1.8.0]
        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(Unknown Source) ~[na:1.8.0]
        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(Unknown Source) ~[na:1.8.0]
        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(Unknown Source) ~[na:1.8.0]
        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(Unknown Source) ~[na:1.8.0]
        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(Unknown Source) ~[na:1.8.0]
        at org.lsc.configuration.JaxbXmlConfigurationHelper.getConfiguration(JaxbXmlConfigurationHelper.java:170) ~[lsc-core-2.0.3.jar:na]
        ... 5 common frames omitted
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'asyncLdapSourceService'. One of '{"http://lsc-project.org/XSD/lsc-core-2.0.xsd":name}' is expected.
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) ~[na:1.8.0]
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source) ~[na:1.8.0]
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) ~[na:1.8.0]
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) ~[na:1.8.0]
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) ~[na:1.8.0]
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source) ~[na:1.8.0]
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source) ~[na:1.8.0]
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source) ~[na:1.8.0]
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(Unknown Source) ~[na:1.8.0]
        at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorHandlerImpl.startElement(Unknown Source) ~[na:1.8.0]
        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.ValidatingUnmarshaller.startElement(Unknown Source) ~[na:1.8.0]
        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.SAXConnector.startElement(Unknown Source) ~[na:1.8.0]
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source) ~[na:1.8.0]
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) ~[na:1.8.0]
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) ~[na:1.8.0]
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) ~[na:1.8.0]
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source) ~[na:1.8.0]
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) ~[na:1.8.0]
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) ~[na:1.8.0]
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) ~[na:1.8.0]
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) ~[na:1.8.0]
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) ~[na:1.8.0]
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) ~[na:1.8.0]
        ... 12 common frames omitted

谢谢。

如果没有看到您的XML配置文件,很难确定,但检查您的<task>节点在<asyncLdapSourceService>之前包含<name>节点。还要检查该节点是否包含<name>。任务部分看起来应该像这样:

<tasks>
    <task>
        <name>My Sync Task</name>
        <asyncLdapSourceService>
            <name>my-ldap-src</name>
            <connection reference="my-ldap-connection"/>
            ...

最新更新