Bug #65

Developpement error when using no create option

Added by Clément Oudot about 1 year ago. Updated about 1 year ago.

Status:Closed Start:10/06/2009
Priority:Normal Due date:
Assigned to:Jonathan Clarke % Done:

100%

Category:Core
Target version:1.1.0
Problem in version:

Description

Hello,

I make test on connectors, but when I use the "-nc" option, I have errors like this:

     [java] 2355 [main] DEBUG  org.lsc.AbstractSynchronize.synchronize2Ldap(AbstractSynchronize.java:331)   - Synchronizing org.lsc.objects.user for XXXX
     [java] 2386 [main] ERROR  org.lsc.AbstractSynchronize.logActionError(AbstractSynchronize.java:477)   - Error while synchronizing ID XXXX: java.lang.RuntimeException: -- Development error: No RDN found (uid by default)!
     [java] java.lang.RuntimeException: -- Development error: No RDN found (uid by default)!
     [java]     at org.lsc.beans.BeanComparator.getAddEntry(BeanComparator.java:406)
     [java]     at org.lsc.beans.BeanComparator.calculateModifications(BeanComparator.java:165)
     [java]     at org.lsc.AbstractSynchronize.synchronize2Ldap(AbstractSynchronize.java:397)
     [java]     at org.lsc.SimpleSynchronize.launchTask(SimpleSynchronize.java:280)
     [java]     at org.lsc.SimpleSynchronize.launch(SimpleSynchronize.java:172)
     [java]     at org.lsc.Launcher.run(Launcher.java:128)
     [java]     at org.lsc.Launcher.main(Launcher.java:111)

I have to say that my task does not have a dn rule because I just use the connector for updates. So I have these conditionnal rules:

lsc.tasks.XXXX.condition.create = false
lsc.tasks.XXXX.condition.update = true
lsc.tasks.XXXX.condition.delete = false
lsc.tasks.XXXX.condition.modrdn = false

The connector runs fine if I don't use "-nc" option.

Associated revisions

Revision 247
Added by Jonathan Clarke about 1 year ago

Fixes #65. Only calculate create condition once, and pass it along. Don't complain about no source DN if condition is false.

History

Updated by Jonathan Clarke about 1 year ago

  • Status changed from New to Assigned
  • Assigned to set to Jonathan Clarke
  • Target version set to 1.1.0

Hi Clément, thanks for the report.

This error comes from the source bean not having any DN. DNs should come from either :
1) The source directory or DB (in the case of a DB, only if you have a field in your request that is named "distinguishName")
2) From the task properties dn rule.

I just committed a fix (bugs #47 and #64) that re-enables reading the DN from the source LDAP directory. So if you're using a ldap2ldap sync, this error should no longer happen with the latest lsc-core trunk (lsc-core-SNAPSHOT will be updated automatically during the night).

I'm about to commit a fix so that if the condition is false, we don't try to generate a DN (automatic generation uses the uid attribute from the source, which may not be present, thus the error), but set the DN to "No DN set! Read it from the source or set lsc.tasks.NAME.dn".

Please let me know if this fixes your bug, and if you think it's a good solution. Thanks!

Updated by Jonathan Clarke about 1 year ago

  • Status changed from Assigned to Feedback
  • % Done changed from 0 to 100

Applied in changeset r247.

Updated by Clément Oudot about 1 year ago

Hi,

this seems ok with your last commit.

Thanks,

Clément.

Updated by Jonathan Clarke about 1 year ago

  • Status changed from Feedback to Closed

Great! Closing the issue then. Feel free to re-open it if you have more problems! :)

Also available in: Atom PDF