cancel
Showing results for 
Search instead for 
Did you mean: 

startup error when configuring ldap

chuck_irvine
Champ on-the-rise
Champ on-the-rise
When I configure activiti enterprise to use my local ldap server, per the enterprise admin guide, I get the following error:

<code>
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.activiti.service.idm.LdapSyncService] is defined
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:371)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:331)
   at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:968)
   at com.activiti.conf.Bootstrapper.initLdapSync(Bootstrapper.java:572)
   at com.activiti.conf.Bootstrapper.onApplicationEvent(Bootstrapper.java:177)
   at com.activiti.conf.Bootstrapper.onApplicationEvent(Bootstrapper.java:93)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:151)
<code>

This error prevents the activiti-app webapp from being deployed.

I'm  attaching all activiti related property files and my tomcat startup file.

Any help would be greatly appreciated!
1 ACCEPTED ANSWER
10 REPLIES 10

chuck_irvine
Champ on-the-rise
Champ on-the-rise
Note that this problem occurs whether I have my ApacheDS ldap server running or not. So, perhaps the problem can be duplicated by simply installing my ldap property file into tomcat (version 8).

jbarrez
Star Contributor
Star Contributor
Do you happen to have some other logs? There seems to be missing some logging for the actual exception.

I don't see anything wrong with the config directly (maybe make ldap.synchronization.full.enabled set to true).

Which version is this? Did you only change the properties or did some more customizations?

chuck_irvine
Champ on-the-rise
Champ on-the-rise
Good call, Joram. After setting ldap.sync.full.enabled to true, activiti-app deployed without error and sync'ed both my users and groups. I was  also able to log in as one of the sync'ed users. Super!!! That was a big step. Thanks, Thanks! I had also opened a case for this problem with Alfresco customer support. I'll close that ticket after documenting the fix.

jonnyg
Confirmed Champ
Confirmed Champ
Interested as well in this fix, as we've seen it in 1.4.3. Filed issue #00681905.

As the stacktrace shows, the root cause is in Bootstrapper line 572:
<java>
  protected void initLdapSync(ContextRefreshedEvent event)
  {
    LdapSyncService ldapSyncService = (LdapSyncService)event.getApplicationContext().getBean(LdapSyncService.class);
    if (ldapSyncService != null) {
      ldapSyncService.asyncExecuteFullSynchronizationIfNeeded(null);
    } else {
      this.log.warn("No instance of " + LdapSyncService.class + " found. Sync with external source not happening.");
    }
  }
</java>
and the LdapSyncService bean (com.activiti.conf.IdmSyncServiceConfiguration) is configured conditionally, only if either of the sync properties are set to true.

jbarrez
Star Contributor
Star Contributor
@JonnyG : what fix are you looking for exactly? (there has been some serious refactoring for the ldap sync service, so want to check what we've done against this)

jonnyg
Confirmed Champ
Confirmed Champ
At a minimum, have it working. Through v1.4.3, if BOTH ldap.sync.full.enabled or  ldap.sync.differential.enabled are set to false, you will get error as above.

jbarrez
Star Contributor
Star Contributor
That has been fixed. The bootstrapper now checkes the sync properties, not the auth property.

jonnyg
Confirmed Champ
Confirmed Champ
Thanks – which version?

jbarrez
Star Contributor
Star Contributor
What I meant is that 'I fixed it' on the master branch. So 1.5.