Bug #39

[sync db2ldap] use srcBean.getAttributeValueById on DB into lsc.properties

Added by Thomas Chemineau over 1 year ago. Updated over 1 year ago.

Status:Closed Start:31/03/2009
Priority:Normal Due date:
Assigned to:- % Done:

100%

Category:Core
Target version:1.1.0
Problem in version:

Description

I configure DB to LDAP synchronization. But, when I define the following line into lsc.properties :

8<--------
lsc.tasks.application.dn = \"uid=\" + srcBean.getAttributeValueById(\"uid\") + \",ou=utilisateurs\"
8<--------

I have a ConfigurationException :

8<--------
javax.naming.ConfigurationException: java.naming.provider.url property does not contain a URL
at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:61)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.ldap.InitialLdapContext.<init>(InitialLdapContext.java:134)
at org.lsc.jndi.JndiServices.<init>(JndiServices.java:125)
at org.lsc.jndi.JndiServices.getInstance(JndiServices.java:179)
at org.lsc.jndi.JndiServices.getSrcInstance(JndiServices.java:155)
at org.lsc.utils.JScriptEvaluator.instanceEval(JScriptEvaluator.java:175)
at org.lsc.utils.JScriptEvaluator.evalToString(JScriptEvaluator.java:123)
at org.lsc.beans.BeanComparator.calculateModifications(BeanComparator.java:117)
at org.lsc.AbstractSynchronize.synchronize2Ldap(AbstractSynchronize.java:327)
at org.lsc.SimpleSynchronize.launchTask(SimpleSynchronize.java:266)
at org.lsc.SimpleSynchronize.launch(SimpleSynchronize.java:172)
at org.lsc.Launcher.run(Launcher.java:120)
at org.lsc.Launcher.main(Launcher.java:112)
8<--------

Associated revisions

Revision 176
Added by Jonathan Clarke over 1 year ago

Don't instanciate all objects for JSEvaluator if they're not needed. Fixes #39.

History

Updated by Jonathan Clarke over 1 year ago

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

Applied in changeset r176.

Updated by Jonathan Clarke over 1 year ago

For the record:
This error was occuring because before parsing the JavaScript, we were setting up some objects to be used, including src and dst Ldap services. This caused an error when the src Ldap service was validated, since none is configured for db2ldap.

Should be fixed now. Thomas, can you check and close this issue if so? Thanks.

Updated by Thomas Chemineau over 1 year ago

  • Status changed from Feedback to Closed

OK for me, no more exceptions. Synchronization works well. Thanks.

Also available in: Atom PDF