User Form Type does not show users when using LDAP

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2014 11:09 AM
Did I something wrong or is this a bug?
Thank you
Ben
- Labels:
-
Archive

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2014 09:57 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2014 04:08 AM
<code>
protected void mapSearchResultToUser( SearchResult result, UserEntity user) throws NamingException {
if (ldapConfigurator.getUserIdAttribute() != null && user != null) {
user.setId(result.getAttributes().get(ldapConfigurator.getUserIdAttribute()).get().toString());
}
if (ldapConfigurator.getUserFirstNameAttribute() != null && user != null) {
user.setFirstName(result.getAttributes().get(ldapConfigurator.getUserFirstNameAttribute()).get().toString());
}
if (ldapConfigurator.getUserLastNameAttribute() != null && user != null) {
user.setLastName(result.getAttributes().get(ldapConfigurator.getUserLastNameAttribute()).get().toString());
}
if (ldapConfigurator.getUserEmailAttribute() != null && user != null) {
user.setEmail(result.getAttributes().get(ldapConfigurator.getUserEmailAttribute()).get().toString());
}
}
</code>
I still get the error from above with <code>Caused by: java.lang.NullPointerException
at org.activiti.ldap.LDAPUserManager.mapSearchResultToUser(LDAPUserManager.java:165)</code>
No idea why. Can anyone help? It would be great if the User Form Type would work with LDAP and it seems that we aren´t far from that because he finds the users in LDAP correctly! The only thing is this exception.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2014 08:03 AM
It's not a solution but what happens if search trigger condition is changed to >2 instead >=2?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2014 04:25 AM
<code>user.setFirstName(result.getAttributes().get(ldapConfigurator.getUserFirstNameAttribute()).get().toString());</code> and
<code>user.setLastName(result.getAttributes().get(ldapConfigurator.getUserLastNameAttribute()).get().toString());</code>
are causing a Nullpointer-Exception. But I have no idea why… Could this problem occur when only the first one or two letters are typed in and then, the query tries to search for the user but does not find a user object?
Maybe, the line <code>if (ldapConfigurator.getUserIdAttribute() != null) {</code> must be extended to
<code>if (ldapConfigurator.getUserIdAttribute() != null && user!= null) {</code>
What do you think?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2014 09:29 AM
If the trigger condition is set to >= 4, the error occurs not so often, but it still occurs….That makes sense because with 4 letters, the query has a better chance to find a user. The Question is why this problem does not happen with local users and how we could avoid them.
Just a thought: Lets say the trigger condition is set to 4. Nothing happens until the 4th letter is typed in. So far so good. Now, there are 2 possibilities. If there are users in the LDAP with names containing these letters, all is good. Otherwise, the error happens.
What is very strange: We have an LDAP User "Klaus Kerberos". With the first 4 letters (kerb), the query finds nothing. With 5letters (kerber), the query finds the user. What sense have the %-signs?
Thanks for your contribution

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2014 09:41 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2014 09:59 AM
.getIdentityService()
.createUserQuery()
.userFullNameLike("*" + searchText + "*")
.list();</code>
works well with LDAP, but this error is still there. I have users without a forename or surename. Then, this errors occures. But there are several other users with a forename and a surename and this error occurs as well. I checked user and result for null, maybe this here is null?? <code> ldapConfigurator.getUserFirstNameAttribute()).get().toString()</code>

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2014 10:29 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2014 10:40 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2014 10:52 AM
