Friday, November 27, 2015

ADF – Parent Action Activity in Bounded Taskflow

(ADF Region trigger parent navigation Control flow )


What if you need to trigger a parent Taskflow activity from ADF region or Child bounded task flow, 

Actually ADF Region could not see parent navigate flow case in a direct way.

Parent action activity is a component in ADF Taskflow components, which allow child bounded Taskflow to generate outcomes that used to navigate throw parent activity rather than child activity

In this example I’ll create Parent Tasflow to preview departments as ADF region . and throw this region we can navigate into parent activity to EmployeesList Taskflow , Employees form page and global navigate page.

let us Start

  1. -          Create new ADF application “ CallPArentActivity”
  2. -          Create BC and create Employees and Departments VOs
  3. -          Create new Bounded Taskflow “Parent-TaskFlowDepartment ”(remove fragment option)
  4. -          Add Parent adf page activity as default (create page)
  5. -          Add “employeesForm” as adf page activity (create page)
  6. -          Add  “ employeesList “  as bounded Taskflow
  7. -          Add “information ”  as adf page activity (create page)





  1. -          Open employeesList bounded Taskflow
  2. -          Add “employeesPgae“ as adf page activity (create a apage)
  3. -          Add return activity
  4. -          Create flow-case “back” from emploeespage to retrun activity
  5. -          Drage employeesVO as table
  6. -          Add button and set action = back






  1. -          Create new bounded Taskflow with fragment Option “departmentTK”
  2. -     Add new  "departmentPage " as adf page activity 
  3. -          Add three Parent action Activities into Taskflow
  4. -          Add three navigation flow from departmentPage to parent Activities
-          goEmployeesList
-          goEmployeesForm
-          goInformation

     4-          set property <Parent Outcome> to refer to Parent outcome we need to trigger
                    
                         parentAction1.PrentOutcome = goList
                   parentAction1.PrentOutcome = goForm
                   parentAction1.PrentOutcome = goInfo






 - Set Action property to Flow case name in DepartmentPage







-  Drag DepartmentTF  as region into parent adf page 

Run and Test .................
now you can trigger parent navigation flow activity from Region or child bounded taskflow 
when you use Parent action activity ...
  



Tuesday, November 3, 2015

Install and Deinstall Oracle Patches use Opatch command.

Opatch (Apply Oracle Patches )

Install and Deinstall Oracle Patches use Opatch command.
(After complete this demo you will able to Apply oracle Patches on Middleware home or Jdeveloper Home)

Download patches
1-      Download your patch from Oracle Support .
             Login to Oracle Support > Patches and Updates
·         Go to search tab and write your patch number or search criteria.
·         Download your patch .






2-      Create a new folder in OS root to locate your patch , and unzip  patch file  into this folder

                                          C:\OraclePatches



             
               ------------------------------------------------------------

Pre Installation

3-      Set System environment variable ORACLE_HOME

-          Weblogic set variable to  your middleware directory (For Weblogic )

          Oracle_Home =  [MW_HOME]\ oracle_common  

-          Jdeveloper set variable to you Jdeveloper Home

        Oracle_Home =   [Jdeveloper_HOME]\jdeveloper






4-      Stop All managed servers and Admin Server before apply patch. I prefer to backup your MW_HOME directory.
                If you apply patch in Jdeveloper ,  please shutdown Integrated Weblogic  and close Jdeveloper IDE.

5-      Open cmd Command and set your current directory to directory where your patch is located .
                   
                                     cd  C:\OraclePatches\21768703\oui

6-      Use Opatch Apply command to apply current patch .
(may you will face a conflict when applying the patch ,because patch already applied before )

                       C:\OraclePatches\21768703\oui>opatch apply –Jdk [JDK path]



------------------------------------------------------------


  Post Installation
