Showing posts with label FMW. Show all posts
Showing posts with label FMW. Show all posts

February 20, 2026

How to Fix formsweb.cfg When Fusion Middleware Enterprise Manager Is Not Accessible

Recently for one of my customer  I ran into a tricky situation while Fusion Middleware Enterprise Manager (EM) 12c was completely inaccessible. Normally, any configuration changes in Oracle Forms, reports or for weblogic  we use Fusion Middleware Enterprise Manager (EM) . Our requirement was to update especially formsweb.cfg which generally is changed through EM. But when EM itself is down, we had to find a way out.

Below is exactly what we did to safely make the change and bring the environment back without causing configuration corruption.

 

Step 1 — Shut Down the Required Services

First, we stopped the Forms managed server and Admin Server to avoid any configuration lock or file corruption.

  • Shutdown WLS_FORMS
  • Shutdown Admin Server

 

Step 2 — Navigate to Domain Home

[appltest@testapp ~]$ cd $DOMAIN_HOME

[appltest@testapp ~]$ pwd

[appltest@testapp ~]$ /u01/app/oracle/product/12.2.1.4/user_projects/domains/prd

 

 

 

Step 3 — Clear Configuration Lock (edit.lok)

WebLogic sometimes leaves an edit session lock if a previous configuration change did not complete properly.

If the following file exists, remove it

[appltest@testapp ~]$  rm -rf edit.lok

 


Step 4 — Clear Pending Changes

WebLogic stores in-progress configuration updates inside a pending directory. If this folder contains files, the Admin Server assumes an edit session is still active.

