Thursday, June 28, 2012

Installing Oracle OID steps.

1- Install oracle 11g r2 database with AL32UTF8 character set.
2- login with system account and issue these commands:
    alter system set session_cached_cursors=100 scope=spfile;
    alter system set processes=500 scope=spfile;
   alter system set open_cursors=800 scope=spfile;
3- restart oracle service
4- Before Installing RCU you should do the following 2 steps:
    - remove damaged ORACLE_HOME environment variable.
    -  copy msvcr71.dll from (rcu-install-dir)\jdk\bin to: C:\Windows\System32 and    C:\Windows\SysWOW64
    use RCU to create and initialize data base for the OID
    in the creation wizard select:
    ODS ,select the Identity Management - Oracle Identity
    Manager schema. The SOA Infrastructure schema, the
    User Messaging Service schema, and the Metadata
    Services schema are also selected, by default.
    start RCU from BIN/rcu.bat
    Use Both RCU and OID versions
5- Create a loopback adapter.
6-  start OID setup and choose don't create domain.
     and in the database section select use existing created schemas that we have created
     using the RCU.

Friday, June 15, 2012

Upgrade Weblogic Server 10.3.5 to support ADF Release 2 , ADF 11.2.x.x deployment

1- Setup 64 JDK for windows 64 or 32 JDK for 32 bit.
2- add the path to the jdk bin in the windows path system variable as JAVA_HOME.
3- Install wls 1035 generic installer for windows 64 and 32 exe for 32 windows.
   to run the generic installer 64 use the following command on the already installed JDK
   open cmd window and cd of the generic wls1035 jar folder
   and issue this command
   java -jar wls1035_generic.jar

4- install ADF Development Runtime on the wls1035 and just specify your jdk path as an argument.

5- Start Fusion Middleware Configuration Wizard - $MW_HOME/oracle_common/common/bin/config.cmd
    create new Weblogic domain, pick the following products on
    "Generate a domain configured automatically to support the following products"  page:
    Oracle JRF - [oracle_common]
    Oracle Enterprise Manager - [oracle_common]
    Create an Admin Server.

   **** if you will work on the default AdminServer server ignore steps  6 , 7 , 8 , 12 , 13  ***
   OPTIONAL : When a new Managed Server is created Beside the AdminServer.
6- Create a managed server and a machine that is associated with that managed server
    drop the managed server node under the machine tree node in the wizard

7- Start the Node manager utitlity which will run your managed server later by running the cmd file

8-  Run the domain and his console then choose servers link then choose your created managed
    server and press control tab then start your managed server.
    - open a new IE page then write the following URL
    choose your created managed server and run APPLY JRF TEMPLATE.
    This managed server will be used to deploy ADF applications to it later.
    - If you are using default Admin Server you will not need to do this step as
    The Admin Server is automaticaly Applied with the new JRF TEMPLATE.

9- the ADF runtime comes in 2 batches that will be installed over ADF run time
     Close the server and Install the 2 batches on the weblogic wls1035.
     Start with Patch 12979653:-
  - Create a system variable ORACLE_HOME with value F:\Oracle\Middleware\oracle_common\
  - Create a system variable MW_HOME with value F:\Oracle\Middleware\
  - Create a system variable JAVA_HOME with value C:\Program Files\Java\jdk1.6.0_33\
  - Copy the 64 bit or 32 bit OPatch source to be like F:\Oracle\Middleware\oracle_common\OPatch
  - In the Path System Variable add the path to OPatch folder                 F:\Oracle\Middleware\oracle_common\OPatch
  - OPatch version should be of a version 11.1.x.x you can know the version by issuing a command like
    opatch version
  - To Apply the Patch open cmd as "administrator" and cd to the patch Source Folder
     D:\SA\work\learn\Weblogic Upgrade Patches\Batches Source\p12979653_111150_Generic\12979653
     and issue the following command
     opatch apply            
     opatch apply -jdk C:\Program Files\Java\jdk1.6.0_33
