Java compilation errors after importing SAML

2
  Hi All, Below java compilation error is throwing after downloading the private SAML module from App store. Anybody has any idea what is causing the issue. Also note If I import the same project in eclipse its not reporting errors which are mentioend below.  All jar files are present in userlib. I removed duplicate jar files as well but no luck.      compile:     [javac] Compiling 100 source files to C:\Mendix\TestApp-main_2\deployment\run\bin     [javac] C:\Mendix\TestApp-main_2\javasource\saml20\implementation\DelegatedAuthenticationHandler.java:308: error: cannot find symbol     [javac]             httpPost.setEntity(new ByteArrayEntity(authnState.getModifiedSOAPRequest().getBytes(), ContentType.APPLICATION_SOAP_XML));     [javac]                                                                                                               ^     [javac]   symbol:   variable APPLICATION_SOAP_XML     [javac]   location: class ContentType     [javac] C:\Mendix\TestApp-main_2\javasource\saml20\implementation\DelegatedAuthenticationHandler.java:486: error: cannot find symbol     [javac]             ByteArrayEntity postData = new ByteArrayEntity(authnState.getModifiedSOAPResponse().getBytes(), ContentType.APPLICATION_SOAP_XML);     [javac]                                                                                                                        ^     [javac]   symbol:   variable APPLICATION_SOAP_XML     [javac]   location: class ContentType     [javac] C:\Mendix\TestApp-main_2\javasource\saml20\implementation\DelegatedAuthenticationHandler.java:506: error: cannot find symbol     [javac]             ByteArrayEntity postData = new ByteArrayEntity(authnState.getModifiedSOAPResponse().getBytes(), ContentType.APPLICATION_SOAP_XML);     [javac]                                                                                                                        ^     [javac]   symbol:   variable APPLICATION_SOAP_XML     [javac]   location: class ContentType     [javac] C:\Mendix\TestApp-main_2\javasource\saml20\implementation\security\SAMLSessionInfo.java:111: error: cannot find symbol     [javac]                     new String[]{"TLSv1.2", "TLSv1.3"}, null, SSLConnectionSocketFactory.getDefaultHostnameVerifier());     [javac]                                                                                         ^     [javac]   symbol:   method getDefaultHostnameVerifier()     [javac]   location: class SSLConnectionSocketFactory     [javac] C:\Mendix\TestApp-main_2\javasource\saml20\implementation\security\SAMLSessionInfo.java:121: error: cannot find symbol     [javac]             RequestConfig requestConfig = RequestConfig.custom().setCookieSpec(CookieSpecs.STANDARD_STRICT)     [javac]                                                                                           ^     [javac]   symbol:   variable STANDARD_STRICT     [javac]   location: class CookieSpecs     [javac] C:\Mendix\TestApp-main_2\javasource\saml20\implementation\security\SAMLSessionInfo.java:132: error: cannot find symbol     [javac]                     .setConnectionTimeToLive(1, TimeUnit.MINUTES)     [javac]                     ^     [javac]   symbol:   method setConnectionTimeToLive(int,TimeUnit)     [javac]   location: class HttpClientBuilder     [javac] Note: Some input files use or override a deprecated API.     [javac] Note: Recompile with -Xlint:deprecation for details.     [javac] 6 errors   Mendix version – 8.18.5   Thanks in Advance.      
asked
2 answers
1

Is this a private module or a public one? If it’s the public one, the latest comes with the following advice that may help here.

After upgrading to the latest version, there could be a potential issue due to conflicting Java libraries of the old and the new version. Hence it is recommended that you delete all Java libraries used by the old SAML module from the userlib folder of the project before upgrading to the latest version. Especially the opensaml-2.6.6.jar library used in the old SAML module might cause issues as it conflicts with the opensaml libraries used in the new SAML module. You can recognize the Java libraries used by the SAML module by the accompanying .SAML20-module.Required files.

Good luck!

answered
1

In our case the offending jar file was httpcore-4.4.1

which required by UnitTesting and AWSS3Connector, so I was concerned about removing it since they may not be compatible with the newer version required by SAML (4.4.13) 

 

Once removed the build compiled, and so far no issues found with the dependencies.  

answered