cancel
Showing results for 
Search instead for 
Did you mean: 

configuring ldap

slag
Champ in-the-making
Champ in-the-making
I'm trying to connect activiti 5.17.0 to my ldap server.

According to the documentation (http://www.activiti.org/userguide/) I need to modify activiti-standalone-context.xml.
This file is however not present in after version 5.16.4.


I added the following configuration to activiti-custom-context.xml.

  <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
        <property name="dataSource" ref="dataSource" />
        <property name="transactionManager" ref="transactionManager" />
        <property name="databaseSchemaUpdate" value="true" />
        <property name="jobExecutorActivate" value="true" />
        <property name="enableDatabaseEventLogging" value="true" />
        <property name="customFormTypes">
          <list>
            <bean class="org.activiti.explorer.form.UserFormType"/>
            <bean class="org.activiti.explorer.form.ProcessDefinitionFormType"/>
            <bean class="org.activiti.explorer.form.MonthFormType"/>
          </list>
        </property>

      <property name="configurators">
          <list>
              <bean class="org.activiti.ldap.LDAPConfigurator">
                <!– Server connection params –>
                <property name="server" value="192.168.1.106" />
                <property name="port" value="389" />
                <property name="user" value="uid=admin,dc=newtec,dc=eu" />
                <property name="password" value="secret" />
                <!– Query params –>
                <property name="baseDn" value="ou=people,ou=intranet,dc=newtec,dc=eu" />
                <property name="queryUserByUserId" value="(&amp;(objectClass=inetOrgPerson)(uid={0}))" />
                <property name="queryUserByFullNameLike" value="(&amp;(objectClass=inetOrgPerson)(|({0}=*{1}*)({2}=*{3}*)))" />
                <property name="queryGroupsForUser" value="(&amp;(objectClass=groupOfNames)(Member={0}))" />
                <!– Attribute config –>
                <property name="userIdAttribute" value="uid" />
                <property name="userFirstNameAttribute" value="cn" />
                <property name="userLastNameAttribute" value="sn" />
                <property name="groupIdAttribute" value="cn" />
                <property name="groupNameAttribute" value="cn" />
             </bean>
          </list>
        </property>
  </bean>


and the following to activiti-ui-context.xml


  <bean name="explorerApp" class="org.activiti.explorer.ExplorerApp" scope="session">
    <property name="environment" value="${activiti.ui.environment}" />
    <property name="useJavascriptDiagram" value="${activiti.ui.jsdiagram}" />
    <property name="i18nManager" ref="i18nManager" />
    <property name="viewManager" ref="viewManager" />
    <property name="notificationManager" ref="notificationManager" />
    <property name="attachmentRendererManager" ref="attachmentRendererManager" />
    <property name="formPropertyRendererManager" ref="formPropertyRendererManager" />
    <property name="variableRendererManager" ref="variableRendererManager" />
    <property name="applicationMainWindow" ref="mainWindow" />
    <property name="componentFactories" ref="componentFactories" />
    <property name="workflowDefinitionConversionFactory" ref="workflowDefinitionConversionFactory" />
    <property name="loginHandler" ref="activitiLoginHandler" />
    <property name="simpleWorkflowJsonConverter" ref="simpleWorkflowJsonConverter" />
    <property name="adminGroups">
       <list>
         <value>admin</value>
       </list>
    </property>
    <property name="userGroups">
      <list>
        <value>user</value>
      </list>
    </property>
  </bean>


At startup i get the following error in catalina.out which results in explorer not running.

12:06:39,725 [localhost-startStop-1] INFO  org.springframework.beans.factory.xml.XmlBeanDefinitionReader  - Loading XML bean definitions from class path resource [activiti-ui-context.xml]
12:06:39,897 [localhost-startStop-1] INFO  org.springframework.beans.factory.xml.XmlBeanDefinitionReader  - Loading XML bean definitions from class path resource [activiti-login-context.xml]
12:06:39,932 [localhost-startStop-1] INFO  org.springframework.beans.factory.xml.XmlBeanDefinitionReader  - Loading XML bean definitions from class path resource [activiti-custom-context.xml]
23-Mar-2015 12:06:39.964 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Error listenerStart
23-Mar-2015 12:06:39.977 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/activiti-explorer] startup failed due to previous errors
12:06:39,980 [localhost-startStop-1] INFO  org.activiti.explorer.servlet.WebConfigurer  - Destroying Web application


When i remove the LDAP part from activiti-custom-context.xml it starts up normal.

Any help is welcome.
31 REPLIES 31

jbarrez
Star Contributor
Star Contributor
The exception is

org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.activiti.ldap.LDAPConfigurator] for bean with name 'org.activiti.ldap.LDAPConfigurator#de1e852' defined in class path resource [activiti-custom-context.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org/activiti/engine/cfg/AbstractProcessEngineConfigurator

Are you mixing jars of Activiti? Seems like some part of your jars are of a later version than others.

slag
Champ in-the-making
Champ in-the-making
I double checked and i have the correct ldap connector installed.
Since B.Schnarr has the same issue, this also seens unlikely.
Could there be a wrong version on the maven repo?

jbarrez
Star Contributor
Star Contributor
I'm not sure if  B.Schnarr has the exact same issue. Are you using maven? Can you post your pom.xml?

slag
Champ in-the-making
Champ in-the-making
I am not compiling or changing code.
I did a fresh install and configured it to use ldap. I manually downloaded the ldap connector from the maven repo and placed it in the lib folder of activiti-explorer.
http://mvnrepository.com/artifact/org.activiti/activiti-ldap/5.17.0

jbarrez
Star Contributor
Star Contributor
Ok last resort then .. can you validate that in the activiti-engine.jar you have a class called AbstractProcessEngineConfigurator.class? If so, I'm officially puzzled by the stacktrace you're getting Smiley Tongue

slag
Champ in-the-making
Champ in-the-making
That classfile is in activiti-engine.jar
Is it possible i did something wrong with my configuration?
Would it be possible to update the documentation to reflect change to spring?
Should I restart installation and document my actions step by step so you can reproduce?
If you are interested i can create a Virtualbox machine with my configuration and share it with you.

jbarrez
Star Contributor
Star Contributor
A maven project would be most helpful to get it quickly up and running

slag
Champ in-the-making
Champ in-the-making
I don't understand why i should create a maven project and what i would have to do with it.
I copy paste a jar file in an activiti/tomcat folder.
I edit a text file with my ldap config.
I am not compiling 1 letter of code.

kumarr
Champ in-the-making
Champ in-the-making
I do have the same problem slag mentioned with 5.17 version of activiti.

When i add the ldappart to activiti-custom-context.xml activiti crashes with the same exact error message as below.
SEVERE: Error listenerStart
May 12, 2015 1:18:00 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/activiti-explorer] startup failed due to previous errors

Do we go back to a version 5.16 or do we wait for 5.18.  Please let us know.

b_schnarr
Champ in-the-making
Champ in-the-making
For me the same. I already opened another post concerning this. But without success: http://forums.activiti.org/content/configure-ldap-activiti-517