AnsweredAssumed Answered

Activiti 5.13 Configuring LDAP - NullPointerException

Question asked by jhutchins on Aug 22, 2013
Latest reply on Feb 7, 2014 by jbarrez
Hello,

Im new to activiti and am conducting some research on its capabilities, so far very interesting project! I'm attempting to utilize the ldap intgration that was add in 5.13 so AD users can log into activiti-explorer. I have followed all the instructions I could find on the user guide and on the forum post http://forums.activiti.org/content/aciviti-513-ldap-integration .

So far I have downloaded and deployed the activiti-ldap.jar. I have modified the activiti-ui-context.xml and activiti-standalone-context.xml using the examples in the prior forum post and in the activiti userdocs.

Here is my activiti-standalond-context.xml

   <property name="configurators">
          <list>
              <bean class="org.activiti.ldap.LDAPConfigurator">             
                <!– Server connection params –>
                <property name="server" value="ldap://dc1.dev.lan" />
                <property name="port" value="389" />
                <property name="user" value="sAMAcountName=administrator" />
                <property name="password" value="**********" />
               
                <!– Query params –>
                <property name="baseDn" value="ou=demo, dc=dev, dc=lan" />
                <property name="queryUserByUserId" value="(&amp;(objectClass=inetOrgPerson)(sAMAccountName={0}))" />
                <property name="queryUserByFullNameLike" value="(&amp;(objectClass=inetOrgPerson)(|({0}=*{1}*)({2}=*{3}*)))" />
                <property name="queryGroupsForUser" value="(&amp;(objectClass=groupOfUniqueNames)(uniqueMember={0}))" />
               
                <!– Attribute config –>
                <property name="userIdAttribute" value="sAMAccountName" />
                <property name="userFirstNameAttribute" value="givenName" />
                <property name="userLastNameAttribute" value="sn" />
               
                <property name="groupIdAttribute" value="sAMAccountName" />
                <property name="groupNameAttribute" value="cn" />               
              </bean>
          </list>
        </property>

For the activiti-ui-context.xml I was unsure of the changes i had to make so i left it as is

<property name="adminGroups">
     <list>
      <value>admin</value>
     </list>
   </property>
   <property name="userGroups">
      <list>
        <value>user</value>
      </list>
   </property>

Lastly here is the stack trace I receive while attempting to login on the activiti-explorer app


java.lang.NullPointerException
at org.activiti.explorer.ui.login.DefaultLoginHandler.authenticate(DefaultLoginHandler.java:41)
at org.activiti.explorer.ui.login.DefaultLoginHandler.authenticate(DefaultLoginHandler.java:35)
at org.activiti.explorer.ui.login.LoginPage$ActivitiLoginListener.onLogin(LoginPage.java:99)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1219)
at com.vaadin.ui.LoginForm$2.handleParameters(LoginForm.java:103)
at com.vaadin.ui.Window.handleParameters(Window.java:515)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:528)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.activiti.explorer.filter.ExplorerFilter.doFilter(ExplorerFilter.java:44)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

I'm more of a systems guy then a developer but I'm trying to learn Thank you for any assistance.

Jake

Outcomes