7-      For Jdeveloper: Open Jdeveloper and clean project and rebuild, then start Integrated Weblogic and run and test your application after patch and check problem is resolved .
8-       For standalone Weblogic server : start Admin Server , then start node manager , then start Managed Server . and check your Problem is resolved .
      
          ------------------------------------------------------------


List Patches installed in your Oracle_Home
   
             to list all patches installed in your Oeracle_Home 

                  Open cmd command and write command
   
                                 /> Opatch lsinventory





------------------------------------------------------------


Deinstall patch  

1-      Stop All managed servers and Admin Server before apply patch . If you apply patch in Jdeveloper ,  please shutdown Integrated Weblogic  and close Jdeveloper IDE.

2-      Open cmd Command and set your current directory to directory where your patch is located .

cd  C:\OraclePatches\21768703\oui

3-      Use Opatch rollback  command to deinstall current patch .

C:\OraclePatches\21768703\oui>opatch rollback –Jdk [JDK path]

4-      Clean you all files in tmp folder in OS User Directory

Jdeveloper  :
  [JDEV_USER_DIR]\DefaultDomain\servers\DefaultServer\tmp\*


Middleware:
  [MW_HOME]/user_projects/domains/[DOMAIN_NAME]/servers/[SERVER NAME]/tmp/*

               ------------------------------------------------------------

Post DeInstallation
1-      For Jdeveloper: Open Jdeveloper and clean project and rebuild, then start Integrated Weblogic and run and test your application after patch and check problem is resolved .
2-       For standalone Weblogic server : start Admin Server , then start node manager , then start Managed Server . and check your Problem is resolved .





Sunday, November 1, 2015

Weblogic does not start ,throw Exception: java.lang.NumberFormatException BEA-000386


Weblogic does not start and throw an exception: java.lang.NumberFormatException
    <Critical> <WebLogicServer> <BEA-000386>

When i tried to start Weblogic Server , server did not work , and gave me an exception java.lang.NumberFormatException= null


<01/11/2015 6:17:36 AM UTC> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to /u02/Oracle/user_projects/domains/mcitucm_domain/servers/AdminServer/logs/AdminServer.log42150. Log messages will continue to be logged in /u02/Oracle/user_projects/domains/mcitucm_domain/servers/AdminServer/logs/AdminServer.log.>
<01/11/2015 6:17:36 AM UTC> <Notice> <Log Management> <BEA-170019> <The server log file /u02/Oracle/user_projects/domains/mcitucm_domain/servers/AdminServer/logs/AdminServer.log is opened. All server side log events will be written to this file.>
<01/11/2015 6:17:38 AM UTC> <Critical> <WebLogicServer> <BEA-000386> <Server subsystem failed. Reason: java.lang.NumberFormatException: null
java.lang.NumberFormatException: null
        at java.lang.Integer.parseInt(Integer.java:417)
        at java.lang.Integer.parseInt(Integer.java:499)
        at weblogic.ldap.EmbeddedLDAP.validateVDEDirectories(EmbeddedLDAP.java:1104)
        at weblogic.ldap.EmbeddedLDAP.start(EmbeddedLDAP.java:242)
        at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
        Truncated. see log file for complete stacktrace
>
<01/11/2015 6:17:38 AM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED>
<01/11/2015 6:17:38 AM UTC> <Error> <WebLogicServer> <BEA-000383> <A critical service failed. The server will shut itself down>
<01/11/2015 6:17:38 AM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN>
 This problem may happen because i changed some server configurations when server running and made a corruption if file replicas.prop in the server .
Solution  : Remove this corrupted file , and let Weblogic auto generate this file again when server restart .
1- Open your server which weblogic installed.
2- go to this path
$<YourDomain>/servers/AdminServer/data/ldap/conf



3- rename this file replicas.prop to old-replicas.prop
4- restart  Weblogic server .
5- Smile every thing is Okay now ....

O racle  SQL WITH Clause         subquery factoring     or         Materializing   subqueries                                 (Sim...