<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Java engine and ldap configuration problem in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/java-engine-and-ldap-configuration-problem/m-p/217514#M170644</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a little problem with ldap configuration under java aplication. After configureing activiti engine and ldap IdentityService do not find existing ldap user. (Given user exists in ldap - i have checked that using DirContext and the same ldap connection properties and queries). Engine need to be created programmatically because some of connection properties are stored in different database.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-java line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl process = new org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration();&lt;BR /&gt;process.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_FALSE);&lt;BR /&gt;process.setJdbcDriver("com.microsoft.sqlserver.jdbc.SQLServerDriver");&lt;BR /&gt;process.setJdbcUrl("jdbc:sqlserver://"+jdbcHost+";databaseName="+jdbcDatabase);&lt;BR /&gt;process.setJdbcUsername(jdbcUser);&lt;BR /&gt;process.setJdbcPassword(jdbcPass);&lt;BR /&gt;process.setAsyncExecutorEnabled(true);&lt;BR /&gt;process.setAsyncExecutorActivate(false);&lt;BR /&gt;&lt;BR /&gt;LDAPConfigurator ldapConfig = new LDAPConfigurator();&lt;BR /&gt;//LDAP connection params&lt;BR /&gt;ldapConfig.setServer(ldapUrl);&lt;BR /&gt;ldapConfig.setPort(lPort);&lt;BR /&gt;ldapConfig.setUser(ldapUser);&lt;BR /&gt;ldapConfig.setPassword(ldapPass);&lt;BR /&gt;ldapConfig.setSecurityAuthentication("simple");&lt;BR /&gt;ldapConfig.setInitialContextFactory("com.sun.jndi.ldap.LdapCtxFactory");&lt;BR /&gt;ldapConfig.setBaseDn(baseDn);&lt;BR /&gt;//Attributes config&lt;BR /&gt;ldapConfig.setUserIdAttribute("sAMAccountName");&lt;BR /&gt;ldapConfig.setUserFirstNameAttribute("givenName");&lt;BR /&gt;ldapConfig.setUserLastNameAttribute("sn");&lt;BR /&gt;ldapConfig.setUserEmailAttribute("mail");&lt;BR /&gt;ldapConfig.setGroupIdAttribute("cn");&lt;BR /&gt;ldapConfig.setGroupNameAttribute("cn");&lt;BR /&gt;//Queries&lt;BR /&gt;ldapConfig.setQueryUserByUserId("(&amp;amp;(objectClass=user)(sAMAccountName={0}))");&lt;BR /&gt;ldapConfig.setQueryGroupsForUser("(&amp;amp;(objectClass=group)(member={0}))");&lt;BR /&gt;&lt;BR /&gt;process.addConfigurator(ldapConfig);&lt;BR /&gt;org.activiti.engine.ProcessEngine engine = process.buildProcessEngine();&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;org.activiti.engine.identity.User user = engine.getIdentityService().createUserQuery().userId(ldapExistingUser).singleResult();&lt;BR /&gt;if(user == null){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.err.println("User not found");&lt;BR /&gt;}else{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(u.getId());&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(u.getFirstName());&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(u.getLastName());&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(u.getEmail());&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/S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/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Console output:&lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;[AWT-EventQueue-0] INFO org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl - Found 1 Process Engine Configurators in total:&lt;BR /&gt;[AWT-EventQueue-0] INFO org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl - class org.activiti.ldap.LDAPConfigurator (priority:10000)&lt;BR /&gt;[AWT-EventQueue-0] INFO org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl - Executing beforeInit() of class org.activiti.ldap.LDAPConfigurator (priority:10000)&lt;BR /&gt;[AWT-EventQueue-0] INFO org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl - Executing configure() of class org.activiti.ldap.LDAPConfigurator (priority:10000)&lt;BR /&gt;[AWT-EventQueue-0] INFO org.activiti.engine.impl.ProcessEngineImpl - ProcessEngine default created&lt;BR /&gt;User not found&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will be grateful for your help and suggestions.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Dec 2015 13:00:24 GMT</pubDate>
    <dc:creator>rmadaow</dc:creator>
    <dc:date>2015-12-02T13:00:24Z</dc:date>
    <item>
      <title>Java engine and ldap configuration problem</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-engine-and-ldap-configuration-problem/m-p/217514#M170644</link>
      <description>Hi,I have a little problem with ldap configuration under java aplication. After configureing activiti engine and ldap IdentityService do not find existing ldap user. (Given user exists in ldap - i have checked that using DirContext and the same ldap connection properties and queries). Engine need to</description>
      <pubDate>Wed, 02 Dec 2015 13:00:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-engine-and-ldap-configuration-problem/m-p/217514#M170644</guid>
      <dc:creator>rmadaow</dc:creator>
      <dc:date>2015-12-02T13:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: Java engine and ldap configuration problem</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-engine-and-ldap-configuration-problem/m-p/217515#M170645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Forgot to change, but still can't find user.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;else{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(user.getId());&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(user.getFirstName());&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(user.getLastName());&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(user.getEmail());&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/java&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Dec 2015 13:15:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-engine-and-ldap-configuration-problem/m-p/217515#M170645</guid>
      <dc:creator>rmadaow</dc:creator>
      <dc:date>2015-12-02T13:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: Java engine and ldap configuration problem</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-engine-and-ldap-configuration-problem/m-p/217516#M170646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;A href="http://forums.activiti.org/content/steps-integrate-activiti-ldap" rel="nofollow noopener noreferrer"&gt;Implementing&amp;nbsp; an custom ProcessEngineConfiguration, UserManager and GroupManager solves Problem &lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2015 11:52:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-engine-and-ldap-configuration-problem/m-p/217516#M170646</guid>
      <dc:creator>rmadaow</dc:creator>
      <dc:date>2015-12-04T11:52:19Z</dc:date>
    </item>
  </channel>
</rss>