10- Start patching with the second patch 12917525
   - To Apply the Patch open cmd as administrator and cd to the patch Source Folder
     D:\SA\work\learn\Weblogic Upgrade Patches\Batches Source\p12917525_111150_Generic\12917525
     and issue the following command
     opatch apply    

11- You will need to upgrade your domain to apply JSF2 Libraries using the following command
    open administrator CMD
    and issue this command
    ex:  watch the slash '/' on the path.

  OPTIONAL : When a new Managed Server is created Beside the AdminServer.
12- You Might Face Error when  trying to start your ADF Managed Server and to get rid of it just
     Register Your Domain Path for the startNodeManaged cmd
     Just add an entry to the file "" located in

13- close node manager and your server and run the node manager first then your domain server after
      that , then start the console and try to start your managed server to service all your deployed ADF

Friday, June 8, 2012

Utility Method To Get Any ADF Component Object In Managed Beans Using Its' Id Instead Of Binding The Component To The Managed Bean.

Hi Dears ,

This post will help you get the component object in your managed beans instead of binding
The Component it self  to an instance variable in the managed bean.
You will have to put both overloading methods in your utility class and just invoke
the first method and pass the component Id to it as a parameter and the method will
search the component tree and get your target component.

  public static UIComponent getComponent(String componentId) {
        FacesContext ctx = FacesContext.getCurrentInstance();
        Iterator iter = ctx.getViewRoot().getChildren().iterator();

        while (iter.hasNext()) {

            UIComponent component = (UIComponent);
            UIComponent targetComponent = getComponent(component, componentId);
            if (targetComponent != null) {
                return targetComponent;

        return null;

    private static UIComponent getComponent(UIComponent uiComponent, String componentId) {

        UIComponent targetComponent = uiComponent.findComponent(componentId);
        if (targetComponent != null)
            return targetComponent;

        Iterator iter = uiComponent.getFacetsAndChildren();
        while (iter.hasNext()) {
            UIComponent component = (UIComponent);
            UIComponent target = getComponent(component, componentId);
            if (target != null)
                return target;
        return null;

Thursday, April 19, 2012

Oracle Forms Lov Style In ADF - Way #2

1- Create an Updateable Departments view -   create a new attribute named city and put the select
stmt as shown.

2- Create a LOV on the new "City" Attribute.

3- Create a new jsf page and drag the updateable departments view as a form on it.

4- Click the LOV component and on the LaunchPopupListener create a method in a backing bean.
5- To Keep my implementation in a generic way so that the same backing Bean method can handle
 several LOV components across the application so I created a client Attribute in each LOV
 component and put the Lov attribute Name as the value of this client attribute and later in the
method , i am extracting this information to identify each LOV component.

6- put the following java code inside the backing bean method and run the page.

7- Write a part from the city and press the tab button you will find your phrase
used as a parameter for the LOV search.

Oracle Forms Lov Style In ADF - Way #1

1- In the Updateable Departments view:  create new attribute named city and put the select stmt as shown.

2- In the read Only view that will populate the LOV mark the city Attribute as a key attribute.

3- Create a LOV on the updateable view "City" Attribute.

4- Change the auto Submit property to true.

5- Create a page with the departments view as a form on it.
6- Write a part from the city and press the tab button you will find your phrase
used as a parameter for the LOV search

JDeveloper R2 Caching Problem Revealed.

Sometimes Jdeveloper R2 caches old files that are not existing in our current application version ,

Sometimes we face unlogic errors with our ADF R2 work.

The Question is where ADF R2 stores these old versions.

Here is the way to get rid of these errors.

1- From The Build Menu : choose Clean all.

2- Close the Jdeveloper.

3- Browse for you application directory , open the application folder and you will find a ".data" file.
Here is the place that ADF stores old versions.
Simply delete it and open jdeveloper for another time and continue your work.