JDBC provisioning Error in Global Provisioning Rule

Which IIQ version are you inquiring about?

8.4 version

Share all details about your problem, including any error messages you may have received.

I am trying to build JDBC provisioning Rule for Creating a user in table and Update the table for User Roles and deleting the user with stored procedure queries.

I am using the below rule for JDBC create, Update, Disable, Delete operations.
Rule:

import java.sql.CallableStatement;
  import java.sql.Connection;
  import java.sql.Date;
  import java.sql.DriverManager;
  import java.sql.SQLException;
  import sailpoint.object.TaskResult;
  import sailpoint.tools.Util;

  import java.sql.PreparedStatement;
  import java.sql.Statement;

  import java.sql.ResultSet;
  import java.sql.Types;
  import java.util.List;
  import sailpoint.api.SailPointContext;
  import sailpoint.connector.JDBCConnector;
  import sailpoint.object.Application;
  import sailpoint.object.ProvisioningPlan;
  import sailpoint.object.ProvisioningPlan.AccountRequest;
  import sailpoint.object.ProvisioningPlan.AttributeRequest;
  import sailpoint.object.ProvisioningPlan.PermissionRequest;
  import sailpoint.object.ProvisioningResult;
  import sailpoint.object.Schema;
  import sailpoint.tools.xml.XMLObjectFactory;
  import org.apache.commons.logging.LogFactory;
  import org.apache.commons.logging.Log;
  import sailpoint.tools.Util;

  //
  // Internal method for grabbing an Attribute Request Value.
  //

  public object getAttributeRequestValue(AccountRequest acctReq, String attribute) {
    if(acctReq!= null){
      AttributeRequest attrReq = acctReq.getAttributeRequest(attribute);
      if(attrReq!= null){    
        return attrReq.getValue();
      }
    }
    return null;  
  }

  //
  // JDBC Provisioning Rule Body
  //
  // We will handle these cases right now:
  //
  // Account Request Create
  // Account Request Modify
  // Account Request Delete
  // Account Request Lock/Unlock
  // Account Request Enable/Disable
  // 

  Date now = new Date();

  System.out.println("\n\n\n\n\n");
  System.out.println("*********************************************");
  System.out.println(" Entering Provisioning Rule  ");
  System.out.println("Current Time = "+ now.toString());
  System.out.println("*********************************************");

  //
  // The ProvisioningResult is the return object for this type of rule. we'll create it her and then populate it later.
  //

  ProvisioningResult result = new ProvisioningResult();

  //
  // Check if the plan is null or not, if not null, Process it..........
  //

  if(plan != null){

    System.out.println("*** \n The Provisioning Plan being passed in = \n***\n" + plan.toXml() +"\n****************************************");

    List<AccountRequest> accounts = plan.getAccountRequests();
    // 
    // Get all Account Requests out of the plan
    // 

    if ((accounts != null) && (accounts.size() > 0)) {
      //
      // If the plan contains one or more account requests, we'll iterate through them
      //
      for (AccountRequest account : accounts) {

        try {
          //
          // All of the account operations will reside in a try block in case we have any errors, we can mark the provisioningresult as "Failed" if we have an issue.
          //
          if (AccountRequest.Operation.Create.equals(account.getOperation())) {
            //
            // CREATE Operation
            // 
            System.out.println("Account Request Operation = Create");

            CallableStatement callableStmt = connection.prepareCall("{call IPGRBUSERMANAGEMENT.CREATERBUSER(?,?,?,?,?,?)}");
            callableStmt.setString(1, getAttributeRequestValue(account, "P_ORACLEUSERNAME"));
            callableStmt.setString(2, getAttributeRequestValue(account, "P_ORACLEPASSWORD")); // Assuming this is the password
            callableStmt.setString(3, getAttributeRequestValue(account, "P_PROFILE"));
            callableStmt.setString(4, getAttributeRequestValue(account, "p_default_tablespace"));
            callableStmt.setString(5, getAttributeRequestValue(account, "p_default_temp_tablespace"));
            callableStmt.setString(6, getAttributeRequestValue(account, "p_language_id"));
            callableStmt.executeUpdate();

            // Successful Create, so mark result as COMMITTED
            result.setStatus(ProvisioningResult.STATUS_COMMITTED);

          } else if (AccountRequest.Operation.Modify.equals(account.getOperation())) {

            //
            // MODIFY Operation
            // 
            System.out.println("Account Request Operation = Modify");

            List<String> removeRoles = new ArrayList<>();
            List<String> addRoles = new ArrayList<>();

            // Get current roles
            Statement currStmt = connection.createStatement();
            ResultSet rs = currStmt.executeQuery("SELECT * FROM IPGIRBUSERHASBUSINESSROLEVIEW WHERE id = " + getAttributeRequestValue(account, "userId"));
            List<String> currentRoles = new ArrayList<>();

            while (rs.next()) {
              currentRoles.add(rs.getString("BUSINESS_ROLE_NAME"));
            }

            // Get all Attribute Requests and filter for roles
            List<AttributeRequest> modAttrRequests = account.getAttributeRequests();

            if (modAttrRequests != null) {
              for (AttributeRequest req : modAttrRequests) {
                if (req.getName().equals("BUSINESS_ROLE_NAME")) {
                  if (ProvisioningPlan.Operation.Remove.equals(req.getOperation())) {
                    if (req.getValue() instanceof String) {
                      removeRoles = Util.csvToList((String) req.getValue(), true);
                    } else if (req.getValue() instanceof List) {
                      removeRoles = (List<String>) req.getValue();
                    }
                  } else if (ProvisioningPlan.Operation.Add.equals(req.getOperation())) {
                    if (req.getValue() instanceof String) {
                      addRoles = Util.csvToList((String) req.getValue(), true);
                    } else if (req.getValue() instanceof List) {
                      addRoles = (List<String>) req.getValue();
                    }
                  }
                }
              }
            }

            // Process role removals
            if (!removeRoles.isEmpty()) {
              for (String role : removeRoles) {
                CallableStatement removeRoleStmt = connection.prepareCall("{call IPGRBUSERMANAGEMENT.REMOVEBUSINESSROLETOUSER(?,?)}");
                removeRoleStmt.setString(1, getAttributeRequestValue(account, "userId"));
                removeRoleStmt.setString(2, role);
                removeRoleStmt.executeUpdate();
              }
            }

            // Process role additions
            if (!addRoles.isEmpty()) {
              for (String role : addRoles) {
                CallableStatement addRoleStmt = connection.prepareCall("{call IPGRBUSERMANAGEMENT.ADDBUSINESSROLETOUSER(?,?)}");
                addRoleStmt.setString(1, getAttributeRequestValue(account, "userId"));
                addRoleStmt.setString(2, role);
                addRoleStmt.executeUpdate();
              }
            }

            // Successful Modify, so mark result as COMMITTED
            result.setStatus(ProvisioningResult.STATUS_COMMITTED);

          } else if (AccountRequest.Operation.Delete.equals(account.getOperation())) {

            //
            // DELETE Operation
            // 
            System.out.println("Account Request Operation = Delete");
            CallableStatement callableStmt = connection.prepareCall("{call IPGRBUSERMANAGEMENT.removeRBUser(?,?,?)}");
            callableStmt.setString(1, getAttributeRequestValue(account, "userId"));
            callableStmt.setString(2, "status"); // Provide appropriate status
            callableStmt.setString(3, "error_message"); // Provide appropriate error message if needed
            callableStmt.executeUpdate();

            // Successful Delete, so mark result as COMMITTED
            result.setStatus(ProvisioningResult.STATUS_COMMITTED);

          } else if (AccountRequest.Operation.Disable.equals(account.getOperation())) {

            System.out.println("Account Request Operation = Disable");
            CallableStatement callableStmt = connection.prepareCall("{call IPGRBUSERMANAGEMENT.DISABLERBUSER(?)}");
            callableStmt.setString(1, getAttributeRequestValue(account, "userId"));
            callableStmt.executeUpdate();

            // Successful Disable, so mark result as COMMITTED
            result.setStatus(ProvisioningResult.STATUS_COMMITTED);

          }  else {
            // Unknown operation!
            System.out.println("Unknown operation [" + account.getOperation() + "]!");
          }

        } catch (SQLException e) {
          System.out.println("Error: " + e);
          result.setStatus(ProvisioningResult.STATUS_FAILED);
          result.addError(e);
        }
      } // account request loop
    } // if account requests exist
  } // if plan not null
  System.out.println("****************************************");
  System.out.println("****************************************");
  System.out.println("Exiting Provisioning Rule \n  Result=  \n" + result.toXml(false));
  System.out.println("****************************************");
  System.out.println("****************************************");
  System.out.println("\n\n\n\n\n");        
  return result;

