Hi, Sorry, have attached the wrong file. Yes, I'm trying to use ApacheDS as source and Oracle DB as destination. But, I cannot get to the database side to get some logs. I'm getting SAXParseException: cvc-type.3.1.2: Element 'requestNameForList' is a simple type, so it must have no element information item [children].
Thanks, Mark -----Original Message----- From: Clément OUDOT [mailto:clem.ou...@gmail.com] Sent: Tuesday, August 07, 2012 8:57 AM To: Davydov, Mark - IS Cc: lsc-userslsc-users Subject: Re: [lsc-users] Help with LSC -startup 2012/7/26 Davydov, Mark - IS <mark.davy...@exelisinc.com>: > Attached. > Hi, you sent the lsc script and not the lsc.xml configuration file. It seems you are trying to create a connection with LDAP as source and Database as destination. I think this is still buggy in 2.0. At least,the postgresql sample does not work: http://tools.lsc-project.org/issues/443 Please try to configure your connector and get some logs on database side so we can see if we encounter the same bugs. Clément. Email addresses of ITT Exelis employees have changed from itt.com to exelisinc.com. Please update your favorites and contact information to reflect these changes. This e-mail and any files transmitted with it may be proprietary and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the sender. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of Exelis Inc. The recipient should check this e-mail and any attachments for the presence of viruses. Exelis Inc. accepts no liability for any damage caused by any virus transmitted by this e-mail.
<?xml version="1.0" ?> <lsc xmlns="http://lsc-project.org/XSD/lsc-core-2.0.xsd" revision="0"> <!-- ./connections Connections list node, must contain at least two connections --> <connections> <databaseConnection> <!-- ./name identify the connection according to its node number, used in the service node to specify the source or destination connection --> <name>jdbc-dst-conn</name> <!-- ./url mandatory, the JDBC URL --> <url>jdbc:oracle:thin:@localhost:1521/XE</url> <!-- ./username mandatory, the JDBC username --> <username>lsc</username> <!-- ./password mandatory, the JDBC credential --> <password>lsc</password> <!-- ./driver mandatory, the Java classname to use as JDBC driver --> <driver>oracle.jdbc.driverOracleDriver</driver> <!-- ./otherSettings optional, may contain the list of complementary values, passed to the JDBC driver <otherSettings> </otherSettings> --> </databaseConnection> <ldapConnection> <name>ldap-dst-conn</name> <!-- ./url mandatory, the JNDI URL --> <url>ldap://localhost:10389/dc=mil,dc=disa,dc=dso,dc=ds</url> <!-- ./username mandatory, the DN to bind with --> <username></username> <!-- ./password mandatory, credentials to bind with --> <password></password> <!-- ./authentication mandatory, must contain either ANONYMOUS, SIMPLE, SASL, GSSAPI or DIGEST_MD5 --> <authentication>NONE</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> </connections> <!-- ./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>LDAPtoOracleSyncTask</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 --> <asyncLdapSourceService> <name>openldap-source-service</name> <connection reference="ldap-src-conn" /> <baseDn>ou=Users,dc=ds,dc=dso,dc=disa,dc=mil</baseDn> <pivotAttributes> <string>uid</string> </pivotAttributes> <fetchedAttributes> <string>givenName</string> <string>sn</string> <string>uid</string> <string>x-smti-datasetid-country</string> <string>x-smti-datasetid-org</string> <string>cn</string> <string>x-smti-classification</string> <string>x-smti-dataset-classification</string> <string>x-smti-datasetid-uid</string> <string>x-smti-effective-date</string> <string>x-smti-expirereview-date</string> <string>x-smti-org-name</string> </fetchedAttributes> <getAllFilter>(objectClass=x-smtiUserProfile)</getAllFilter> <getOneFilter>(&(objectClass=x-smtiUserProfile)(uid={uid}))</getOneFilter> <serverType>ApacheDS</serverType> </asyncLdapSourceService> <databaseDestinationService> <name>jdbc-src-service</name> <connection reference="jdbc-dst-conn" /> <requestNameForList><string>getUsersList</string></requestNameForList> <requestNameForObject><string>getUser</string></requestNameForObject> <requestsNameForInsert><string>insertUsersLSC</string></requestsNameForInsert> <requestsNameForUpdate><string>updateUsersLSC</string></requestsNameForUpdate> <requestsNameForDelete><string>deleteUsersLSC</string></requestsNameForDelete> </databaseDestinationService> </lsc>
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd"> <sqlMap namespace="SyncOracle"> <select id="getUser" resultClass="java.util.HashMap" parameterClass="java.util.Map"> Select 'x-smtiUserProfile' objectClass, TRIM(uid_Id) as uid, TRIM(givenName) as givenName, TRIM(sn) as sn, TRIM(country) as x-smti-datasetid-country, TRIM(org) as x-smti-datasetid-org, TRIM(cn) as cn, TRIM(smtiClassification) as x-smti-classification, TRIM(classification) as x-smti-dataset-classification, TRIM(datasetId) as x-smti-datasetid-uid, TRIM(effectiveDate) as x-smti-effective-date, TRIM(expireReviewDate) as x-smti-expirereview-date, TRIM(orgName) as x-smti-org-name FROM lsc.usersLSC WHERE uid_Id = #uid# </select> <select id="getUsersList" resultClass="java.util.HashMap"> SELECT uid_Id AS uid FROM lsc.usersLSC </select> <insert id="insertUsersLSC" parameterClass="java.util.Map"> INSERT into lsc.usersLSC (uid_Id, givenName, sn, country, org, cn, smtiClassification, classification, datasetId, effectiveDate, expireReviewDate, orgName ) VALUES ( #uid#, #givenName#, #sn#, #x-smti-datasetid-country#, #x-smti-datasetid-org#, #cn#, #x-smti-classification#, #x-smti-dataset-classification#, #x-smti-datasetid-uid#, #x-smti-effective-date#, #x-smti-expirereview-date#, #x-smti-org-name# ) </insert> <update id="updateUsersLSC" parameterClass="java.util.Map"> UPDATE lsc.usersLSC SET ( uid_Id = #uid#, givenName = #givenName#, sn = #sn#, country = #x-smti-datasetid-country#, org = #x-smti-datasetid-org#, cn = #cn#, smtiClassification = #x-smti-classification#, classification = #x-smti-dataset-classification#, datasetId = #x-smti-datasetid-uid#, effectiveDate = #x-smti-effective-date#, expireReviewDate = #x-smti-expirereview-date#, orgName = #x-smti-org-name# ) WHERE uid_Id = #uid# </update> <delete id="deleteusersLSC" parameterClass="java.util.Map"> DELETE FROM lsc.usersLSC WHERE uid_Id = #uid# </delete> </sqlMap>
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-config-2.dtd"> <!-- LDAP Synchronization Connector (LSC) - http://lsc-project.org This file configure iBatis to read sqlMap files. Settings should be generated here automatically. The only section you need to check is the sqlMap entries at the bottom. --> <sqlMapConfig> <!-- The settings element has a number of configuration switches and properties that configure the SQL Maps engine. Most are performance tweaks or resource management. They are pretty self explanatory. The defaults are shown here. There can be only one settins element. --> <!-- <settings lazyLoadingEnabled="true" cacheModelsEnabled="true" enhancementEnabled="true" maxRequests="512" maxSessions="128" maxTransactions="32" /> --> <properties resource="database.properties"/> <transactionManager type="JDBC"> <dataSource type="SIMPLE"> <property value="${driver}" name="JDBC.Driver" /> <property value="${url}" name="JDBC.ConnectionURL" /> <property value="${username}" name="JDBC.Username"/> <property value="${password}" name="JDBC.Password"/> <property value="15" name="Pool.MaximumActiveConnections"/> <property value="15" name="Pool.MaximumIdleConnections"/> <property value="1000" name="Pool.MaximumWait"/> </dataSource> </transactionManager> <!-- Finally, the SQL Maps themselves must be registred with the configuration file. Below are some examples of some SQL Map reference elements. Notice that an SQL Map can be located in the classpath (resource) or at a URL (e.g. file:// or http://). There can be any number of sqlMap elements. --> <!-- <sqlMap url="file://${lsc.config}/sql-map-config.d/SyncOracle.xml"/> --> </sqlMapConfig>
_______________________________________________________________ Ldap Synchronization Connector (LSC) - http://lsc-project.org lsc-users mailing list lsc-users@lists.lsc-project.org http://lists.lsc-project.org/listinfo/lsc-users