cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IdentityIQ 8.0p1: Custom connector returns "java.lang.ClassCastException"

IdentityIQ 8.0p1: Custom connector returns "java.lang.ClassCastException"

 

Symptoms

A custom connector using the API sailpoint.connector.SAPInternalConnector throws the following exception:

java.lang.ClassCastException: Cannot cast sailpoint.connector.SAPInternalConnector to sailpoint.connector.SAPInternalConnector

 

Diagnosis

When a rule uses the createConnector() call from the custom connector itself, or from another connector outside of the application, the exception is thrown.

The connector may have previously worked as expected in IdentityIQ 7.3.x.

An example that would work fine in 7.3.x, but fail in 8.0p1 is included below:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Rule PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<Rule language="beanshell" name="SAP connect test">
<Description>
Just simply trying to connect to SAP without an error.
</Description>
<Source><![CDATA[
import sailpoint.object.*;
import sailpoint.api.*;
import sailpoint.transformer.*;
import sailpoint.tools.*;
import sailpoint.tools.Message.Type.*;
import sailpoint.connector.*;
import com.sap.conn.jco.*;
import java.text.*;
String appName = "SAP Direct (RE1)"; // Name of the application in IdentityIQ
try{
Application app = context.getObjectByName(Application.class, appName);
SAPInternalConnector connector = (SAPInternalConnector)
sailpoint.connector.ConnectorFactory.createConnector("sailpoint.connector.SAPInternalConnector", app, null);
JCoDestination destination = connector.connect();
return "OK";
}
catch(Exception e){
System.out.println("Exit Set SAP Role Expiration Rule: " + e);
return e.toString();
}
System.out.println("Exit Set SAP Role Expiration Rule: " + errorString);
]]></Source>
</Rule>

 

Solution

To prevent this error, complete the following steps:

  1. Navigate to the IdentityIQ debug page at <base_url>/identityiq/debug
  2. Use the object browser to open the SAP Direct Application.
  3. Edit the XML to include the following line:
    ​<entry key="useConnectorClassloader" value="false>
  4. Save the change.
  5. Verify the solution worked by resuming the action that prompted the error.
Comments

I tried this fix in 7.3p5 but it did not work.  Oh well back to yea ole drawing board.

Hello @michael_slavin , 

We have similar case, referece post: https://community.sailpoint.com/t5/IdentityIQ-Forum/IIQ8-1p1-Workday-Axis2-Error/m-p/175975#M141241

 

And it's saild that "useConnectorClassloader" is not recommended, and as I recalled even at first the SailPoint support mentioned this workaround, but then the Engineering Team suggests not to use the useConnectorClassloader configuration. 

 

May I know what's your opinion and idea on this? 

 

Thanks and Regards,

- Mike 

Version history
Revision #:
2 of 2
Last update:
‎Jul 19, 2023 05:55 PM
Updated by: