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
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>
To prevent this error, complete the following steps:
<entry key="useConnectorClassloader" value="false>
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