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.
Version history
Revision #:
3 of 3
Last update:
‎May 16, 2026 11:55 AM
Updated by: