IdRepoPluginsCache.getAMRepoPlugin: Unable to instantiate plugin for Org: Error in OpenAm

102 Views Asked by At

I am trying to develop my own IDREPO:

My User Table is as follows:

(id,firstName,lastName,password,loginStatus.....)

My IDREpo implemented class has the following details:

private static final Set<IdType> SUPPORTED_TYPES;
static {
    logger.debug("\nMethod - Static Supported Types");
    SUPPORTED_TYPES = new HashSet<>();
    SUPPORTED_TYPES.add(IdType.USER);
    SUPPORTED_TYPES.add(IdType.GROUP);
}

private static final Set<IdOperation> SUPPORTED_OPS;
static {
    logger.debug("\nMethod - Static Supported OPS");
    SUPPORTED_OPS = new HashSet<>();
    // DELETE and SERVICE are the other options
    SUPPORTED_OPS.add(IdOperation.READ);
    SUPPORTED_OPS.add(IdOperation.CREATE);
    SUPPORTED_OPS.add(IdOperation.EDIT);
    //SUPPORTED_OPS.add(IdOperation.SERVICE);
}

static {
    logger.debug("\nMethod - Static PropertyNameRemapper. Loaded Properties: "
            + dbColumnProperties);
    PROP_REMAPPER.setOpenSSOtoJDBC("lastName",
            dbColumnProperties.getProperty("user.lastName"));
    PROP_REMAPPER.setOpenSSOtoJDBC("id",
            dbColumnProperties.getProperty("user.id"));
    PROP_REMAPPER.setOpenSSOtoJDBC("password",
            dbColumnProperties.getProperty("user.password"));
    PROP_REMAPPER.setOpenSSOtoJDBC("firstName",
            dbColumnProperties.getProperty("user.firstname"));
}

But when I debug my code I get the exception as :

getting exception:

java.lang.ClassCastException: JDBCIdRepo cannot be cast to com.sun.identity.idm.plugins.database.DaoInterface
    at com.sun.identity.idm.plugins.database.DatabaseRepo.initialize(DatabaseRepo.java:275)
    at com.sun.identity.idm.server.IdRepoPluginsCache.constructIdRepoPlugin(IdRepoPluginsCache.java:475)
    at com.sun.identity.idm.server.IdRepoPluginsCache.addIdRepo(IdRepoPluginsCache.java:353)
    at com.sun.identity.idm.server.IdRepoPluginsCache.removeIdRepo(IdRepoPluginsCache.java:251)
    at com.sun.identity.idm.server.IdRepoPluginsCache.organizationConfigChanged(IdRepoPluginsCache.java:646)
    at com.sun.identity.sm.ServiceConfigManagerImpl.notifyOrgConfigChange(ServiceConfigManagerImpl.java:488)
    at com.sun.identity.sm.ServiceConfigManagerImpl.objectChanged(ServiceConfigManagerImpl.java:448)
    at com.sun.identity.sm.SMSNotificationManager.sendNotifications(SMSNotificationManager.java:289)
    at com.sun.identity.sm.SMSNotificationManager$LocalChangeNotifcationTask.run(SMSNotificationManager.java:365)
    at com.iplanet.am.util.ThreadPool$WorkerThread.run(ThreadPool.java:306)
0

There are 0 best solutions below