Thursday, 21 June 2012

Installation of OIM 11g on OEL (yet to complete)

OIM 11g installation on OEL 6.1
*******************************
Step1)Install Java
Ensure you have root access
Download 'jdk-6u33-linux-x64-rpm.bin' from Oracle.
create some folder under 'root's home directory... say 'java' and place this file there.
Now give permission to the jdk-6u33-linux-x64-rpm.bin file as below.
chmod +x jdk-6u26-linux-i586-rpm.bin
Now execute the following command
./jdk-6u26-linux-i586-rpm.bin
and follow the on screen instructions and you are done !!

Java gets installed at the following location by default
/usr/java/jdk1.6.0_33

Now you can delete the folder 'java' which you created to place the jdk-6u26-linux-i586-rpm.bin  file.
It is just the software you used to install java at /usr/java/jdk1.6.0_33 location.

Now its time to set JAVA_HOME and to add JAVA_HOME to the PATH variable.

Go to root's home directory.[ opening any terminal and just type 'cd' will take you to root's home directory]
there will be a file '.bash_profile' which is a shell script which runs at the login each time.

edit that script and paste below lines

JAVA_HOME=/usr/java/jdk1.6.0_33
export JAVA_HOME

PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
:.
export PATH

save and close it.

You expect you are done.

You may run the 'java' and 'javac' commands and ensure that java is working

Now just type java -version and you will be astonished. You might see a different version of java to that of what was installed in above step.
The reason being, OEL by default comes with openjdk and now you just installed one more version in OEL.

We need to point the operating system to the latest java version that you installed.

Go to /usr/sbin

now execute the following command.

/usr/sbin/alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_33/bin/java 16033

Here are the arguments:
–install tells that we’ll add a new alternative
/usr/bin/java is the default path for Java
java is the name of the software
/usr/java/jdk1.6.0_33/bin/java is the path of latest java we installed
16033 is the priority, I recommend you to give the exact version number so when you install a newer version and enter its version as priority, it̢۪ll be selected as the default one (as long as mode is auto).

