lDAP Java Compilation failed

0
 Hi, Facing the below after adding below Modules in Mendix 8.2.2. LDAP Synchronization Module Encryption Community Commons Function Library   Buildfile: C:\Users\vijaybir.singh1\Documents\Mendix\Ops Enhanced Reports-main\deployment\build_core.xml compile: [javac] Compiling 41 source files to C:\Users\vijaybir.singh1\Documents\Mendix\Ops Enhanced Reports-main\deployment\run\bin [javac] C:\Users\vijaybir.singh1\Documents\Mendix\Ops Enhanced Reports-main\javasource\ldap\ImportUserRecord.java:488: error: cannot find symbol [javac] List<IMendixObject> userList = Core.retrieveXPathQueryEscaped(this.context, "//" + this.userEntity + "[" + User.MemberNames.Name + "='%s']", username); [javac] ^ [javac] symbol: method retrieveXPathQueryEscaped(IContext,String,String) [javac] location: class Core [javac] C:\Users\vijaybir.singh1\Documents\Mendix\Ops Enhanced Reports-main\javasource\ldap\ImportUserRecord.java:570: error: cannot find symbol [javac] for (IMendixObject obj : Core.retrieveXPathQueryEscaped(this.context, "//%s[%s=%s][%s='%s']", [javac] ^ [javac] symbol: method retrieveXPathQueryEscaped(IContext,String,String,String,String,String,String) [javac] location: class Core [javac] C:\Users\vijaybir.singh1\Documents\Mendix\Ops Enhanced Reports-main\javasource\ldap\ImportUserRecord.java:600: error: cannot find symbol [javac] for (IMendixObject obj : Core.retrieveXPathQueryEscaped(this.context, "//%s[%s=%s][%s='%s']", [javac] ^ [javac] symbol: method retrieveXPathQueryEscaped(IContext,String,String,String,String,String,String) [javac] location: class Core [javac] C:\Users\vijaybir.singh1\Documents\Mendix\Ops Enhanced Reports-main\javasource\ldap\LdapModule.java:91: error: cannot find symbol [javac] Core.addListener(this.listener); [javac] ^ [javac] symbol: method addListener(LdapActionListener) [javac] location: class Core [javac] C:\Users\vijaybir.singh1\Documents\Mendix\Ops Enhanced Reports-main\javasource\ldap\LdapModule.java:571: error: method getUser in interface ISession cannot be applied to given types; [javac] if (username.equals(session.getUser().getName())) { [javac] ^ [javac] required: IContext [javac] found: no arguments [javac] reason: actual and formal argument lists differ in length BUILD FAILED C:\Users\vijaybir.singh1\Documents\Mendix\Ops Enhanced Reports-main\deployment\build_core.xml:29: Compile failed; see the compiler error output for details. [javac] 5 errors Total time: 4 seconds     Edit: I did some code review and found that “core.retrieveXPathQueryEscaped” Method doesnot exist in mendix 8+. Any hint for alternative on this ?
asked
3 answers
5

Have you checked the libraries that there are no different versions of a specific library? Try to clean that.

answered
2

For another customer I ended up replacing the deprecated and now removed core functions with newer implementations. It's only the Xpath stuff that breaks, not the LDAP handling itself. We also created a ticket for this, several weeks ago. You could also register a ticket with support, maybe that puts some pressure on getting this solved. 

answered
1

In addition to Gerrit’s Answer:

You can check if your project has potential library conflicts by inspecting the ‘userlib’ folder of your project. If you have multiple versions of your .jar files, it makes sense to dig deeper;

Deploy for Eclipse

 

In Eclipse

 

Set Import source by Directory… here

 

Eclipse will show you conflicts in the project explorer, code view and various other inspection tools. What you want to do is try to remove redundant versions without breaking other functionality. Can be try and error if you are not experienced. It might be a bit tricky to keep all functions while removing the conflicted libs. Maybe check related forum posts such as 

https://forum.mendix.com/link/questions/88626 

 

answered