java - 尝试通过LSC(Ldap同步连接器)使Active Directory与openLDAP同步

标签 java xml active-directory openldap

我尝试使用 lsc 使 Active Directory 与 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:\lsc\etc\ad2openldap\lsc.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>节点包含<name> <asyncLdapSourceService>之前的节点。另请检查该节点是否包含 <name> 。任务部分应类似于:

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

关于java - 尝试通过LSC(Ldap同步连接器)使Active Directory与openLDAP同步,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22724330/

相关文章:

java - 如何对两个不同大小的数组进行计算?

java - 从 Eclipse 在 AWS-EMR 上运行 MapReduce 作业

php - 在 PHP 中创建 XML 文档

java - 谷歌地图不加载 fragment

.net - VB.NET 将 xml 节点插入现有 XML 文档

powershell - 在 PowerShell 中使用全局目录

java - 通过 ByteBuffer 和 CQL 3 将 Java 对象序列化到 Cassandra 1.2

php - 将 flex/php 连接到 Active Directory

c++ - 是否有完整的 Active Directory 属性列表以及到 LDAP 的映射?

java - 传递泛型并且必须转换为正确的对象java。不应该转换