Delete any files inside $DOMAIN_HOME/pending/*

[appltest@testapp ~]$ rm -rf $DOMAIN_HOME/pending/*

 


Step 5 — Clear Temporary and Cache Directories

To ensure a clean startup, we removed temporary and cache files. These directories will be recreated automatically when servers restart.

[appltest@testapp ~]$ $DOMAIN_HOME/servers/AdminServer/tmp/
[appltest@testapp ~]$ $DOMAIN_HOME/servers/WLS_FORMS/tmp/
[appltest@testapp ~]$ $DOMAIN_HOME/servers/WLS_FORMS/cache/

 

Step 6 — Edit formsweb.cfg Manually

After cleanup, we updated the required configuration directly in the file:

[appltest@testapp ~]$  vi $DOMAIN_HOME/config/fmwconfig/components/FORMS/instances/forms1/config/formsweb.cfg

 

userid=new_username/new_password@orcl

 

 

Step 7 — Restart serivces and Verify

  1. Start the Admin Server
  2. Wait until it reaches RUNNING state
  3. Start Forms services and verify changes.

February 2, 2025

Automating Oracle Forms 11g Compilation with a Shell Script

 

Automating Oracle Forms 11g Compilation with a Shell Script

In the world of Oracle applications, managing and compiling forms can be a time-consuming task, especially when dealing with a large number of forms. Fortunately, with the power of shell scripting in Linux, we can automate this process to save time and reduce errors. In this blog post, we will guide you through creating a shell script that compiles multiple Oracle Forms 11g or 12c in one go.

Why Automate Form Compilation?

Compiling Oracle Forms is essential for ensuring that your applications run smoothly. When changes are made to forms, they need to be recompiled to reflect those changes in the application. Manually compiling each form can be tedious and prone to human error, particularly when you have dozens or even hundreds of forms to process. By automating this task, you can:

  • Save Time: Compile multiple forms simultaneously without manual intervention.
  • Reduce Errors: Minimize the risk of missing a form or making mistakes during the compilation process.
  • Increase Efficiency: Focus on more critical tasks while the script handles the repetitive work.


Below is a shell script designed to compile all .fmb files in a specified directory for Oracle Forms 11g.


#!/bin/bash

. .bash_profile

 export FR_INST=/u01/app/oracle/product/fmw11g/asinst_1

 # Database credentials

USERNAME="scott"

PASSWORD="tiger"

DATABASE="prod"

 # Directory containing the forms

FORMS_DIR="/home/oracle/forms"

 

# Change to the forms directory

cd $FORMS_DIR || { echo "Directory not found: $FORMS_DIR"; exit 1; }

 

# Compile all forms

echo "Starting compilation of Oracle Forms..."

 

for form in *.fmb; do

    if [ -f "$form" ]; then

        echo "Compiling $form..."

        $FR_INST/bin/frmcmp_batch.sh Module_type=form Module="$form" userid="$USERNAME/$PASSWORD@$DATABASE"  batch=yes  compile_all=yes

       

        if [ $? -ne 0 ]; then

            echo "Error compiling $form"

        else

            echo "$form compiled successfully."

        fi

    fi

done

 

echo "Compilation process completed."

 

 

Instructions for Using the Script

  1. Modify Variables:
    • Update ORACLE_HOME, USERNAME, PASSWORD, DATABASE, and FORMS_DIR with your actual Oracle installation path and database credentials.
  2. Save the Script:
    • Save this script to a file, for example, compile_forms.sh.
  3. Make it Executable:

              chmod 777 compile_forms.sh

  1. Run the Script:
    • Execute the script in your terminal:

./compile_forms.sh

Key Components of the Script

  • Environment Variables: The script sets up necessary environment variables such as ORACLE_HOME and updates the PATH to include Oracle binaries.
  • Looping Through Forms: It uses a for loop to iterate through all .fmb files in the specified directory.
  • Error Handling: After each compilation attempt, it checks for errors and provides feedback on whether each form was compiled successfully or if there was an error.


February 6, 2022

How To Apply weblogic PSU Patch

 

How To Apply weblogic PSU Patch

Env Details:

OS= Windows Server 2012 R12 64bit

#Middleware Home

MW_HOME= D:\Oracle\Middleware

Step 1.  

In this example we will be installing WLS PSU 10.3.6.0.211019(p33172858_1036_Generic.zip)

So download the patch from support.oracle.com

P.S. Following are the generic steps for installing a WLS Psu patch. But its always recommended to go through the readme file first and act accordingly.

Step 2.

Shutdown weblogic services in following order.

1.       Stop opmn process

2.       Stop WLS_REPORTS services

3.       Stop WLS_FORMS services

4.       Stop Weblogic Admin server

 

Step 3.

Remove any previously applied WebLogic Server Patch Set Update and associated overlay patches

In this example, we didn’t have any previously applied wls PSU installed.

To get information about list of patches installed run following command.

Cd D:\Oracle\Middleware\utils\bsu

D:\Oracle\Middleware\utils\bsu>bsu.cmd -report

Patch Report

============

  Report Info

    Report Options

      bea_home.................. ### OPTION NOT SET

      product_mask.............. ### OPTION NOT SET

      release_mask.............. ### OPTION NOT SET

      profile_mask.............. ### OPTION NOT SET

      patch_id_mask............. ### OPTION NOT SET

    Report Messages

  BEA Home.................. D:\Oracle\Middleware

 

  Product Description

  Product Name.............. WebLogic Server

  Product Version........... 10.3.6.0

  Installed Components...... Core Application Server, Administration Console, Co

nfiguration Wizard and Upgrade Framework, Web 2.0 HTTP Pub-Sub Server, WebLogic

SCA, WebLogic JDBC Drivers, Third Party JDBC Drivers, WebLogic Server Clients, W

ebLogic Web Server Plugins, UDDI and Xquery Support, Evaluation Database, Worksh

op Code Completion Support

  Product Install Directory. D:\Oracle\Middleware\wlserver_10.3

  Java Home................. null

  Jave Vendor............... Sun

  Java Version.............. 1.6.0_29

  Patch Directory........... D:\Oracle\Middleware\patch_wls1036

 

  Product Description

  Product Name.............. Oracle Coherence

  Product Version........... 3.7.1.1

  Installed Components...... Coherence Product Files

  Product Install Directory. D:\Oracle\Middleware\coherence_3.7

  Java Home................. null

  Jave Vendor............... null

  Java Version.............. null

  Patch Directory........... D:\Oracle\Middleware\patch_ocp371

 

We faced error while generating above report. Error was like "java.lang.OutOfMemoryError: Java heap space" 

 

Solution :

This solution is for Windows 64bit OS.

Go to $MW_HOME/utils/bsu

Prepare to edit the bsu.sh (for UNIX) or bsu.cmd (for Windows)

Find the MEM_ARGS setting, e.g., the default as MEM_ARGS="-Xms256m -Xmx512m"

Increase these values to a higher setting, e.g., MEM_ARGS="-Xms4096m –Xmx4096m"

 

 

Step 4.

Apply WLS BSU (Smart Update) fix for quicker patch application. This step can be skipped if the fix is already applied.

Apply patch Patch 12426828 SMARTUPDATE 3.3 INSTALLER PLACEHOLDER 

Check readme file for patch apply instructions.

To check bsu version

%MW_HOME%\utils\bsu\bsu.cmd -version (for Windows)
$MW_HOME/utils/bsu/bsu.sh -version (for Unix/Linux)

 

Step 5.

Create Cache_dir

Create Directory cache_dir inside $MW_HOME/utils/bsu

Copy The Downloaded Patch To $MW_HOME/utils/bsu/cache_dir 

And unzip it inside cache_Dir directory.

 

 

Step 6. 

Set The Environment Using setWLSEnv.sh 

cd D:\Oracle\Middleware\wlserver_10.3\server\bin

setWLSEnv.cmd

 

Step 7. 

Run The Patch Install Command Using bsu.cmd

Syntax:- - Execute bsu.cmd -install -patch_download_dir={MW_HOME}/utils/bsu/cache_dir -patchlist={PATCH_ID} -prod_dir={MW_HOME}/{WL_HOME}

bsu.cmd -install -patch_download_dir=D:\Oracle\Middleware\utils\bsu\cache_dir -patchlist=21Y4 -prod_dir=D:\Oracle\Middleware\wlserver_10.3 -install -log=patch_apply.log -log_priority=trace

 

This entire process takes sometime to complete.

 

Step 8.

Verifying the Patch

cd $MW_HOME/utils/bsu

 bsu.cmd -report -bea_home=D:\Oracle\Middleware -output_file=bsureprot.log

 

Also, this can be verified from weblogic console.

Domain Structure -> Servers->Click on Adminserver ->Monitoring ->General

This page will show you weblogic version.

 

Step 9.

Start all weblogic services

1.       Start  Weblogic Admin server

2.       Start WLS_FORMS services

3.       Start WLS_REPORTS services

4.       Start OPMN services


If you need to remove patchset:-

bsu.cmd -remove -patchlist=21Y4 -prod_dir=D:\Oracle\Middleware\wlserver_10.3

 

 

 

 

 

 

January 15, 2022

How to create windows service for Nodemanager/Weblogic/forms/reports in FMW 12.2.1.4

To start or stop weblogic, forms , reports in windows fusion middleware 12.2.1.4 we need to execute command manually through cmd.

It becomes hectic and time consuming to start and stop these services one by one. To ease the entire startup/shutdown process we can create services for Nodemanager, weblogic admin server , forms ,reports.


Create Nodemanager service:-


To create nodemanager service first, navigate to 

 D:\app\oracle\product\12.2.1.4\user_projects\domains\prd\bin

 Here Middleware home= D:\app\oracle\product\12.2.1.4

Right click on installNodeMgrSvc.cmd and run as as administrator

Open services.msc and start Oracle Weblogic prd Nodemanager Services. Keep the startup type manual.





Create Weblogic adminserver service:-

 To create weblogic service first we need to create one batch file with following contents.

Installweblogicservice.bat

echo on

SETLOCAL

set DOMAIN_NAME=PRD

set USERDOMAIN_HOME=F:\app\oracle\product\12.2.1.4\user_projects\domains\prd

set SERVER_NAME=AdminServer

set WL_HOME=D:\app\oracle\product\12.2.1.4\wlserver

set PRODUCTION_MODE=true

set WLS_USER=weblogic

set WLS_PW=xyz123#

set MEM_ARGS=-Xms128m -Xmx512m

call "D:\app\oracle\product\12.2.1.4\user_projects\domains\prd\bin\setDomainEnv.cmd"

call "D:\app\oracle\product\12.2.1.4\wlserver\server\bin\installSvc.cmd"

ENDLOCAL

Cmd /k

Run the above batch file using “Run as Administrator”, a Windows Service will be created.

Start service as shown below. Keep the startup type manual.


Create FORMS service:-

To create Forms service first we need to create one batch file with following contents.

 

Create one batch file with following contents.

Installformsserivce.bat

SETLOCAL

set MW_HOME=D:\app\oracle\product\12.2.1.4

set DOMAIN_NAME=prd

set USERDOMAIN_HOME=D:\app\oracle\product\12.2.1.4\user_projects\domains\prd

set SERVER_NAME=WLS_FORMS

set ADMIN_URL=http://CSAPP2:7001

set JAVA_OPTIONS=-Dweblogic.Stdout="D:\app\oracle\product\12.2.1.4\user_projects\domains\prd\stdout.txt" -Dweblogic.Stderr="D:\app\oracle\product\12.2.1.4\user_projects\domains\prd\stderr.txt"

set WL_HOME=D:\app\oracle\product\12.2.1.4\wlserver

set PRODUCTION_MODE=true

set MEM_ARGS=-Xms128m -Xmx512m

call "D:\app\oracle\product\12.2.1.4\user_projects\domains\prd\bin\setDomainEnv.cmd"

call "D:\app\oracle\product\12.2.1.4\wlserver\server\bin\installSvc.cmd"

ENDLOCAL

Cmd /k


Run the above batch file using “Run as Administrator”, a Windows Service will be created.

Start service as shown below. Keep the startup type manual.



Create REPORTS service:-

To create Reports service first we need to create one batch file with following contents.


Create one batch file with following contents.

Installreportsserivce.bat

SETLOCAL

set MW_HOME=D:\app\oracle\product\12.2.1.4

set DOMAIN_NAME=prd

set USERDOMAIN_HOME=D:\app\oracle\product\12.2.1.4\user_projects\domains\prd

set SERVER_NAME=WLS_REPORTS

set ADMIN_URL=http://CSAPP2:7001

set WL_HOME=D:\app\oracle\product\12.2.1.4\wlserver

set PRODUCTION_MODE=true

set MEM_ARGS=-Xms128m -Xmx512m

call "D:\app\oracle\product\12.2.1.4\user_projects\domains\prd\bin\setDomainEnv.cmd"

call "D:\app\oracle\product\12.2.1.4\wlserver\server\bin\installSvc.cmd"

ENDLOCAL

Cmd /k


Run the above batch file using “Run as Administrator”, a Windows Service will be created.

Start service as shown below. Keep the startup type manual.



Batch script to start ohs1 and Reports server:

 

If there are ohs and standalone reports services running , we can start them manually.


Create one batch file with following commands for startup ohs1 and reports server.

ohs_reports_startup.bat

D:\app\oracle\product\12.2.1.4\user_projects\domains\prd\bin\startComponent.cmd ohs1 && D:\app\oracle\product\12.2.1.4\user_projects\domains\prd\bin\startComponent.cmd rep_server1_prod


Batch script to shutdown ohs1 and Reports server:

 

Likewise startup script, create one batch file with following commands for shutting down ohs1 and reports server.

 

ohs_reports_shutdown.bat


D:\app\oracle\product\12.2.1.4\user_projects\domains\prd\bin\stopComponent.cmd ohs1 && D:\app\oracle\product\12.2.1.4\user_projects\domains\prd\bin\stopComponent.cmd rep_server1_prod

December 26, 2021

How to mitigate the impact associated with CVE-2021-44228 and CVE-2021-45046 on Oracle Fusion Middleware 12.2.1.4



Recently in Dec2021, a vulnerability was found in Log4j, an open-source logging library commonly used by apps and services across the internet. This vulnerability has shaken the entire world. To mitigate this vulnerability in Oracle Fusion Middleware, Oracle recommends to apply following patches .

Download following patches for WLS Release 12.2.1.4

1.    Download latest Opatch for WLS 28186730

2.    For the WLS and FMW Infrastructure, if you have not been applying quarterly security updates, Coherence Patch 33286160 is a prerequisite.

3.    WLS PATCH SET UPDATE 12.2.1.4.210930 (Patch 33416868)

4.    WLS OVERLAY PATCH FOR 12.2.1.4.0 OCT 2021 PSU (Patch 33671996) for CVE-2021-44228,CVE-2021-45046





I will be applying these patches in windows environment.

SET ORACLE_HOME=D:\app\oracle\product\12.2.1.4

Set JAVA_HOME=D:\app\oracle\jdk

Apply patch 28186730 - This patch installs latest version of Opatch for FMW/WLS

D:\app\oracle\product\12.2.1.4\OPatch>%java_home%\bin\java -jar C:\Users\Administrator\Downloads\6880880\opatch_generic.jar -silent oracle_home=D:\app\oracle\product\12.2.1.4

 

Launcher log file is C:\Users\Administrator\AppData\Local\Temp\1\OraInstall2021-12-19_05-06-36PM\launcher2021-12-19_05-06-36PM.log.

Extracting the installer . . . . Done

Checking if CPU speed is above 300 MHz.   Actual 2400    Passed

Checking swap space: must be greater than 512 MB    Passed

Checking if this platform requires a 64-bit JVM.   Actual 64    Passed (64-bit not required)

Checking temp space: must be greater than 300 MB.   Actual 272082 MB    Passed

Preparing to launch the Oracle Universal Installer from C:\Users\Administrator\AppData\Local\Temp\1\OraInstall2021-12-19_05-06-36PM

Installation Summary

….

….

….

The install operation completed successfully.

 

Logs successfully copied to C:\Program Files\Oracle\Inventory\logs.


Shutdown entire application services(Nodemanager , Weblogic , FORMS, Reports, OHS etc)

Navigate to patch location and apply the patch


unzip p33286160_1221411_Generic.zip

List out the installed components to see the installed Coherence version

 

C:\Users\Administrator>%ORACLE_HOME%/OPatch/opatch.bat lsinventory -jdk %JAVA_HOME% -inactive

Oracle Interim Patch Installer version 13.9.4.2.1

Copyright (c) 2021, Oracle Corporation.  All rights reserved.

 

 

Oracle Home       : D:\app\oracle\product\12.2.1.4

Central Inventory : C:\Program Files\Oracle\Inventory

   from           :

OPatch version    : 13.9.4.2.1

OUI version       : 13.9.4.0.0

Log file location : D:\app\oracle\product\12.2.1.4\cfgtoollogs\opatch\opatch2021-12-19_16-18-03PM_1.log

 

 

OPatch detects the Middleware Home as "D:\app\oracle\product\12.2.1.4"

 

Lsinventory Output file location : D:\app\oracle\product\12.2.1.4\cfgtoollogs\opatch\lsinv\lsinventory2021-12-19_16-18-03PM.txt

 

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

Local Machine Information::

Hostname: CSAPP2

ARU platform id: 233

ARU platform description:: Microsoft Windows Server 2003 (64-bit AMD)

 

 

There are no inactive patches installed in this Oracle Home.

 

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

 

OPatch succeeded.



cd C:\Users\Administrator\Downloads

C:\Users\Administrator\Downloads>%ORACLE_HOME%/OPatch/opatch apply 1221411 -jdk %JAVA_HOME%

Oracle Interim Patch Installer version 13.9.4.2.1

Copyright (c) 2021, Oracle Corporation.  All rights reserved.

 

 

Oracle Home       : D:\app\oracle\product\12.2.1.4

Central Inventory : C:\Program Files\Oracle\Inventory

   from           :

OPatch version    : 13.9.4.2.1

OUI version       : 13.9.4.0.0

Log file location : D:\app\oracle\product\12.2.1.4\cfgtoollogs\opatch\opatch2021-12-19_16-22-18PM_1.log

 

 

OPatch detects the Middleware Home as "D:\app\oracle\product\12.2.1.4"

 

Verifying environment and performing prerequisite checks...

OPatch continues with these patches:   1221411

 

Do you want to proceed? [y|n]

y

User Responded with: Y

All checks passed.

Backing up files...

Applying interim patch '1221411' to OH 'D:\app\oracle\product\12.2.1.4'

 

Patching component oracle.coherence, 12.2.1.4.0...

Patch 1221411 successfully applied.

Log file location: D:\app\oracle\product\12.2.1.4\cfgtoollogs\opatch\opatch2021-12-19_16-22-18PM_1.log

 

OPatch succeeded.



Unzip patch 33416868


Apply patch


C:\Users\Administrator\Downloads>%ORACLE_HOME%/OPatch/opatch apply 33416868 -jdk %JAVA_HOME%

 


Unzip patch 33671996

 Apply patch


cd C:\Users\Administrator\Downloads\33671996

%ORACLE_HOME%/OPatch/opatch apply

 


Mitigation Plan 

If patching is not possible at this time, you may mitigate the Log4j vulnerabilities with the below steps.

This mitigation applies to Log4j v2 prior to 2.16.0, including 2.15.

1. Navigate to the location:

ORACLE_HOME/oracle_common/modules/thirdparty/ 


2. Run the below command for the installed Log4j version 2 files:

12.2.1.3.0: log4j-1.2.17.jar - This is expected to contain a version 2 file
12.2.1.4.0: log4j-2.11.1.jar
14.1.1.0.0: log4j-core-2.11.1.jar and log4j-api-2.11.0.jar

Unix:

zip -q -d log4j*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class


Windows: 

Use a zip utility to extract the contents as a .zip, remove JndiLookup.class, and re-zip.



Reference:-Security Alert CVE-2021-44228 / CVE-2021-45046 Patch Availability Document for Oracle WebLogic Server & Fusion Middleware (Doc ID 2827793.1)

Oracle Database 26ai Installation Using RPM on Oracle Linux 9 (OEL 9) – Step-by-Step Guide

  In this post I will describe the installation of Oracle Database 26ai 64-bit on Oracle Linux 9 (OL8) 64-bit. The installation requires a m...