Mendix build failure - LDAP

1
Hi, I recently upgraded a Mx6 application to Mx7 and therefore also updated all modules. I removed old libraries in /userlib where possible. However, I do still keep getting the following error:  [javac] D:\Users\lmanna\Documents\Mendix\ProRail - RRCB REL 2.5\javasource\ldap\LdapModule.java:114: error: type AttributesMapper does not take parameters [javac] template.search(LdapModule.normalizeDn(ldapPath.getLocation()), ldapServer.getLDAPDirectoryUserSearchFilter(), searchControls, new AttributesMapper<Object>() { [javac] ^ [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -Xlint:deprecation for details. [javac] 1 error BUILD FAILED D:\Users\lmanna\Documents\Mendix\ProRail - RRCB REL 2.5\deployment\build_core.xml:29: Compile failed; see the compiler error output for details. Total time: 20 seconds Can anyone tell me what this means exactly? The CommunityCommons module and Encryption module have been installed already. Many thanks, Laxmi  
asked
2 answers
1

You need to remove the spring-ldap-1.3.1.RELEASE-all.jar! That is a very old library.

The error you are receiving has to do with Java generics, and I suspect the type parameters get stripped of during compilation.

So it seems like your app is trying to implement the interface from the 1.3.1 release:

 

public interface AttributesMapper {
    /**
     * Map Attributes to an object. The supplied attributes are the attributes
     * from a single SearchResult.
     * 
     * @param attributes
     *            attributes from a SearchResult.
     * @return an object built from the attributes.
     * @throws NamingException
     *             if any error occurs mapping the attributes
     */
    Object mapFromAttributes(Attributes attributes)
            throws NamingException;
}

 

Instead of the 2.3.1 release:

public interface AttributesMapper<T> {
    /**
     * Map Attributes to an object. The supplied attributes are the attributes
     * from a single SearchResult.
     * 
     * @param attributes
     *            attributes from a SearchResult.
     * @return an object built from the attributes.
     * @throws NamingException
     *             if any error occurs mapping the attributes
     */
    T mapFromAttributes(Attributes attributes)
            throws NamingException;
}

 

answered
0

Hi Ruan,

I can confirm that the spring-ldap-core-2.0.1.RELEASE.jar has been removed and I can see the spring-ldap-core-2.3.1.RELEASE.jar, see the screenshot below:

 

answered