Any idea? Any help will be highly appreciated. -Hardik
From: Hardik V Shah Sent: 16 January 2015 17:47 To: '[email protected]' Subject: mysql to AD sync for multiple records giving issue Hi, I am trying trying but unable to resolve the multiple records sync from mysql to AD. Errors are as below: Jan 16 17:43:50 - INFO - Starting sync for adGroup Jan 16 17:43:50 - WARN - Error while looking for a specific entry with id=demogrp1 (com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred in file://localhost/etc/lsc/sql-map-config.d/InetOrgPerson.xml<file:///\\localhost\etc\lsc\sql-map-config.d\InetOrgPerson.xml>. --- The error occurred while applying a parameter map. --- Check the getInetOrgPerson-InlineParameterMap. --- Check the statement (query failed). --- Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"GROUPNAME" LIKE 'demogrp1'' at line 1) Jan 16 17:43:50 - ERROR - Error while synchronizing ID {groupname=demogrp1}: org.lsc.exception.LscServiceException: javax.naming.CommunicationException: --- The error occurred in file://localhost/etc/lsc/sql-map-config.d/InetOrgPerson.xml<file:///\\localhost\etc\lsc\sql-map-config.d\InetOrgPerson.xml>. --- The error occurred while applying a parameter map. --- Check the getInetOrgPerson-InlineParameterMap. --- Check the statement (query failed). --- Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"GROUPNAME" LIKE 'demogrp1'' at line 1 Jan 16 17:43:50 - WARN - Error while looking for a specific entry with id=sqlgrp (com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred in file://localhost/etc/lsc/sql-map-config.d/InetOrgPerson.xml<file:///\\localhost\etc\lsc\sql-map-config.d\InetOrgPerson.xml>. --- The error occurred while applying a parameter map. --- Check the getInetOrgPerson-InlineParameterMap. --- Check the statement (query failed). --- Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"GROUPNAME" LIKE 'sqlgrp'' at line 1) Jan 16 17:43:50 - ERROR - Error while synchronizing ID {groupname=sqlgrp}: org.lsc.exception.LscServiceException: javax.naming.CommunicationException: --- The error occurred in file://localhost/etc/lsc/sql-map-config.d/InetOrgPerson.xml<file:///\\localhost\etc\lsc\sql-map-config.d\InetOrgPerson.xml>. --- The error occurred while applying a parameter map. --- Check the getInetOrgPerson-InlineParameterMap. --- Check the statement (query failed). --- Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"GROUPNAME" LIKE 'sqlgrp'' at line 1 Jan 16 17:43:50 - ERROR - All entries: 2, to modify entries: 0, successfully modified entries: 0, errors: 2 Jan 16 17:43:50 - INFO - Starting clean for adGroup Jan 16 17:43:50 - ERROR - Empty or non existant destination (no IDs found) cat sql-map-config.d/InetOrgPerson.xml <?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="InetOrgPerson"> <select id="getInetOrgPerson" resultClass="java.util.HashMap" parameterClass="java.util.Map"> select groupname,samaccountname FROM group_info pers WHERE pers."GROUPNAME" LIKE #groupname# </select> <select id="getInetOrgPersonClean" resultClass="java.util.HashMap" parameterClass="java.util.Map"> Select pers."GROUPNAME" AS groupname FROM group_info pers WHERE pers."GROUPNAME" LIKE #groupname# </select> <select id="getInetOrgPersonList" resultClass="java.util.HashMap"> SELECT groupname FROM group_info </select> </sqlMap> And LSC configuration as below: <databaseSourceService> <name>databaseConnectionService</name> <connection reference="mySQL" /> <requestNameForList>getInetOrgPersonList</requestNameForList> <requestNameForObject>getInetOrgPerson</requestNameForObject> <!-- <requestNameForClean>getInetOrgPersonClean</requestNameForClean> --> </databaseSourceService> <ldapDestinationService> <name>testad-dst-service</name> <connection reference="testAD" /> <baseDn>dc=testrjil,dc=net</baseDn> <pivotAttributes> <string>cn</string> </pivotAttributes> <fetchedAttributes> <string>cn</string> <string>sAMAccountName</string> <string>objectClass</string> </fetchedAttributes> <getAllFilter><![CDATA[(objectClass=inetOrgPerson)]]></getAllFilter> <getOneFilter><![CDATA[(&(objectClass=inetOrgPerson)(cn={groupname}))]]></getOneFilter> </ldapDestinationService> <propertiesBasedSyncOptions> <mainIdentifier>"cn=" + srcBean.getDatasetFirstValueById("groupname") + ",dc=testrjil,dc=net"</mainIdentifier> <defaultDelimiter>;</defaultDelimiter> <defaultPolicy>FORCE</defaultPolicy> <dataset> <name>objectClass</name> Same had been worked for hsqldb but not working for mysql. Any idea? Thanks & Regards, Hardik "Confidentiality Warning: This message and any attachments are intended only for the use of the intended recipient(s). are confidential and may be privileged. If you are not the intended recipient. you are hereby notified that any review. re-transmission. conversion to hard copy. copying. circulation or other use of this message and any attachments is strictly prohibited. If you are not the intended recipient. please notify the sender immediately by return email. and delete this message and any attachments from your system. Virus Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email. The company cannot accept responsibility for any loss or damage arising from the use of this email or attachment."
_______________________________________________________________ Ldap Synchronization Connector (LSC) - http://lsc-project.org lsc-users mailing list [email protected] http://lists.lsc-project.org/listinfo/lsc-users

