Issue #539 has been updated by David Coutadeur.

Target version changed from 2.0.2 to trunk
% Done changed from 0 to 90


Patch applied on trunk. Do you think it is useful to apply it on branch2.0 ?
----------------------------------------
Bug #539: bug when ldap async source service + database dest service (lsc 2.0, 
trunk)
http://tools.lsc-project.org/issues/539

Author: David Coutadeur
Status: Assigned
Priority: Normal
Assigned to: David Coutadeur
Category: Core
Target version: trunk
Problem in version: 2.0


Hi,
Here is the bug when launch an asynchronous ldap source to a database 
destination service task :
(the problem does not appear for a synchronous task)

<pre>
oct. 24 20:26:01 - ERROR - Error while synchronizing ID
uidInterne=myuser,ou=People,dc=organization,dc=org:
java.lang.UnsupportedOperationException: This method should never be
called - this is a software BUG !
</pre> 

Interesting debugging stuff here :
* SimpleJdbcDstService, line 117 and after
* AbstractJdbcService, line 193 and after
*  AbstractSynchronize, line 707 and after

AbstractSynchronize launching this :
<pre>
dstBean = task.getDestinationService().getBean(id.getKey(), id.getValue(), 
true);
</pre>
for a synchronous task
and this :
<pre>
dstBean = task.getDestinationService().getBean(entry.getMainIdentifier(), 
entryDatasets, false);
</pre>
for an asynchronous task

<pre>
then the getBean is launching :
List<?> records = sqlMapper.queryForList((fromSource ? 
getRequestNameForObject() : getRequestNameForClean()), 
getAttributesMap(attributes));
</pre>

so it launches getRequestNameForObject for a synchronous task and 
getRequestNameForClean for an asynchronous task.
The getRequestNameForClean should never be called, and send an error.

I made a patch to solve this, which always call the getBean with the true 
parameter.

However, I don't know all the implication of this. Especially database source 
-> ldap dest, async + sync. If somebody could look at this and :
1/ test in an exhaustive way
or,
2/ look at the code with a global and exhaustive approach to confirm I am not 
doing wrong...

David


-- 
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
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-dev mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-dev

Reply via email to