SAML2.0 module update results in failed build

0
Hi Community Recently we successfully updated our Mendix 7.23.5 application step-by-step to Mendix 8. Locally, we could test and verify everything, most issues derived from styling issues but were tackled just as fast. We wanted to keep our modules up to date as well, one of them being the SAML2.0 module which we tested in the cloud environment. Turns out that when we use our “old” SAML2.0 module from 7.23.5 we aren’t able to activate our configured AD’s. Logically, we update the SAML2.0 module to the version we need, yet this results in a failing build (see build results below). Apart from going to Mendix Support, what could I do? I manually deleted every possible resource from the SAML2.0 locally on my device in order to leave nothing behind and start “clean”. But no matter how I import the updated SAML2.0 module (version 2.1.7, especially for Mendix 8.18.7, our current version), whether it is with overwriting, whether it is with manually deleting files … I keep getting the same error. When I inspect the Java-file that gives me trouble, there isn’t really anything wrong with the code … He simply can’t find the variables defined in the used libraries, but that’s not the place for custom development, I believe? :) Do prove me wrong or push me in a certain direction. Mendix Support is informed as well, but is keeping me on hold …   Build results: Buildfile: C:\Users\LRLS\Documents\Mendix\Growers Portal-main\deployment\build_core.xml compile:     [javac] Compiling 209 source files to C:\Users\LRLS\Documents\Mendix\Growers Portal-main\deployment\run\bin     [javac] C:\Users\LRLS\Documents\Mendix\Growers Portal-main\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:\Users\LRLS\Documents\Mendix\Growers Portal-main\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:\Users\LRLS\Documents\Mendix\Growers Portal-main\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] C:\Users\LRLS\Documents\Mendix\Growers Portal-main\javasource\saml20\implementation\DelegatedAuthenticationHandler.java:306: 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:\Users\LRLS\Documents\Mendix\Growers Portal-main\javasource\saml20\implementation\DelegatedAuthenticationHandler.java:484: 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:\Users\LRLS\Documents\Mendix\Growers Portal-main\javasource\saml20\implementation\DelegatedAuthenticationHandler.java:504: 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] Note: Some input files use or override a deprecated API.     [javac] Note: Recompile with -Xlint:deprecation for details.     [javac] 6 errors BUILD FAILED C:\Users\LRLS\Documents\Mendix\Growers Portal-main\deployment\build_core.xml:29: Compile failed; see the compiler error output for details. Total time: 7 seconds Edit: As requested, the contents of the userlib: Edit²: request to show everything in the userlib, more to it: the httpclient and its version There are indeed several httpclient-version .jar-files present. Edit: after removing the httpclient 4.3.4 and 4.3.6 versions, a new – similar – build failure is here: Buildfile: C:\Users\LRLS\Documents\Mendix\Growers Portal-main\deployment\build_core.xml compile:     [javac] Compiling 629 source files to C:\Users\LRLS\Documents\Mendix\Growers Portal-main\deployment\run\bin     [javac] C:\Users\LRLS\Documents\Mendix\Growers Portal-main\javasource\saml20\implementation\DelegatedAuthenticationHandler.java:306: 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:\Users\LRLS\Documents\Mendix\Growers Portal-main\javasource\saml20\implementation\DelegatedAuthenticationHandler.java:484: 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:\Users\LRLS\Documents\Mendix\Growers Portal-main\javasource\saml20\implementation\DelegatedAuthenticationHandler.java:504: 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] Note: Some input files use or override a deprecated API.     [javac] Note: Recompile with -Xlint:deprecation for details.     [javac] Note: Some input files use unchecked or unsafe operations.     [javac] Note: Recompile with -Xlint:unchecked for details.     [javac] 3 errors BUILD FAILED C:\Users\LRLS\Documents\Mendix\Growers Portal-main\deployment\build_core.xml:29: Compile failed; see the compiler error output for details. Total time: 11 seconds
asked
2 answers
2

