Share all details about your problem, including any error messages you may have received.
We recently upgraded our IIQ servers from 8.3 to 8.4. Once of our webservices connector uses the attached Operation rule before triggering the API call. This operation rule which used to work seamlessly before the upgrade is failing currenlty on the new version with the below error. I have attached screenshot for reference.
Error message: “The application script threw an exception: java.lang.Link ageError: ClassCastException: attempting to castjar:file:/opt/app/sailpoint/tomcat/tomcat9/webapp s/identityiq/WEB-INF/lib/jakarta.ws.rs-api-2.1.6.jar!/javax/ws/rs/client/ClientBuilder.class to j ar:file:/opt/app/sailpoint/tomcat/tomcat9/webapps/identityiq/WEB-INF/lib/jakarta.ws.rs-api-2.1.6. jar!/javax/ws/rs/client/ClientBuilder.class BSF info: MP_Rule_GRC_API_Before_Rule at line:”
Based on this error message, I believe the below line of code is what is causing an issue
→ Client cl = ClientBuilder.newClient();
Most probably (not sure) the ClassCastException error occurs because multiple versions of the jakarta.ws.rs-api JAR are being loaded in the application, leading to a classloading conflict between SailPoint’s built-in libraries and the ones bundled in your custom implementation.
To troubleshoot that:
Check and Remove Duplicate JARs (I know you mentioned that but validate the versions as well)
Verify the WEB-INF/lib directory.
Remove any extra or outdated versions of jakarta.ws.rs-api (keep only the required version for IIQ 8.4, typically 2.1.6).
Use SailPoint’s Built-in Libraries
Remove the custom jakarta.ws.rs-api JAR entirely, if SailPoint’s library can satisfy your requirements.
Set Correct ClassLoader (if needed)
I hope that will help or at least giving you some ideas to troubleshoot further
@siddharth93mp you will see this error so i have use below api rather clientBuilder and it resolve the issue.
CloseableHttpClient httpClient = HttpClients.createDefault();
Generally it is coming because recently sailpoint made some webservice related API change and combine in one jar or something.
Try to use below api, you wll not be able to see the error
CloseableHttpClient httpClient = HttpClients.createDefault();