I am facing the error: java.sql.SQLException: missing in or out parameter at index:: 7

Team any idea about the error and i appreciate if you have done before please share your inputs.

Thanks
Security consultant

Hi @SecurityConsultant123,

you are calling a stored procedure (IPGRBUSERMANAGEMENT). The error means this procedure have an output parameter that you are not declaring.
Or you are not declaring all the input paramaters.

Review the stored and check if the calls that you are using in correct.

PS An example of output param:

call.registerOutParameter(3, java.sql.Types.INTEGER);
String outputParam = call.getInt(3);

Thanks for your quick response. I will check from my end and i will let you know once changes are done.

1 Like

@SecurityConsultant123-
The error you’re encountering—java.sql.SQLException: missing in or out parameter at index:: 7—indicates that the JDBC driver expects a parameter at index 7, but it’s missing or not properly set. This typically occurs when the stored procedure you’re calling expects more parameters than you’re providing, or when there are mismatches between IN and OUT parameters.

Here’s how you can resolve this issue:

  1. Verify the Stored Procedure Signature:

    First, check the definition of your stored procedure IPGRBUSERMANAGEMENT.CREATERBUSER. You need to ensure you know exactly how many parameters it expects, and whether they are IN, OUT, or INOUT parameters.

    For example, the stored procedure might have the following signature:

    PROCEDURE CREATERBUSER(
      P_ORACLEUSERNAME           IN     VARCHAR2,
      P_ORACLEPASSWORD           IN     VARCHAR2,
      P_PROFILE                  IN     VARCHAR2,
      P_DEFAULT_TABLESPACE       IN     VARCHAR2,
      P_DEFAULT_TEMP_TABLESPACE  IN     VARCHAR2,
      P_LANGUAGE_ID              IN     VARCHAR2,
      P_RETURN_CODE              OUT    NUMBER
    );
    

    In this example, the stored procedure expects 7 parameters, with the last one being an OUT parameter.

  2. Adjust Your Java Code to Match the Stored Procedure:

    Given the stored procedure expects 7 parameters, you need to set or register all of them in your Java code. Here’s how you can modify your code:

    // Prepare the callable statement with 7 parameters
    CallableStatement callableStmt = connection.prepareCall("{call IPGRBUSERMANAGEMENT.CREATERBUSER(?,?,?,?,?,?,?)}");
    
    // Set the IN parameters
    callableStmt.setString(1, getAttributeRequestValue(account, "P_ORACLEUSERNAME"));
    callableStmt.setString(2, getAttributeRequestValue(account, "P_ORACLEPASSWORD")); // Assuming this is the password
    callableStmt.setString(3, getAttributeRequestValue(account, "P_PROFILE"));
    callableStmt.setString(4, getAttributeRequestValue(account, "p_default_tablespace"));
    callableStmt.setString(5, getAttributeRequestValue(account, "p_default_temp_tablespace"));
    callableStmt.setString(6, getAttributeRequestValue(account, "p_language_id"));
    
    // Register the OUT parameter (assuming it's a NUMBER)
    callableStmt.registerOutParameter(7, java.sql.Types.NUMERIC);
    
    // Execute the stored procedure
    callableStmt.executeUpdate();
    
    // Optionally, retrieve the OUT parameter value
    int returnCode = callableStmt.getInt(7);
    

    Important Notes:

    • Use registerOutParameter for OUT parameters before executing the callable statement.
    • Ensure that the index numbers in setString and registerOutParameter match the parameter positions in the stored procedure.
    • Adjust the SQL types in registerOutParameter to match the data types of the OUT parameters in your stored procedure.
  3. Check for Other Stored Procedures:

    Similarly, check all other stored procedures you’re calling in your code:

    • IPGRBUSERMANAGEMENT.removeRBUser: If it expects 3 parameters and any of them are OUT parameters, ensure you register them appropriately.
    • IPGRBUSERMANAGEMENT.DISABLERBUSER: Verify the number and types of parameters it expects.
  4. Ensure Correct Parameter Types:

    Make sure the data types you’re using in setString, setInt, etc., match the data types expected by the stored procedure. Mismatched types can also cause parameter index errors.

  5. Handle Exceptions Appropriately:

    While you’re already catching SQLException, consider adding more detailed logging or exception handling to pinpoint the exact location of the error if it persists.

  6. Test After Adjustments:

    After making these changes, test your code thoroughly to ensure that:

    • The stored procedures are called successfully.
    • The parameters are passed correctly.
    • The OUT parameters are retrieved as expected.
    • Any returned values or result sets are handled properly.

