Client Builder Issue in Webservices Connector API Call

Which IIQ version are you inquiring about?

[IIQ 8.4]

Please share any images or screenshots, if relevant.

Please share any other relevant files that may be required (for example, logs).

WebServices_Before Operation.xml (3.3 KB)

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();

Any insights on this would be really helpful.

Thanks
Siddharth

Hi @siddharth93mp ,
Can you please check your lib folder, might be you have duplicate jars that conflict and causing this issue.

Hello,
Thanks for your response.
Nope. We do not have duplicate jars inside WEB-INF/lib

Hi @siddharth93mp

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 :slight_smile: