Issue #124 has been updated by J?r?me Schell.

Hi Jonathan,

I'm using v1.1.0.

I think I don't understand how Ibatis works ;)

After adding some debugging code, I have seen what you told about the 
parameters map. In my case the map contains the field "uid" with the good value 
for it. Nevertheless the source object is not found.

Here is some portions of my configuration.
lsc.properties:
<pre>
lsc.tasks.mytask.srcService.pivotAttrs = uid
lsc.tasks.mytask.srcService = org.lsc.service.InetOrgPersonJDBCService
lsc.tasks.mytask.srcService.attrs = uid userPassword mail supannCivilite sn 
givenName birthDate promotion supannCodeINE street postalCode l homePhone 
mobile supannMailPerso jpegPhoto
...
lsc.tasks.mytask.dstService.pivotAttrs = uid
lsc.tasks.mytask.dstService.filterId = 
(&(objectClass=inetOrgPerson)(uid={logname}))
lsc.tasks.mytask.dstService.filterAll = (&(objectClass=inetOrgPerson))
lsc.tasks.mytask.dstService.baseDn = ou=people
lsc.tasks.mytask.dstService.attrs = uid userPassword mail sn givenName cn 
displayName objectClass street postalCode l homePhone mobile jpegPhoto ... 
lsc.tasks.mytask.dstService = org.lsc.jndi.SimpleJndiDstService
</pre>

sql-map-config.d/InetOrgPerson.xml:
<pre>
<?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="InetOrgPersonJDBCService">

        <typeAlias alias="InetOrgPerson" 
type="org.lsc.objects.flat.fInetOrgPerson" />
                
        <resultMap id="InetOrgPersonResult" class="InetOrgPerson">
                <result property="uid" column="logname"/>
                <result property="userPassword" column="logpassw"/>
                <result property="mail" column="email"/>
                <result property="sn" column="nom"/>
                <result property="givenName" column="prenom"/>
                <result property="street" column="adrl1"/>
<!-- ...  -->
        </resultMap>
        <select id="getInetOrgPerson" resultMap="InetOrgPersonResult" 
parameterClass="java.util.Map">
                <!-- FILL IT, BE CAREFULL AT SPECIAL CHARACTER REPRESENTATION 
-->
                Select
                    ideleve,
                        logname,
                        logpassw,
                        nom,
                        prenom,
                        email,
                FROM mytable
                        WHERE logname = #logname#
        </select>
        <select id="getInetOrgPersonList" resultClass="java.util.HashMap">
                <!-- FILL IT, BE CAREFULL AT SPECIAL CHARACTER REPRESENTATION 
-->
                Select logname
                FROM mytable
                WHERE logname IS NOT NULL AND
                logname != ""
        </select>
</pre>

The sync phase is working ok with that configuration.
----------------------------------------
Bug #124: Clean phase of db2ldap deletes all entities
http://tools.lsc-project.org/issues/show/124

Author: J?r?me Schell
Status: New
Priority: High
Assigned to: 
Category: Core
Target version: 


During the clean phase of a db2ldap job, all entities in the destination are 
deleted.

After tracking the problem a bit, it seems that the method clean2Ldap of 
org.lsc.AbstractSynchronize loops on all destination entries and calls the 
getObject method of org.lsc.service.AbstractJdbcService passing it the id of 
the entry (to look for it in the source).
The problem is that the format of the id is the DN of the LDAP entry 
(uid=john.do,dc=mydomain,dc=com) and in the case of a JDBC source, that value 
is irrelevant.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://tools.lsc-project.org/my/account
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.lsc-project.org/pipermail/lsc-dev/attachments/20091013/a25b01f9/attachment.htm>

Reply via email to