Example Revised Code for the Create Operation:

if (AccountRequest.Operation.Create.equals(account.getOperation())) {
    //
    // CREATE Operation
    // 
    System.out.println("Account Request Operation = Create");

    // Prepare the callable statement with 7 parameters
    CallableStatement callableStmt = connection.prepareCall("{call IPGRBUSERMANAGEMENT.CREATERBUSER(?,?,?,?,?,?,?)}");
    
    // Set the IN parameters
    callableStmt.setString(1, getAttributeRequestValue(account, "P_ORACLEUSERNAME"));
    callableStmt.setString(2, getAttributeRequestValue(account, "P_ORACLEPASSWORD"));
    callableStmt.setString(3, getAttributeRequestValue(account, "P_PROFILE"));
    callableStmt.setString(4, getAttributeRequestValue(account, "p_default_tablespace"));
    callableStmt.setString(5, getAttributeRequestValue(account, "p_default_temp_tablespace"));
    callableStmt.setString(6, getAttributeRequestValue(account, "p_language_id"));
    
    // Register the OUT parameter
    callableStmt.registerOutParameter(7, java.sql.Types.NUMERIC);
    
    // Execute the stored procedure
    callableStmt.executeUpdate();
    
    // Retrieve the OUT parameter value if needed
    int returnCode = callableStmt.getInt(7);
    System.out.println("Stored Procedure Return Code: " + returnCode);

    // Successful Create, so mark result as COMMITTED
    result.setStatus(ProvisioningResult.STATUS_COMMITTED);
}

