Plugin broken in Headless Client but works in Smart Client
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
We're developing an Active Directory/LDAP plugin using spring/spring-ldap/spring-security for testing credentials.
It works fine in Smart Client, however when we try and use the plugin in a Headless Client context (e.g. REST authentication for Servoy Mobile) it fails.
The failure being logged is
Relevant Stack Trace
Some basic internet research claims this is generally due to a ClassLoader issue, and I'm inclined to agree.
That being said I'm unsure of how to go about resolving this issue, not being entirely comfortable on the subject of ClassLoaders interactions in the Headless Client environment.
Source: https://bitbucket.org/adblocks/authenticator
Bonus: Apache Licence, so free LDAP/AD for everyone if this works
It works fine in Smart Client, however when we try and use the plugin in a Headless Client context (e.g. REST authentication for Servoy Mobile) it fails.
The failure being logged is
- Code: Select all
com.sun.jndi.ldap.LdapCtx cannot be cast to org.springframework.ldap.core.DirContextOperations
Relevant Stack Trace
- Code: Select all
org.springframework.ldap.core.LdapEntryIdentificationContextMapper.mapFromContext(LdapEntryIdentificationContextMapper.java:30),
org.springframework.ldap.core.LdapEntryIdentificationContextMapper.mapFromContext(LdapEntryIdentificationContextMapper.java:27),
org.springframework.ldap.core.ContextMapperCallbackHandler.getObjectFromNameClassPair(ContextMapperCallbackHandler.java:69),
org.springframework.ldap.core.CollectingNameClassPairCallbackHandler.handleNameClassPair(CollectingNameClassPairCallbackHandler.java:50),
org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:367),
org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:309),
org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:642),
org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:578),
org.springframework.ldap.core.LdapTemplate.authenticate(LdapTemplate.java:1441),
org.springframework.ldap.core.LdapTemplate.authenticate(LdapTemplate.java:1426),
org.springframework.ldap.core.LdapTemplate.authenticate(LdapTemplate.java:1369)
Some basic internet research claims this is generally due to a ClassLoader issue, and I'm inclined to agree.
That being said I'm unsure of how to go about resolving this issue, not being entirely comfortable on the subject of ClassLoaders interactions in the Headless Client environment.
Source: https://bitbucket.org/adblocks/authenticator
Bonus: Apache Licence, so free LDAP/AD for everyone if this works