Did you clean out your userlib folder when you upgraded to the newest version of SAML?

You may have different versions of the same jar file, and that is causing the conflict you are seeing.

Can you post the contents of userlib here?

 

answered
0

Hi Team,
I have faced the issue after upgrading the SAML20 in Mendix version 9.24 and deleting all duplicate jar files still facing the below issue, 
 

Note:- Shall we also need to delete the required or RequiredLib file that is available as a lower version or duplicate?

 

 

> Task :clean-custom-classes

> Task :compile
C:\Users\2267543\OneDrive - Cognizant\Documents\Mendix\SN UAE Approvals-branch_Enhancements\javasource\saml20\actions\RegisterCustomMicroflows.java:34: error: cannot find symbol
        SessionManager.getInstance(getContext()).setAfterSigninMicroflowName(this.afterSigninMicroflowName);
                                                ^
  symbol:   method setAfterSigninMicroflowName(String)
  location: class SessionManager
C:\Users\2267543\OneDrive - Cognizant\Documents\Mendix\SN UAE Approvals-branch_Enhancements\javasource\saml20\actions\RegisterCustomMicroflows.java:35: error: cannot find symbol
        SessionManager.getInstance(getContext()).setCustomUserProvisioningMicroflowName(this.customUserProvisioningMicroflowName);
                                                ^
  symbol:   method setCustomUserProvisioningMicroflowName(String)
  location: class SessionManager
C:\Users\2267543\OneDrive - Cognizant\Documents\Mendix\SN UAE Approvals-branch_Enhancements\javasource\saml20\actions\RegisterCustomMicroflows.java:36: error: cannot find symbol
        SessionManager.getInstance(getContext()).setEvaluateMultipleUserMatchesMicroflowName(this.evaluateMultipleUserMatchesMicroflowName);
                                                ^
  symbol:   method setEvaluateMultipleUserMatchesMicroflowName(String)
  location: class SessionManager
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 errors

> Task :compile FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compile'.
> Compilation failed; see the compiler error output for details.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 10s
2 actionable tasks: 2 executed

 

answered
0

Hi Team,
I have faced the issue after upgrading the SAML20 in Mendix version 9.24 and deleting all duplicate jar files still facing the below issue, 

> Task :clean-custom-classes

> Task :compile
C:\Users\2267543\OneDrive - Cognizant\Documents\Mendix\SN UAE Approvals-branch_Enhancements\javasource\saml20\actions\RegisterCustomMicroflows.java:34: error: cannot find symbol
        SessionManager.getInstance(getContext()).setAfterSigninMicroflowName(this.afterSigninMicroflowName);
                                                ^
  symbol:   method setAfterSigninMicroflowName(String)
  location: class SessionManager
C:\Users\2267543\OneDrive - Cognizant\Documents\Mendix\SN UAE Approvals-branch_Enhancements\javasource\saml20\actions\RegisterCustomMicroflows.java:35: error: cannot find symbol
        SessionManager.getInstance(getContext()).setCustomUserProvisioningMicroflowName(this.customUserProvisioningMicroflowName);
                                                ^
  symbol:   method setCustomUserProvisioningMicroflowName(String)
  location: class SessionManager
C:\Users\2267543\OneDrive - Cognizant\Documents\Mendix\SN UAE Approvals-branch_Enhancements\javasource\saml20\actions\RegisterCustomMicroflows.java:36: error: cannot find symbol
        SessionManager.getInstance(getContext()).setEvaluateMultipleUserMatchesMicroflowName(this.evaluateMultipleUserMatchesMicroflowName);
                                                ^
  symbol:   method setEvaluateMultipleUserMatchesMicroflowName(String)
  location: class SessionManager
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 errors

> Task :compile FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compile'.
> Compilation failed; see the compiler error output for details.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 10s
2 actionable tasks: 2 executed

 

answered