OIM 11g (OIMClient) API login without password

Hi,
Is it possible to login using OIMClient API with username only?
I would like to use a trusted web service to invoke the OIMClient API (using private key and username), this seems possible in the previous version of OIM, has anyone tried with 11g and how do you do it.
Alternatively is it possible to decrypt 11g password from a web service?
Thanks

Hi,
If you are looking for login to OIM using UserName/PrivateKey, refer the link below:
While login to OIM 11g using private key getting error
Regards,
Raghav.

Similar Messages

  • OIM 11g R2 - API to validate user's password

    Hi,
    Is there any API available to validate if an user's password in OIM is valid.I have an user login and password and need to verify if the user's password in OIM is same the input password.I am not looking for the API to validate my password against password policy,for which I have the API.
    Thanks.

    One of the ways to do it would be to decrypt the current password and then compare with the new password. Where are you doing this check? Depending upon where you want to do this, you can use different ways to decrypt the current password of the user.
    There are various posts in the forum about decryting the password.
    On a side note, if your policy does not allow same password, then new password validation against the policy should suffice your requirement.
    -Bikash

  • OIM 11g R2 - API to add organization to an Application Instance

    Hi,
    In OIM 11g R2,we have a requirement to create application instance using API (from a csv file) and assign some default organizations to these application instance.We could able to create Application Instance but couldnt find any API to add organizations.Is it possible to do thia?.Thanks

    One of the ways to do it would be to decrypt the current password and then compare with the new password. Where are you doing this check? Depending upon where you want to do this, you can use different ways to decrypt the current password of the user.
    There are various posts in the forum about decryting the password.
    On a side note, if your policy does not allow same password, then new password validation against the policy should suffice your requirement.
    -Bikash

  • Creation of a Request in OIM 11G using API's

    Hi Friends,
    I am trying to create a request using OIM 11g API's.
    I am trying to do this for EBS Responsibility resource and this resource has a request dataset has EBS-IT-Resource-Instance, application name, responsibility name, start date and security group. Please note application name, responsibility name, start date and security group are in child form.
    I am trying to populate the request dataset using the below code.
    List<RequestBeneficiaryEntityAttribute> entityAttrList;
    RequestBeneficiaryEntity entity = null;
    entityAttrList = new ArrayList<RequestBeneficiaryEntityAttribute>();
    entity = new RequestBeneficiaryEntity();
    tcITResourceInstanceOperationsIntf tcITResourceIntf = Platform.getService(tcITResourceInstanceOperationsIntf.class);
    HashMap searchcriteria = new HashMap<String, String>();
    searchcriteria.put("IT Resources.Name", "EBSHF-APPS12");
    tcResultSet resultSet = tcITResourceIntf.findITResourceInstances(searchcriteria);
    long itResourceKey=resultSet.getLongValue("IT Resources.Key");
    entityAttrList.add(this.getAttrLong("eBusiness Suite Instance Name",itResourceKey));
    entityAttrList.add(this.getAttr("Application Name","3~300"));
    entityAttrList.add(this.getAttr("Responsibility Name", "3~300~52281"));
    entityAttrList.add(this.getAttr("Security Group", "3~0"));
    entity.setEntityKey(getResourceKey("Oracle eBusiness Responsibility"));
    entity.setEntityType(RequestConstants.RESOURCE);
    entity.setEntitySubType("Oracle eBusiness Responsibility");
    entity.setEntityData(entityAttrList);
    private RequestBeneficiaryEntityAttribute getAttr(String name, String value)
    RequestBeneficiaryEntityAttribute attr = null;
    attr = new RequestBeneficiaryEntityAttribute(name, value, RequestBeneficiaryEntityAttribute.TYPE.String);
    return attr;
    private RequestBeneficiaryEntityAttribute getAttrLong(String name, long value)
    RequestBeneficiaryEntityAttribute attr = null;
    attr = new RequestBeneficiaryEntityAttribute(name, value, RequestBeneficiaryEntityAttribute.TYPE.Long);
    return attr;
    My code is working fine and a request is getting created. But when I try to open the request dataset(object form) for the newly created request, I am getting null exceptions.
    If I did not populate the fields that are in the child form application name, responsibility name and security group which are highlighted above, then I am able to view the form with the correct IT-Resource-Instance name after request creation.
    So, I am thinking I am doing something wrong while populating child form data in the request dataset.
    Can you please provide me some code snippet to populate the child using 11G API'S?

    Hi Bikash,
    After referring your code, i made changes in mine. Here is my updated code.
    RequestBeneficiaryEntityAttribute parantAttr=null;
    List<RequestBeneficiaryEntityAttribute> entityAttrList;
    RequestBeneficiaryEntity entity = null;
    entity = new RequestBeneficiaryEntity();
    parantAttr=this.getAttrLong("eBusiness Suite Instance Name", itResourceKey);
    RequestBeneficiaryEntityAttribute mid1 = new RequestBeneficiaryEntityAttribute();
    List <RequestBeneficiaryEntityAttribute> childAttributesList = new ArrayList<RequestBeneficiaryEntityAttribute>();
    childAttributesList.add(this.getAttr("Application Name", "3~555"));
    childAttributesList.add(this.getAttr("Responsibility Name", "3~555~22862"));
    childAttributesList.add(this.getAttr("Security Group", "3~0"));
    mid1.setChildAttributes(childAttributesList);
    mid1.setAction(RequestBeneficiaryEntityAttribute.ACTION.Add);
    entityAttrList = new ArrayList<RequestBeneficiaryEntityAttribute>();
    entityAttrList.add(parantAttr);
    entityAttrList.add(mid1);
    But when I try to run this, it is getting failed saying "RequestServiceException: IAM-2050033:Invalid attribute name null. No corresponding reference was found in the data set ProvisionResourceOracle eBusiness Responsibility".
    Here is my request data set for your reference.
    <AttributeReference name="eBusiness Suite Instance Name" attr-ref="eBusiness Suite Instance Name" type="Long" length="50" widget="itresource-lookup" required="true" available-in-bulk="true" itresource-type="eBusiness Suite UM"/>
    <AttributeReference available-in-bulk="true" length="10" widget="text" type="String" attr-ref="UD_EBH_RSCP" name="EBS HR Foundation User Responsibilities">
    <AttributeReference name="Application Name" attr-ref="Application Name" type="String" length="256" widget="lookup-query" available-in-bulk="true" required="true">
    <lookupQuery lookup-query="select lkv_encoded as Value,lkv_decoded as Description from lkv lkv, lku lku where lkv.lku_key=lku.lku_key and lku_type_string_key='Lookup.EBS.Application' and lkv_encoded like concat('$Form data.eBusiness Suite Instance Name', '~%')" display-field="Description" save-field="Value"/>
    </AttributeReference>
    <AttributeReference name="Responsibility Name" attr-ref="Responsibility Name" type="String" length="256" widget="lookup-query" available-in-bulk="true" required="true" primary="true">
    <lookupQuery lookup-query="select lkv_encoded as Value,lkv_decoded as Description from lkv lkv,lku lku where lkv.lku_key=lku.lku_key and lku_type_string_key='Lookup.EBS.Responsibility' and lkv_encoded like concat('$Form data.Application Name','~%')" display-field="Description" save-field="Value"/>
    </AttributeReference>
    <AttributeReference name="Security Group" attr-ref="Security Group" type="String" length="256" widget="lookup-query" available-in-bulk="true" required="true">
    <lookupQuery lookup-query="select lkv_encoded as Value,lkv_decoded as Description from lkv lkv, lku lku where lkv.lku_key=lku.lku_key and lku_type_string_key='Lookup.EBS.SecurityGroup' and lkv_encoded like concat('$Form data.eBusiness Suite Instance Name', '~%')" display-field="Description" save-field="Value"/>
    </AttributeReference>
    I am not sure why it is not referencing to the attribute. In your blog, it is saying your code is to set process form. But i am trying to create a request using API's. so, I need some code snippet to populate request dataset. Do you think, this will serve both?
    Thanks for your help.

  • How to obtain Role name in OIM 11g using API's

    Hello,
    I have a scenario in which I create Role/Group in OIM 11g & it gets provisioned in AD [=works fine] & other part is when i delete role in OIM 11g then it should
    get deleted from AD.I have written postprocess event handler to achieve this.
    In role creation part i get all parameters using "orchestration.getParameters();" , but when i delete role then "orchestration.getParameters();" is empty,so i am
    not able to get role name.
    Is there a way to get role name while deleting roles using API ?
    Thanks,
    Rahul Shah

    Hi Raghav,
    Following is my code :
    tcRODetails = orgOpInterface.getObjects(organizationKey);
    for(int i = 0;i < tcRODetails.getRowCount();i++){
    tcRODetails.goToRow(i);
    // resourceName=AD Group
    if(resourceName.equalsIgnoreCase(tcRODetails.getStringValue("Objects.Name"))&&
    tcRODetails.getStringValue("Objects.Object Status.Status").equalsIgnoreCase("Provisioned")||
    tcRODetails.getStringValue("Objects.Object Status.Status").equalsIgnoreCase("Enabled")) {
    System.out.println("<<<FOUND>>>");
    processKey = tcRODetails.getLongValue("Process Instance.Key");
    provisionObjectKey = tcRODetails.getLongValue("Objects.Key");
    tcProcessSet = oimFormUtility.getProcessFormData(processKey);
    for(int j=0;j<tcProcessSet.getRowCount();j++){
    tcProcessSet.goToRow(j);
    if(grpName.equalsIgnoreCase(tcProcessSet.getStringValue("UD_ADGRP_NAME"))){
    System.out.println("MATCH FOUND!!!!!");
    orgOpInterface.removeObjectAllowed(organizationKey,provisionObjectKey);
    break;
    & i get following error :
    <Mar 22, 2012 1:54:43 PM IST> <Error> <XELLERATE.APIS> <BEA-000000> <Class/Method: tcOrganizationOperationsBean/removeObjectAllowed encounter some problems: Object with key=7 is not already set as an allowed object for Organization with key=1>
    Thanks
    Rahul Shah

  • Is Audit related api's are missing in OIM 11g new API's.

    Hi All,
    I want to use OIM 11g Apis to use perform tasks related to audit. But I didn't found any api in oim11g new APIs.
    Can any one suggest me what shall i do?
    Thanks,
    Iceman513

    Hello,
    Did you get any answer?
    I am also trying to generate Audit using OIM API/Direct procedure calls..
    Any help will be appreciated.
    Thanks

  • OIM 11g R2 Exporting UDF without sandbox!

    Hi, I'm trying to export the UDFs att from a User Form, but I lost the sandbox whit i make the customizations.
    Is there any way to recover the Sandbox or export this att to another OIM 11g r2 Server??
    Regards!!

    If you create new sandbox and modify any UDF and export that sandbox before publishing.
    Once you publish sandbox of UDF and then you try to export sandbox in that case you will lost your UDF changes.
    For UDF's always export sandbox before publishing sandbox. so that you have exported sandbox which you can import into another environment.

  • OIM 11g R1 - User Login activities

    Hello,
    we have OAM-OIM-OID integration. A user authenticates against OAM/OID.
    It is possible to track any user login or user password changes?
    Where will this activities stored? OAM or OID?

    you can check the OAM or OID Audit logs.
    OID: ORACLE_INSTANCE/auditlogs/OID/oid1
    OAM: <MW_HOME>/user_projects/domains/OAM_domain/servers/oam_server1/logs/auditlogs
    Reference:
    http://docs.oracle.com/cd/E14571_01/doc.1111/e15478/audit.htm
    http://docs.oracle.com/cd/E15523_01/oid.1111/e10029/auditing.htm

  • OIM 11g R1 API to create business rule

    Hi,
    I have a requirement where new companies get created quite often and hence the roles for companies, access policies, authorization policies is to be created.
    I tried figuring out if there is any api to create business rules and authorization policies?
    Configuring companies (along with polices and business rules) is a tedious job and I am trying to find some way to automate it.
    Thanks,
    Ani

    When i go to the request templates, and try to create a new one, the "Create Role" is not a valid request type.
    I would suggest you create an authorization policy that grants permission to create roles. And then you can create an approval policy for action of "Create Role" and configure it so that you trigger an approval process.
    -Kevin

  • OIM 11g - How to run a schedule task using API

    Hi All,
    May I know how i can run a schedule job in OIM 11g through API.I referred the below link but it is for 9.x version.I need the same functionality in 11g?.
    Schedule Tasks
    Thanks in advance.

    Check this :
    SchedulerService schService = oimClient.getService(SchedulerService.class);
    schService.triggerNow("Second Demo Scheduled Task");
    API Reference :
    void triggerNow(java.lang.String jobName)
    throws SchedulerException,
    SchedulerAccessDeniedException
    Runs the specified job
    Parameters:
    jobName - The job that is to be triggered
    Throws:
    SchedulerException - when an error occurs at the Quartz Engine or scheduler is not running.
    SchedulerAccessDeniedException - This exception will be thrown if access permission for operation is not available to the user

  • Service IDs API for OIM 11g

    Hello,
    I have one requirement to get ServiceID details in OIM 11g using APIs. basicllay I need to get the Service Ids from OIM .
    Please let me know if you have any solutions for this.
    Thanks!

    Hello,
    Any proposed solution for doing ServiceId provisioning in OIM11g ?I see there is an option for Service ID check bo while creating a provisioning request.I am note sure what is the use of this? any information would be helpful.
    Thanks,

  • OIM 11g integration AutoLogin error (first login or forgot password)

    Hi,
    We are currently integrating OAM+OIM 11g (R2). We have used a 10g webgate for this.
    When the user logs in for the first time, and sets his password and answers the challenge questions, he should be "Auto logged in" when he is finished.
    The same scenario should happen, if the user forgot his password, and resets it. He should be "Auto-logged in" when finished.
    This is not happending for us.
    The OIM logs tells us this:
    ERROR: Autologin failed oracle.iam.ui.platform.sso.exception.AutoLoginException: Error occured while retrieving TAP partner key from Credential store
    We have tried to verify everything recommended by this Oracle Support article:
    How to Solve Autologin problems in OIM with OAM? [ID 1475297.1]
    Any ideas what we are missing?
    Thanks & Regards,
    Henrik

    Maybe this is a something?
    Whate should the value of the property OAM_SERVER_VERSION be, when running idmConfigTool.sh and using a 10g webgate for the integration?
    Chapter 7.6 in the integration documentation states this:
    OAM_SERVER_VERSION: 11g (use 10g if Oracle Access Manager 10g is used)
    http://docs.oracle.com/cd/E27559_01/integration.1112/e27123/oim.htm#CACFCJHI
    Under chapter 2.4.5 in the idmConfigTool documentation it's described like this:
    OAM_SERVER_VERSION: Required only when Access Manager server does not support 11g webgate in Oracle Identity Manager-Access Manager integration. In that case, value should be provided as '10g'.
    http://docs.oracle.com/cd/E27559_01/integration.1112/e27123/idmcfgtool.htm#CIHCICHD
    When we ran the script, we had the value set to "11g" (because that's our OAM version)... now I'm wondering if I need to set this value at all..
    Regards,
    Henrik

  • Exception  from OIM 11g login method

    Hello All,
    I installed OIM 11g on RHEL5 on WebLogic 10.3.3. I have written a sample client application which connects to OIM server to evaluate its various functionality.
    <snippet>
              System.setProperty("java.security.auth.login.config", "ABSOLUTE_PATH/authwl.conf");
              System.setProperty("OIM.AppServerType","weblogic");
              Hashtable env = new Hashtable();
              env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
              env.put(Context.PROVIDER_URL, "t3://HOST_NAME:7001");
         OIMClient oimClient = new OIMClient(env);
         try {
                   oimClient.login("xelsysadm", PASSWORD.toCharArray());
                   System.out.println("Got OIM Connection");
              } catch (LoginException e) {
                   System.out.println("Got OIM Connection:"+e.getMessage());
    </snippet>
    In the above code snipped, the following exception is thrown by "oimClient.login("xelsysadm", PASSWORD.toCharArray());" line:
    <EXCEPTION>
    oracle.iam.platform.utils.NoSuchServiceException: java.lang.reflect.InvocationTargetException
    at oracle.iam.platform.OIMClient.getServiceDelegate(OIMClient.java:197)
    at oracle.iam.platform.OIMClient.getService(OIMClient.java:174)
    at oracle.iam.platform.OIMClient.loginSessionCreated(OIMClient.java:209)
    at oracle.iam.platform.OIMClient.login(OIMClient.java:136)
    at oracle.iam.platform.OIMClient.login(OIMClient.java:129)
    at GetOIMServerConnection.main(GetOIMServerConnection.java:24)
    Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at oracle.iam.platform.OIMClient.getServiceDelegate(OIMClient.java:193)
    ... 5 more
    Caused by: oracle.iam.platform.utils.NoSuchServiceException: javax.naming.NameNotFoundException: While trying to lookup 'ejb.stateless.ClientLoginSessionService#oracle.iam.platformservice.api.ClientLoginSessionServiceRemote' didn't find subcontext 'stateless'. Resolved 'ejb' [Root exception is javax.naming.NameNotFoundException: While trying to lookup 'ejb.stateless.ClientLoginSessionService#oracle.iam.platformservice.api.ClientLoginSessionServiceRemote' didn't find subcontext 'stateless'. Resolved 'ejb']; remaining name 'stateless/ClientLoginSessionService#oracle/iam/platformservice/api/ClientLoginSessionServiceRemote'
    at oracle.iam.platformservice.api.ClientLoginSessionServiceDelegate.<init>(Unknown Source)
    ... 10 more
    Caused by: javax.naming.NameNotFoundException: While trying to lookup 'ejb.stateless.ClientLoginSessionService#oracle.iam.platformservice.api.ClientLoginSessionServiceRemote' didn't find subcontext 'stateless'. Resolved 'ejb' [Root exception is javax.naming.NameNotFoundException: While trying to lookup 'ejb.stateless.ClientLoginSessionService#oracle.iam.platformservice.api.ClientLoginSessionServiceRemote' didn't find subcontext 'stateless'. Resolved 'ejb']; remaining name 'stateless/ClientLoginSessionService#oracle/iam/platformservice/api/ClientLoginSessionServiceRemote'
    at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
    at weblogic.jndi.internal.ServerNamingNode_1033_WLStub.lookup(Unknown Source)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:405)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:393)
    at javax.naming.InitialContext.lookup(InitialContext.java:392)
    at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:132)
    at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:88)
    at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:130)
    at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:155)
    ... 11 more
    Caused by: javax.naming.NameNotFoundException: While trying to lookup 'ejb.stateless.ClientLoginSessionService#oracle.iam.platformservice.api.ClientLoginSessionServiceRemote' didn't find subcontext 'stateless'. Resolved 'ejb'
    at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
    at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:247)
    at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:182)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
    at weblogic.jndi.internal.RootNamingNode_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
    at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    </EXCEPTION>
    Any idea what's going wrong here?
    Thanks in Advance,
    Shyam

    This issue is resolved by making following change in the client code:
    replace
    env.put(Context.PROVIDER_URL, "t3://HOST_NAME:7001");
    by
    env.put(Context.PROVIDER_URL, "t3://HOST_NAME:OIMServer_BOOTSTRAP_PORT/oim");

  • Creating a Request via OIM 11g API

    I'm trying to create a request in OIM using the API. I found this post ( OIM 11g - Setting Process Form Data through Request API ) which has the code to do it but I'm getting an error:
    Here is what I have
    OIMClient client = getOIMClient(url, username, password);
          long resKey = 0L;
          String str = null;
          String resourceKey = null;
          Map<String, String> searchMap = new HashMap<String, String>();
          tcResultSet resultSet = null;
          RequestData requestData = null;
          Beneficiary beneficiary = null;
          RequestBeneficiaryEntity entity = null;
          List<Beneficiary> beneficiaryList = new ArrayList<Beneficiary>();
          List<RequestBeneficiaryEntity> entityList = null;
          List<RequestBeneficiaryEntityAttribute> entityAttrList = null;
          String RESOURCE = "TESTRESOURCE_GTC";
          tcITResourceInstanceOperationsIntf operations = client.getService(tcITResourceInstanceOperationsIntf.class);
          Map<String, String> conditions = new HashMap<String, String>();
          conditions.put("IT Resources.Name", "TESTRESOURCE_GTC");
          resultSet = operations.findITResourceInstances(conditions);           
          resKey = resultSet.getLongValue("IT Resource.Key");
          resourceKey = Long.toString(resKey);
          RequestBeneficiaryEntityAttribute parantAttr = new RequestBeneficiaryEntityAttribute();
          parantAttr.setType(TYPE.String);
          parantAttr.setName("Title");
          parantAttr.setValue("Mr.");
          entityAttrList = new ArrayList<RequestBeneficiaryEntityAttribute>();
          entityAttrList.add(parantAttr);
          entity = new RequestBeneficiaryEntity();
          entity.setEntityKey(resourceKey);
          entity.setEntityType(RequestConstants.RESOURCE);
          entity.setEntitySubType(RESOURCE);
          entity.setEntityData(entityAttrList);
          entityList = new ArrayList<RequestBeneficiaryEntity>();
          entityList.add(entity);
          System.out.println("*********** USR KEY" + usrKey);
          beneficiary = new Beneficiary();
          beneficiary.setBeneficiaryType(Beneficiary.USER_BENEFICIARY);
          beneficiary.setBeneficiaryKey(usrKey);
          beneficiary.setTargetEntities(entityList);
          beneficiaryList.add(beneficiary);
          requestData = new RequestData();
          requestData.setRequestTemplateName("Self-Request Resource");
          requestData.setJustification("Test");
          requestData.setBeneficiaries(beneficiaryList);
          UnauthenticatedRequestService reqsrvc = client.getService(UnauthenticatedRequestService.class);
          str = reqsrvc.submitRequest(requestData);
          System.out.println("Value from submitRequest : '" + (str != null ? str : null) + "'");I'm getting
    <Feb 14, 2012 4:53:24 PM EST> <Error> <oracle.iam.request.impl> <IAM-2050128> <Invalid beneficiary key was specified for Self-Request. >
    oracle.iam.request.exception.InvalidRequestDataException: IAM-2050128:Invalid beneficiary key was specified for Self-Request.
    I can see that USER KEY is getting populated.
    Edited by: DJ on Feb 14, 2012 4:59 PM
    Edited by: DJ on Feb 14, 2012 5:00 PM

    While creating a request to provision iPlanet User one of the errors I was getting:
    oracle.iam.request.exception.RequestServiceException: IAM-2050061:Type mismatch for the attribute Server. The type passed is String, but the corresponding type in the data set is Long.:Server:String:Long
    So I replaced the value of the attribute Server to the IT Resource.Key which is 5. After making the changes, it goes through approvals with no problems, but when I approve all the work items, it errors out with an error:
    Error occurred while provisioning resource with key 45 to user 5
    User Key is 45 and Resource Key is 5. I'm not sure why it swapped it.
    Here is the code I'm using:
    public static void createRequest(String userLogin, String templateName, String resourceName, HashMap<String, Object> attrs, OIMClient client) {
        try {
          String usrKey = searchUserByLogin(userLogin, client).get(0).getId();
          long resKey = 0L;
          String str = null;
          String resourceKey = null;
          Map<String, String> searchMap = new HashMap<String, String>();
          tcResultSet resultSet = null;
          RequestData requestData = null;
          Beneficiary beneficiary = null;
          RequestBeneficiaryEntity entity = null;
          List<Beneficiary> beneficiaryList = new ArrayList<Beneficiary>();
          List<RequestBeneficiaryEntity> entityList = null;
          List<RequestBeneficiaryEntityAttribute> entityAttrList = new ArrayList<RequestBeneficiaryEntityAttribute>();
          tcITResourceInstanceOperationsIntf operations = client == null ? Platform.getService(tcITResourceInstanceOperationsIntf.class) : client.getService(tcITResourceInstanceOperationsIntf.class);
          Map<String, String> conditions = new HashMap<String, String>();
          conditions.put("IT Resources.Name", resourceName);
          resultSet = operations.findITResourceInstances(conditions);
          resKey = resultSet.getLongValue("IT Resource.Key");
          resourceKey = Long.toString(resKey);
          for (String attr : attrs.keySet()) {
            RequestBeneficiaryEntityAttribute parantAttr = new RequestBeneficiaryEntityAttribute();
            if (attrs.get(attr) instanceof String) {
              parantAttr.setType(TYPE.String);
              parantAttr.setName(attr);
              parantAttr.setValue(String.valueOf(attrs.get(attr)));
              entityAttrList.add(parantAttr);
            } else if (attrs.get(attr) instanceof Long) {
              parantAttr.setType(TYPE.Long);
              parantAttr.setName(attr);
              parantAttr.setValue(String.valueOf(attrs.get(attr)));
              entityAttrList.add(parantAttr);
            } else {
              // do nothing
          entity = new RequestBeneficiaryEntity();
          entity.setEntityKey(resourceKey);
          entity.setEntityType(RequestConstants.RESOURCE);
          entity.setEntitySubType(resourceName);
          entity.setEntityData(entityAttrList);
          entityList = new ArrayList<RequestBeneficiaryEntity>();
          entityList.add(entity);
          beneficiary = new Beneficiary();
          beneficiary.setBeneficiaryType(Beneficiary.USER_BENEFICIARY);
          beneficiary.setBeneficiaryKey(usrKey);
          beneficiary.setTargetEntities(entityList);
          beneficiaryList.add(beneficiary);
          requestData = new RequestData();
          requestData.setRequestTemplateName(templateName);
          requestData.setJustification("Test");
          requestData.setBeneficiaries(beneficiaryList);
          System.out.println("Resource Keys " + resKey + " " + resourceKey);
          System.out.println("User Key " + usrKey);
          RequestService reqsrvc = client == null ? Platform.getService(RequestService.class) : client.getService(RequestService.class);
          str = reqsrvc.submitRequest(requestData);
          System.out.println("Value from submitRequest : '" + (str != null ? str : null) + "'");
        } catch (Throwable t) {
          t.printStackTrace();
      }Edited by: DJ on Feb 16, 2012 5:01 PM

  • OIM 11g Login page not loading properly

    Hi,
    I have configured a new OIM 11g environment in a Linux environment.
    All my applications were running fine. I was able to work on OIM administrator and Design Console (Client).
    Suddenly the OIM 11g administrator login screen is not loading properly and even not able to login from Client.
    I restarted the Weblogic Domain and the SOA and OIM server multiple times and they are starting without any error but page is not loading properly.
    When I see the logs I get following error on page load.
    ####<Dec 30, 2010 11:35:14 AM IST> <Error> <HTTP> <abc.com> <oim_server1> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <11d1def534ea1be0:5ad44b08:12d35e09c49:-7ffd-0000000000000017> <1293689114100> <BEA-101020> <[ServletContext@29426618[app:oim module:oim path:/oim spec-version:2.5 version:11.1.1.3.0]] Servlet failed with Exception
    java.lang.StringIndexOutOfBoundsException: String index out of range: -2
         at java.lang.String.substring(String.java:1937)
         at java.lang.String.substring(String.java:1904)
         at org.apache.myfaces.trinidadinternal.style.util.CSSGenerationUtils._getNSComponentSelector(CSSGenerationUtils.java:632)
         at org.apache.myfaces.trinidadinternal.style.util.CSSGenerationUtils.getNamespacedSelectors(CSSGenerationUtils.java:525)
         at org.apache.myfaces.trinidadinternal.style.cache.FileSystemStyleCache._getShortStyleClassMap(FileSystemStyleCache.java:1113)
         at org.apache.myfaces.trinidadinternal.style.cache.FileSystemStyleCache._getStyleSheetDocument(FileSystemStyleCache.java:662)
         at org.apache.myfaces.trinidadinternal.style.cache.FileSystemStyleCache._getEntry(FileSystemStyleCache.java:423)
         at org.apache.myfaces.trinidadinternal.style.cache.FileSystemStyleCache.getStyleSheetURIs(FileSystemStyleCache.java:177)
         at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.StyleSheetRenderer.encodeAll(StyleSheetRenderer.java:97)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:765)
    ]] Root cause of ServletException.
    java.lang.ExceptionInInitializerError
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
         at java.lang.Class.newInstance0(Class.java:355)
         at java.lang.Class.newInstance(Class.java:308)
         at com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:186)
         at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:106)
         at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:368)
         at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:230)
         at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:88)
         at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
         at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
         at com.sun.faces.el.ChainAwareVariableResolver.resolveVariable(ChainAwareVariableResolver.java:108)
         at oracle.javatools.resourcebundle.BundleVariableResolver.resolveVariable(BundleVariableResolver.java:45)
         at com.sun.faces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:80)
         at oracle.adfinternal.view.faces.model.VariableResolverUtils$JspResolver.resolveVariable(VariableResolverUtils.java:57)
         at com.sun.faces.el.VariableResolverChainWrapper.getValue(VariableResolverChainWrapper.java:107)
         at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
         at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
    Caused By: oracle.iam.platform.utils.ServiceInitializationException: java.lang.ClassNotFoundException
         at oracle.iam.platform.Platform.getService(Platform.java:264)
         at oracle.iam.identity.usermgmt.impl.UserManagerImpl.<init>(UserManagerImpl.java:325)
         at oracle.iam.identity.usermgmt.internal.impl.UserManagerInternalImpl.<init>(UserManagerInternalImpl.java:48)
         at oracle.iam.identity.usermgmt.impl.UserDetailsProviderImpl.getUserDetails(UserDetailsProviderImpl.java:106)
         at oracle.iam.platform.auth.impl.util.AuthenticationContextUtilForEJB.setUserPreferences(AuthenticationContextUtilForEJB.java:137)
         at oracle.iam.platform.auth.impl.util.AuthenticationContextUtilForEJB.setAuthenticationContextInEJB(AuthenticationContextUtilForEJB.java:93)
         at oracle.iam.conf.api.SystemConfigurationServiceEJB.getSystemPropertyx(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIn

    Is this the first time you restarted the servers after the fresh installation? If no, then there must be for sure some changes done, were they? If yes, then the initial configuration was itself wrong, check the prerequisites before installing.
    If not sure of all this then please raise an SR with oracle support.

Maybe you are looking for

  • Powershell Script Send-zip not working when running in cmd

    I found there is powershell send-zip script available in technet.  I tested it and found that it works when the script is running under powershell env, but when it is calling in cmd env, I can see the zip file, but there is nothing in it.  If I add t

  • Photosmart 2710 prints garbage from Windows 8.1 but prints OK from Windows 7

    Photosmart 2710 connected wirelessly to Verizon FIOS router, prints fine when sent files from Windows 7 clients (also connected wirelessly). When sent print jobs from a Windows 8.1 wireless client, printer produces page after page of single lines of

  • Reg : usage of standard Texts(SO10)

    Hi all of u,   I want to use standard texts ,which were created under Tcode SO10, alone to display output without using them in any of the script or smartforms.Also i want to nw that , is it possible to use Variables inside standard text,which r real

  • Bayer Filter and colour balance.

    Hi all. I have recently been acquiring images using a mikrotron MC1363 camera and LV code 'Grab and save to AVI'. I have then used ImageJ to create a stack of U8 images. My problem then arises in that I need to apply a bayer filter and colour balance

  • I tried to sync to new computer, nothing transferred over

    I am running Firefox 4.0.1 on HP Laptop with Windows 7 Home Premium. I have new Toshiba laptop, also running W7 Home Premium. Did sync...used settings to replace all data on new PC with data from old PC. Nothing's changed on new PC. Still the same Fi