Final Recommendations:

  • Always ensure that the number of parameters in your callable statements matches the number of parameters expected by the stored procedure.
  • For OUT parameters, always use registerOutParameter with the correct SQL type.
  • If you’re unsure about the stored procedure’s signature, consult your database documentation or DBA.
  • Consider adding detailed logging before and after each database call to aid in troubleshooting.

By aligning your Java code with the stored procedure’s expected parameters, you should resolve the SQLException and successfully execute your provisioning operations.

Thank you!

Thank you @officialamitguptaa for your quick response I will change the source code and i will try to perform the create operation. I will update you once it is resolved.

Hello Amit Gupta,
I have changed the source code as per your suggestions. moreover i am trying to resolve the error and i am getting another error please have a look into below rule and let me know if any changes required from my end.
Rule:

import java.sql.CallableStatement;
  import java.sql.Connection;
  import java.sql.Date;
  import java.sql.DriverManager;
  import java.sql.SQLException;
  import sailpoint.object.TaskResult;
  import sailpoint.tools.Util;

  import java.sql.PreparedStatement;
  import java.sql.Statement;

  import java.sql.ResultSet;
  import java.sql.Types;
  import java.util.List;
  import sailpoint.api.SailPointContext;
  import sailpoint.connector.JDBCConnector;
  import sailpoint.object.Application;
  import sailpoint.object.ProvisioningPlan;
  import sailpoint.object.ProvisioningPlan.AccountRequest;
  import sailpoint.object.ProvisioningPlan.AttributeRequest;
  import sailpoint.object.ProvisioningPlan.PermissionRequest;
  import sailpoint.object.ProvisioningResult;
  import sailpoint.object.Schema;
  import sailpoint.tools.xml.XMLObjectFactory;
  import org.apache.commons.logging.LogFactory;
  import org.apache.commons.logging.Log;
  import sailpoint.tools.Util;

  //
  // Internal method for grabbing an Attribute Request Value.
  //

  public object getAttributeRequestValue(AccountRequest acctReq, String attribute) {
    if(acctReq!= null){
      AttributeRequest attrReq = acctReq.getAttributeRequest(attribute);
      if(attrReq!= null){    
        return attrReq.getValue();
      }
    }
    return null;  
  }

  //
  // JDBC Provisioning Rule Body
  //
  // We will handle these cases right now:
  //
  // Account Request Create
  // Account Request Modify
  // Account Request Delete
  // Account Request Lock/Unlock
  // Account Request Enable/Disable
  // 

  Date now = new Date();

 
  //
  // The ProvisioningResult is the return object for this type of rule. we'll create it her and then populate it later.
  //

  ProvisioningResult result = new ProvisioningResult();

  //
  // Check if the plan is null or not, if not null, Process it..........
  //

  if(plan != null){

    List&lt;AccountRequest> accounts = plan.getAccountRequests();
    // 
    // Get all Account Requests out of the plan
    // 

    if ((accounts != null) &amp;&amp; (accounts.size() > 0)) {
      //
      // If the plan contains one or more account requests, we'll iterate through them
      //
      for (AccountRequest account : accounts) {

        try {
          //
          // All of the account operations will reside in a try block in case we have any errors, we can mark the provisioningresult as "Failed" if we have an issue.
          //
          if (AccountRequest.Operation.Create.equals(account.getOperation())) {
            //
            // CREATE Operation
            // 
            System.out.println("Account Request Operation = Create");

            CallableStatement callableStmt = connection.prepareCall("{call IPGRBUSERMANAGEMENT.CREATERBUSER(?,?,?,?,?,?,?)}");
            callableStmt.setString(1, getAttributeRequestValue(account, "P_ORACLEUSERNAME"));
            callableStmt.setString(2, getAttributeRequestValue(account, "P_ORACLEPASSWORD")); // Assuming this is the password
            callableStmt.setString(3, getAttributeRequestValue(account, "P_PROFILE"));
            callableStmt.setString(4, getAttributeRequestValue(account, "p_default_tablespace"));
            callableStmt.setString(5, getAttributeRequestValue(account, "p_default_temp_tablespace"));
            callableStmt.setString(6, getAttributeRequestValue(account, "p_language_id"));

            //Register the OUT parameter (assuming it's a Number)
            callableStmt.registerOutParameter(7, java.sql.Types.NUMERIC);


            //Execute the stored procedure
            callableStmt.executeUpdate();

            //Retrieve the output parameter value 
            int returnCode = callableStmt.getInt(7);
            System.out.println("Stored Procedure Return Code:  "+ returnCode);

            // Successful Create, so mark result as COMMITTED
            result.setStatus(ProvisioningResult.STATUS_COMMITTED);

          } else if (AccountRequest.Operation.Modify.equals(account.getOperation())) {

            //
            // MODIFY Operation
            // 
            System.out.println("Account Request Operation = Modify");

            List&lt;String> removeRoles = new ArrayList&lt;>();
            List&lt;String> addRoles = new ArrayList&lt;>();

            // Get current roles
            Statement currStmt = connection.createStatement();
            ResultSet rs = currStmt.executeQuery("SELECT * FROM IPGIRBUSERHASBUSINESSROLEVIEW WHERE id = " + getAttributeRequestValue(account, "userId"));
            List&lt;String> currentRoles = new ArrayList&lt;>();

            while (rs.next()) {
              currentRoles.add(rs.getString("BUSINESS_ROLE_NAME"));
            }

            // Get all Attribute Requests and filter for roles
            List&lt;AttributeRequest> modAttrRequests = account.getAttributeRequests();

            if (modAttrRequests != null) {
              for (AttributeRequest req : modAttrRequests) {
                if (req.getName().equals("BUSINESS_ROLE_NAME")) {
                  if (ProvisioningPlan.Operation.Remove.equals(req.getOperation())) {
                    if (req.getValue() instanceof String) {
                      removeRoles = Util.csvToList((String) req.getValue(), true);
                    } else if (req.getValue() instanceof List) {
                      removeRoles = (List&lt;String>) req.getValue();
                    }
                  } else if (ProvisioningPlan.Operation.Add.equals(req.getOperation())) {
                    if (req.getValue() instanceof String) {
                      addRoles = Util.csvToList((String) req.getValue(), true);
                    } else if (req.getValue() instanceof List) {
                      addRoles = (List&lt;String>) req.getValue();
                    }
                  }
                }
              }
            }

            // Process role removals
            if (!removeRoles.isEmpty()) {
              for (String role : removeRoles) {
                CallableStatement removeRoleStmt = connection.prepareCall("{call IPGRBUSERMANAGEMENT.REMOVEBUSINESSROLETOUSER(?,?)}");
                removeRoleStmt.setString(1, getAttributeRequestValue(account, "userId"));
                removeRoleStmt.setString(2, role);
                removeRoleStmt.executeUpdate();
              }
            }

            // Process role additions
            if (!addRoles.isEmpty()) {
              for (String role : addRoles) {
                CallableStatement addRoleStmt = connection.prepareCall("{call IPGRBUSERMANAGEMENT.ADDBUSINESSROLETOUSER(?,?)}");
                addRoleStmt.setString(1, getAttributeRequestValue(account, "userId"));
                addRoleStmt.setString(2, role);
                addRoleStmt.executeUpdate();
              }
            }

            // Successful Modify, so mark result as COMMITTED
            result.setStatus(ProvisioningResult.STATUS_COMMITTED);

          } else if (AccountRequest.Operation.Delete.equals(account.getOperation())) {

            //
            // DELETE Operation
            // 
            System.out.println("Account Request Operation = Delete");
            CallableStatement callableStmt = connection.prepareCall("{call IPGRBUSERMANAGEMENT.removeRBUser(?,?,?)}");
            callableStmt.setString(1, getAttributeRequestValue(account, "userId"));
            callableStmt.setString(2, "status"); // Provide appropriate status
            callableStmt.setString(3, "error_message"); // Provide appropriate error message if needed
            callableStmt.executeUpdate();

            //Register the output parameter
            callableStmt.registerOutParameter(4, Types.INTEGER);
            callableStmt.executeUpdate();

            //Retrieve the output parameter value 
            int outputParam = callableStmt.getInt(4);
            System.out.println("output parameter from Delete: "+ outputParam);


            // Successful Delete, so mark result as COMMITTED
            result.setStatus(ProvisioningResult.STATUS_COMMITTED);

          } else if (AccountRequest.Operation.Disable.equals(account.getOperation())) {

            System.out.println("Account Request Operation = Disable");
            CallableStatement callableStmt = connection.prepareCall("{call IPGRBUSERMANAGEMENT.DISABLERBUSER(?)}");
            callableStmt.setString(1, getAttributeRequestValue(account, "userId"));
            callableStmt.executeUpdate();

            // Successful Disable, so mark result as COMMITTED
            result.setStatus(ProvisioningResult.STATUS_COMMITTED);

          }  else {
            // Unknown operation!
            System.out.println("Unknown operation [" + account.getOperation() + "]!");
          }

        } catch (SQLException e) {
          System.out.println("Error: " + e);
          result.setStatus(ProvisioningResult.STATUS_FAILED);
          result.addError(e);
        }
      } // account request loop
    } // if account requests exist
  } // if plan not null
  
  return result;