You may verify the same by executing the following command
/usr/sbin/alternatives --display java
You will finally see Current `best' version is /usr/java/jdk1.6.0_33/bin/java.

now you may execute java -version command and see the below output

java version "1.6.0_33"
Java(TM) SE Runtime Environment (build 1.6.0_33-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03, mixed mode)


so now java is set to the version that you installed.

There is another way as well to know what are all the available java versions that can be made active.
just execute the command and follow the instructions provided on screen

/usr/sbin/alternatives --config java

You will see something like below.

There are 2 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
   1           /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
*+ 2           /usr/java/jdk1.6.0_33/bin/java

Enter to keep the current selection[+], or type selection number:


You may enter your selection here and you are done!!

Happy learning...

For more clarity you might want to refer to below link

http://www.gokhanatil.com/2011/07/how-to-installupdate-java-jdk-on-oracle.html

Step2: Install Database.
will post later

Wednesday, 20 June 2012

Start and Stop Schedule Task in OIM 11g

Sometimes schedulers stop working in OIM (Oracle Identity Manager) and which requires a restart of the servers. But if you restart the servers then it will impact other things in OIM as well. In that case you can Reinitialize or Stop and Start the schedulers without restarting OIM Servers.

Please follow the below steps to reinitialize or stop/start Schedulers in Oracle Identity Manager 11g:



  • Hit the URL http://OIM_HOST:OIM_PORT/SchedulerService-web/status

             Example:

            http://localhost:8003/SchedulerService-web/status

  • It will Ask you for Admin credentials with two button "Stop" or "Reinit" if scheduler are in "STARTED" status else it will show you only single button "Start"


  • Provide credentials of XELSYSADM and Start/Stop/Reninitialize the Schedulers

Difference between OIM 10g and OIM 11g

  • OIM 11g uses Stored Procedure for Reconciliation which results into better performance
  • Use of BI Publisher for Reporting
  • Can't use any report without BI Publisher
  • Batch Mode Reconciliation 
  • Request Template for restricting the access on Resources
  • All the JARs and Configuration can be stored into Database, no more Copy Paste of JARs for Clustering
  • Integration with LDAP Synch

How to fetch Lookup values into a map in OIM 11g

   public static Map<String, String> getLookupValue(String lookupName)
    {
       
        tcLookupOperationsIntf lookupOpsIntf = null;
        Map<String, String> lookupValues = new HashMap<String, String>();
        tcResultSet lookupResSet = null;
        String lookupCode;
        String lookupValue;
      

        try
        {
           lookupOpsIntf=Platform.getService(tcLookupOperationsIntf.class);
            lookupResSet = lookupOpsIntf.getLookupValues(lookupName);
            if ((lookupResSet != null) && (lookupResSet.getRowCount() > 0))
            {
                for (int i = 0; i < lookupResSet.getRowCount(); i++)
                {
                    lookupResSet.goToRow(i);
                    lookupCode = lookupResSet.getStringValue(Constants.LKV_ENCODED);
                    lookupValue =lookupResSet.getStringValue(Constants.LKV_DECODED);
                   
                    lookupValues.put(lookupCode, lookupValue);
                   
                }
            }
        }
       
        catch (tcInvalidLookupException invalidLookupEx)
        {
         //print Exceptions
        }
       
        catch (Exception e)
        {
         //print Exceptions
        }
        finally
        {
            if (lookupOpsIntf != null)
            {
                lookupOpsIntf.close();
            }
          
        }
       
        return lookupValues;
    }
   

How to verify if a given lookup is present in OIM or not

   public static boolean lookupExists(String lookupName)
   {
        boolean lookupExists = false;
        tcLookupOperationsIntf lookupOpsIntf = null;
        tcResultSet lookupResSet = null;
        try
        {
           lookupOpsIntf=Platform.getService(tcLookupOperationsIntf.class);
           lookupResSet = lookupOpsIntf.getLookupValues(lookupName);
           lookupExists = true;
        }
        catch (tcInvalidLookupException invalidLookupEx)
        {
            //print Exception
            return false;
        }
        catch (Exception e)
        {
            //print Exception
        }
        finally
        {
            if (lookupOpsIntf != null)
            {
                lookupOpsIntf.close();
            }
           
        }
       
        return lookupExists;
    }

Friday, 15 June 2012

OIM 11g basic installation steps

If detailed screen shots are needed. You can reach me at 
oimimage@gmail.com 

1)Install JAVA  jdk-6u25-windows-x64.
Set JAVA_HOME C:\Program Files\Java\jdk1.6.0_25
Modify Path and add JAVA_HOME/bin

2)Install Database 11.2.0.1
Ensure that the character set is selected as AL32UTF8.
Execute the following commands to increase the number of cursors and processors.

alter system set aq_tm_processes=1 scope=both;
alter system set db_cache_size=150994944 scope=both;
alter system set java_pool_size=125829120 scope=both;
alter system set shared_pool_size=183500800 scope=both;
alter system set open_cursors=1000 scope=both;
alter system set processes=500 scope=spfile;


3)Run RCU
The RCU Utitities' path should not contain any spaces.
copy msvcr71.dll from your installer directory>\rcuHome\jdk\bin to C:\Windows\SysWOW64 and C:\Windows\System32



4)Install wls1035_generic.jar using the following command.
java -D64 -Xmx1024m -jar wls1035_generic.jar
give the path of java/jdk C:\Program Files\Java\jdk1.6.0_25
create a sample domain
C:\Oracle\Middleware\user_projects\domains\oimdomain\bin
To start admin server: startWebLogic.cmd
To stop admin server: stopWebLogic.cmd



5)Install  and configure SOA
give the path of java/jdk C:\Program Files\Java\jdk1.6.0_25
configure SOA using weblogic quickstart

You have to tune the environment parameters as below for proper running of SOA application.


set EXTRA_JAVA_PROPERTIES=%EXTRA_JAVA_PROPERTIES% -da:org.apache.xmlbeans...

set XENGINE_DIR="%SOA_ORACLE_HOME%\soa\thirdparty\edifecs\XEngine"
set PATH=%PATH%;%SOA_ORACLE_HOME%\soa\thirdparty\edifecs\XEngine\bin

set JAVA_OPTIONS=%JAVA_OPTIONS%
set DEFAULT_MEM_ARGS=-Xms1024m -Xmx2048m
set PORT_MEM_ARGS=-Xms1024m -Xmx2048m

if "%JAVA_VENDOR%" == "Oracle" goto OracleJVM
set DEFAULT_MEM_ARGS=%DEFAULT_MEM_ARGS% -XX:PermSize=512m -XX:MaxPermSize=1024m
set PORT_MEM_ARGS=%PORT_MEM_ARGS% -XX:PermSize=512m -XX:MaxPermSize=1024m

The file name is setSOADomainEnv.cmd and is located under [Domainname]/bin

To start Managed server please execute following command.

C:\Oracle\Middleware\user_projects\domains\oimdomain\bin
startManagedWeblogic.sh [Managed Server Name]

In our case admin port is 7001 and soa port is 8001.

To confirm that SOA server is up and running, atleast for IDM perspective,
the following applications should be running.

1)SOA composites deployed -- http://localhost:8001/soa-infra
2)BPM work list -- http://localhost:8001/integration/worklistapp
3)Oracle Entereprise Manager -- http://localhost:8001/em
4)Oracle SOA Composer -- http://localhost:8001/soa/composer

Set the following environment variables and ensure that Java and ant are added in 'PATH' variable.

MW_HOME=C:\Oracle\Middleware
JAVA_HOME= C:\Program Files\Java\jdk1.6.0_25
JAVA_VENDOR=Oracle
WL_HOME=%MW_HOME%\wlserver_10.3
WLS_HOME=%WL_HOME%\server
OIM_ORACLE_HOME=%MW_HOME%\Oracle_IDM1
SOA_ORACLE_HOME=%MW_HOME%\Oracle_SOA1
DOMAIN_HOME=%MW_HOME%\user_projects\domains\oimdomain
ANT_HOME=%MW_HOME%\modules\org.apache.ant_1.7.1
OIM_HOME=%OIM_ORACLE_HOME%\server
DC_HOME=%OIM_ORACLE_HOME%\designconsole
RM_HOME=%OIM_ORACLE_HOME%\remote_manager(if RM  is configured)
PATH=
C:\app\Administrator\product\11.2.0\dbhome_1\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Java\jdk1.6.0_25\bin;.;%ANT_HOME%\bin




6)Install and configure OIM
Shutdown managed server for soa and weblogic admin server.
(As we will extend domain, for proper domain extension to happen, the servers should not be running).
give the path of java/jdk C:\Program Files\Java\jdk1.6.0_25
configure IDM using weblogic quickstart
(This is first config)
Now start admin server.
Go to C:\Oracle\Middleware\Oracle_IDM1\bin and execute config.bat
complete the steps as required.
and You are done!!

7)Post Install Steps

a)This is for design console to work
 
cd %WL_HOME%\server\lib
run the below command.
java -jar ..\..\..\modules\com.bea.core.jarbuilder_1.6.0.1.jar
This will create a file by name wlfullclient.jar at %WL_HOME%\server\lib
copy that file to  C:\Oracle\Middleware\Oracle_IDM1\designconsole\ext

b)Set XL.ComplierPath to C:\Program Files\Java\jdk1.6.0_25\bin using adv admin console.
This is for connectors to get complied.

C)set XEL_HOME=C:\Oracle\Middleware\Oracle_IDM1\server
at C:\Oracle\Middleware\Oracle_IDM1\server\bin\setEnv.bat


d)
Deploy the Diagnostic Dashboard. ?Logon to the WLS Admin Console with the weblogic account.
http://localhost:7001/console/
Lock the configuration, if in production mode.
Click Deployments.
Click Install.
Select the $OIM_ORACLE_HOME/server/webapp/optional folder.
Choose the XIMDD.ear file and click Next.
Click Next again then select the OIM Managed Server as the target and click Next.
Accept the defaults and click Next then Finish.
Click to Activate the Changes.
Click the Deployment again and find XIMDD and select it.
Click to start the app servicing all requests.
http://localhost:14000/XIMDD/index.jsp  is the URL for Diagnostic Dashboard.

e)Enable Exception reporting ?In the Advanced Administration Console, search for the System Properties.
Click Enable Exception Reports
Change the value to TRUE, save it and click OK.

f)
Install JDeveloper in the Middleware Home if Development work will be done.
Add the SOA Extension to JDeveloper
Configure the connection to the Admin Server in JDeveloper
File -> New -> General -> Connections -> Application Server Connection

g)
Deploy legacy OIM Web Services as may be needed. ?Logon to the WLS Admin Console with the weblogic account.
http://localhost:7001/console/
Lock the configuration, if in production mode.
Click Deployments.
Click Install.
Select the $OIM_ORACLE_HOME/server/apps
Choose spml-dsml.ear and click Next.
Click Next again then select the OIM Managed Server as the target and click Next.
Accept the defaults and click Next then Finish and then Save.
Click to Activate the Changes.
Click to list the Deployments again.
Select spml-dsml and then from the Start list, select Servicing all requests.

h)Create a log.properties file in the designconsole/config directory. (you can use server/config/log.properties as an example)

i)Sanity Checks.

http://localhost:7001/console --> Admin Console
http://localhost:7001/em  --> Enterprise Manager
http://localhost:14000/oim  --> Oracle Identity Manager
http://localhost:14000/SchedulerService-web
http://localhost:14000/spml-xsd/SPMLService?WSDL
http://localhost:14000/spmlws/OIMProvisioning?WSDL
http://localhost:14000/XIMDD  -->Diagnostic Dashboard
http://localhost:8001/soa-infra/ -->List of composites deployed on SOA
http://localhost:8001/integration/worklistapp --> BPM Worklist
http://localhost:8001/soa/composer-->BPM Composer

OIM 11g main method connectivity.


OIM  11g main method connectivity.
private static final String PROVIDER_URL = "t3://ip-address:14000/oim";  
private static final String USERNAME = "xelsysadm";
private static final String PASSWORD = "Welcome1";
System.setProperty("java.security.auth.login.config", "C:\\authwl.conf");
System.setProperty("OIM.AppServerType", "weblogic");
Hashtable env = new Hashtable();
env.put(OIMClient.JAVA_NAMING_PROVIDER_URL, PROVIDER_URL);
env.put(OIMClient.JAVA_NAMING_FACTORY_INITIAL,OIMClient.WLS_CONTEXT_FACTORY);
OIMClient oimClient = new OIMClient(env);
oimClient.login(USERNAME, PASSWORD.toCharArray());
tcLookupOperationsIntf lookupOpsIntf = null;
lookupOpsIntf=oimClient.getService(tcLookupOperationsIntf.class); 
lookupResSet = lookupOpsIntf.getLookupValues(lookupName);

OIM Connectivity through API


OIM 11g connectivity program
tcLookupOperationsIntf lookupOpsIntf = null;
lookupOpsIntf=Platform.getService(tcLookupOperationsIntf.class);
lookupResSet = lookupOpsIntf.getLookupValues(lookupName);
OIM 10g connectivity program.
tcUtilityFactory utilFactory = null;
tcLookupOperationsIntf lookupOpsIntf = null;
utilFactory = UtilityFactory.getUtilityFactoryAsAdmin();
lookupOpsIntf =(tcLookupOperationsIntf)utilFactory.getUtility("Thor.API.Operations.tcLookupOperationsIntf");
lookupResSet = lookupOpsIntf.getLookupValues(lookupName);