Issue #769 has been updated by Clément OUDOT.
I can reproduce but this only occurs when a null value is present in a pivot
attribute.
With SQL in source, this means that a field requested in the
<requestNameForList> contains null values.
For example, in the LSC quickstart tutorial:
<pre>
<select id="getInetOrgPersonList" resultClass="java.util.HashMap">
SELECT pers."MAIL" AS mail, pers."ADDRESS" AS address
FROM csvdata pers
</select>
</pre>
Will lead to this error:
<pre>
juin 15 17:02:17 - INFO - Starting sync for MySyncTask
juin 15 17:02:17 - ERROR - Error while synchronizing ID
{[email protected], address=null}: java.lang.NullPointerException
juin 15 17:02:17 - ERROR - Error while synchronizing ID
{[email protected], address=null}: java.lang.NullPointerException
juin 15 17:02:17 - ERROR - Error while synchronizing ID
{[email protected], address=null}: java.lang.NullPointerException
juin 15 17:02:17 - ERROR - Error while synchronizing ID {[email protected],
address=null}: java.lang.NullPointerException
juin 15 17:02:17 - ERROR - Error while synchronizing ID
{[email protected], address=null}: java.lang.NullPointerException
juin 15 17:02:17 - ERROR - Error while synchronizing ID
{[email protected], address=null}: java.lang.NullPointerException
juin 15 17:02:17 - ERROR - Error while synchronizing ID
{[email protected], address=null}: java.lang.NullPointerException
juin 15 17:02:18 - ERROR - All entries: 8, to modify entries: 0, successfully
modified entries: 0, errors: 7
juin 15 17:02:18 - INFO - Starting clean for MySyncTask
juin 15 17:02:18 - INFO - All entries: 8, to modify entries: 0, successfully
modified entries: 0, errors: 0
</pre>
I don't know if this is really an issue as pivot values should not be null. But
we should maybe catch the error in LSC code in order to output a clean message.
----------------------------------------
Bug #769: LSC throws null pointer exception when database source service
contains null attribute
http://tools.lsc-project.org/issues/769
Author: Jon Kidder
Status: Assigned
Priority: Normal
Assigned to: Raphaël Ouazana
Category: Core
Target version: 2.2
Problem in version: 2.1.3
I am syncing from a database source to OpenLDAP. Whenever LSC encounters a
database record that contains a null attribute LSC throws a null pointer
exception and fails to synchronize the record. Here's my debug output. This
happens if any database field is null.
May 28 11:27:26 - ERROR - Error while synchronizing ID {mail=null,
sn=Stubblefield, userpassword=[REMOVED], cn=s208455, givenname=Teresa,
employeetype=X }: java.lang.NullPointerException
May 28 11:27:26 - DEBUG - java.lang.NullPointerException
java.lang.NullPointerException: null
at
org.apache.directory.api.ldap.model.filter.FilterEncoder.encodeFilterValue(FilterEncoder.java:90)
~[api-all-1.0.0-M22.jar:1.0.0-M22]
at org.lsc.LscDatasets.getValueForFilter(LscDatasets.java:101)
~[lsc-core-2.1.3.jar:na]
at
org.lsc.jndi.AbstractSimpleJndiService.get(AbstractSimpleJndiService.java:248)
~[lsc-core-2.1.3.jar:na]
at
org.lsc.jndi.SimpleJndiDstService.getBean(SimpleJndiDstService.java:135)
~[lsc-core-2.1.3.jar:na]
at org.lsc.SynchronizeTask.run(AbstractSynchronize.java:741)
[lsc-core-2.1.3.jar:na]
at org.lsc.SynchronizeTask.run(AbstractSynchronize.java:707)
[lsc-core-2.1.3.jar:na]
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[na:1.6.0_18]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[na:1.6.0_18]
at java.lang.Thread.run(Thread.java:619) [na:1.6.0_18]
--
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