Still i am facing other error:

error on Access request: inline evalution of. import.java.sql.callablestatement, import.java.sql.connection; import java… class object not fount in namespace at line: 33 in file inline evaluation of: import java.sql.callablestatement.import java.sql.connection; import java.s object BSF info: Rule Name…

Table for Create:
IPGRBUSERMANAGEMENT.CREATERBUSER(P_ORACLEUSERNAME, P_ORACLEPASSWORD, P_PROFILE, P_DEFAULT_TABLESPACE, P_DEFAULT_TEMP_TABLESPACE, P_LANGUAGE_ID) All are IN parameter

ADD role IPGRBUSERMANAGEMENT.ADDBUSINESSROLETOUSER(P_ORACLEUSERNAME, P_BUSINESSROLENAME); both columns are in parameter.

Remove Role
IPGRBUSERMANAGEMENT.REMOVEBUSINESSROLETOUSER(P_ORACLEUSERNAME, P_BUSINESSROLENAME); both columns are IN parameter.

Disable User
IPGRBUSERMANAGEMENT.DISABLERBUSER(P_ORACLEUSERNAME); This is also IN parameter (Direction)

Delete User - Post disable user or access remove
IPGRBUSERMANAGEMENT.REMOVERBUSER(P_ORACLEUSERNAME, P_STATUS, P_ERRORMSG); Direction: in, out,out

Can you please suggests your input on the above tables

Thank you

There is a typo the class representing an object is spelled with a capital “O”—Object, not object

Your current method signature:

public object getAttributeRequestValue(AccountRequest acctReq, String attribute) {
    // method body
}

Correction:

Change object to Object in the method signature.

public Object getAttributeRequestValue(AccountRequest acctReq, String attribute) {
    // method body
}

2. Handling Stored Procedures with IN and OUT Parameters

Based on the information you provided, here are the stored procedure signatures:

  • Create User:

    IPGRBUSERMANAGEMENT.CREATERBUSER(
      P_ORACLEUSERNAME IN,
      P_ORACLEPASSWORD IN,
      P_PROFILE IN,
      P_DEFAULT_TABLESPACE IN,
      P_DEFAULT_TEMP_TABLESPACE IN,
      P_LANGUAGE_ID IN
    )
    
    • All parameters are IN parameters.
  • Add Role:

    IPGRBUSERMANAGEMENT.ADDBUSINESSROLETOUSER(
      P_ORACLEUSERNAME IN,
      P_BUSINESSROLENAME IN
    )
    
    • Both parameters are IN parameters.
  • Remove Role:

    IPGRBUSERMANAGEMENT.REMOVEBUSINESSROLETOUSER(
      P_ORACLEUSERNAME IN,
      P_BUSINESSROLENAME IN
    )
    
    • Both parameters are IN parameters.
  • Disable User:

    IPGRBUSERMANAGEMENT.DISABLERBUSER(
      P_ORACLEUSERNAME IN
    )
    
    • Parameter is IN.
  • Delete User:

    IPGRBUSERMANAGEMENT.REMOVERBUSER(
      P_ORACLEUSERNAME IN,
      P_STATUS OUT,
      P_ERRORMSG OUT
    )
    
    • First parameter is IN, the next two are OUT parameters.

Adjustments Needed:

a. Create Operation

Your current code is attempting to register an OUT parameter for the CREATERBUSER stored procedure, but according to your information, all parameters are IN parameters.

Correction:

  • Remove the registerOutParameter call.
  • Set all six IN parameters.
  • Remove any retrieval of OUT parameters.

b. Modify Operation (Add/Remove Roles)

Since the stored procedures ADDBUSINESSROLETOUSER and REMOVEBUSINESSROLETOUSER both accept only IN parameters, you don’t need to register any OUT parameters.

Ensure that you’re passing the correct values to the stored procedures.

c. Delete Operation

The REMOVERBUSER stored procedure has one IN parameter and two OUT parameters.

Correction:

  • Set the IN parameter.
  • Register the OUT parameters before executing the callable statement.
  • Retrieve the OUT parameter values after execution.

d. Disable Operation

No changes are necessary if you’re already passing the correct IN parameter.