Oracle Fusion Middleware & Application Server

Tuesday, August 30, 2016

Integrating Critical Patch Updates (CPU) into your WebLogic Server on Docker

Bruno Borges is doing a great job providing Docker Images for various Oracle WebLogic scenarios within the GitHub Repository https://github.com/oracle/docker-images/tree/master/OracleWebLogic

The provided samples are a real good starting point to create your Oracle WebLogic Servers and Domains including sample application.

But I personally miss one point within the Installation process of the Oracle WebLogic Server, applying Critical Patch Updates.

The integration is really simple.
As an example I will take Bruno's build file https://github.com/oracle/docker-images/blob/master/OracleWebLogic/dockerfiles/12.2.1/Dockerfile.generic for the installation of the WebLogic Server 12.2.1 Generic Version and extend the Dockerfile with an apply of the Critical Patch Update July 2016 for Oracle WebLogic Server 12.2.1.0.0 (Patch No. 23094285).

As pre requirement download all the mentioned Software Files within Bruno's GitHub Repository and in addition download from My Oracle Support the Patch No. 23094285 (file name: p23094285_122100_Generic.zip) and place them into the dockerfiles/12.2.1 directory on your server.

As next modify the Dockerfile.generic as follows, see line no. 5 - Environment for CPUJuly2016 Patch Number


# Environment variables required for this build (do NOT change)
# -------------------------------------------------------------
ENV FMW_PKG=fmw_12.2.1.0.0_wls_Disk1_1of1.zip \
    FMW_JAR=fmw_12.2.1.0.0_wls.jar \
    CPUJULY2016=p23094285_122100_Generic.zip \
    ORACLE_HOME=/u01/oracle \
    USER_MEM_ARGS="-Djava.security.egd=file:/dev/./urandom" \
    PATH=$PATH:/usr/java/default/bin:/u01/oracle/oracle_common/common/bin

see line no. 4 - for copy of CPUJuly2016 file
# Copy packages
# -------------
COPY $FMW_PKG install.file oraInst.loc /u01/
COPY $CPUJULY2016 /u01/

see lines no. 8, 9 and 14 for the adjusting of the chown command. see lines no 12 and 13 for the extraction and apply of the CPUJuly2016 Patch see line no. 15 for the cleanup of the CPUJuly2016 file
# Setup filesystem and oracle user
# Install and configure Oracle JDK
# Adjust file permissions, go to /u01 as user 'oracle' to proceed with WLS installation
# ------------------------------------------------------------
RUN chmod a+xr /u01 && \
    useradd -b /u01 -m -s /bin/bash oracle && \
    echo oracle:oracle | chpasswd && \
    # Move chown command to an upper position in order to avoid permission problems while applying CPU patch
    chown oracle:oracle -R /u01 && \
    cd /u01 && $JAVA_HOME/bin/jar xf /u01/$FMW_PKG && cd - && \
    su -c "$JAVA_HOME/bin/java -jar /u01/$FMW_JAR -silent -responseFile /u01/install.file -invPtrLoc /u01/oraInst.loc -jreLoc $JAVA_HOME -ignoreSysPrereqs -force -novalidation ORACLE_HOME=$ORACLE_HOME INSTALL_TYPE=\"WebLogic Server\"" - oracle && \
    su -c "cd /u01 && /u01/oracle/oracle_common/adr/unzip $CPUJULY2016" - oracle && \
    su -c "cd /u01/23094285 && /u01/oracle/OPatch/opatch apply -silent" - oracle && \
    # chown oracle:oracle -R /u01 && \
    rm /u01/$FMW_JAR /u01/$FMW_PKG /u01/$CPUJULY2016 /u01/oraInst.loc /u01/install.file

Before you start with the build process, make sure that you have all mentioned pre requirements from Bruno, e.g. the oracle/jdk:8 image.

[root@server] docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
oracle/jdk          8                   1fe717b7315d        15 minutes ago      520.1 MB

The next step will be to create your Oracle WebLogic Server Image, which now will include the current available Critical Patch Update, you should see during your build process following output:


Sending build context to Docker daemon 882.4 MB
Step 1 : FROM oracle/jdk:8
 ---> 1fe717b7315d
. . .
. . .
Oracle Interim Patch Installer version 13.3.0.0.0
Copyright (c) 2016, Oracle Corporation.  All rights reserved.

Oracle Home       : /u01/oracle
Central Inventory : /u01/oracle/.inventory
   from           : /u01/oracle/oraInst.loc
OPatch version    : 13.3.0.0.0
OUI version       : 13.3.0.0.0
Log file location : /u01/oracle/cfgtoollogs/opatch/23094285_Aug_30_2016_11_04_46/apply2016-08-30_11-04-43AM_1.log

OPatch detects the Middleware Home as "/u01/oracle"

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   23094285  

Do you want to proceed? [y|n]
Y (auto-answered by -silent)
User Responded with: Y
All checks passed.
. . . 
. . .
OPatch succeeded.
. . .

And now you got an Oracle WebLogic Server Image including the latest available Critical Patch Update :-)
But keep in mind, for future CPU's you might also include before the opatch apply step an update of the opatch utility, as from time to time Oracle requires a newer version of the opatch utility.


Monday, August 29, 2016

Oracle Forms Stand-alone Application Launcher (FSAL)

Since Oracle Forms 12c its possible to start your Oracle Forms without invoking a browser, this is called Oracle Forms Stand-alone Application Launcher (FSAL).

As pre requirement you will need either a JRE or JDK on your desktop, which should execute the Oracle Forms.

For this new Feature Oracle has integrated a short description Website within your installed and configured Oracle Forms & Reports Server 12c. The description website can be reached under following URL http://<your_server>:<port>/forms/html/fsal.html



Simply access this website from your desktop and download the frmsal.jar file to your desktop.

On your server hosting the Oracle Forms & Reports Server, access the formsweb.cfg and search for the section [standalone] or create a new section with a unique name.

[oracle@server] cd $DOMAIN_HOME/config/fmwconfig/servers/WLS_FORMS/applications/formsapp_12.2.1/config
[oracle@server] vi formsweb.cfg
-- Snippet from formsweb.cfg
[standaloneapp]
# Note: baseSAAfile must end with .txt
baseSAAfile=basesaa.txt
# definition of colorScheme
colorScheme=blaf
# My Start Form
form=t1.fmx
# fsalcheck parameter specifies whether to perform checksum comparison
# of Forms stand-alone app launcher or not. When it is enabled, it triggers
# the comparison at server. The checksum of FSAL at client machine will be
# compared with the checksum of FSAL archived at the server repository.
fsalcheck=true

After you have modified or created your own section for the FSAL, get back to your desktop, open a command prompt and navigate to the directory in which you have placed the frmsal.jar file. From there make sure that you have the java binary in your PATH and execute following command

java -jar frmsal.jar -url "http://<your_server>:<your_port>/forms/frmservlet?config=standaloneapp" -t 10000

You can also define within the parameter -url various options, e.g. .../forms/frmservlet?config=standaloneapp&colorScheme=teal

Depending on your formsweb.cfg section configuration you might see the typical login dialog.



or you will access directly your Oracle Forms Application.



And everything without any browser :-)

Monday, August 15, 2016

Oracle Reports 12c - The missing configuration steps

Oracle Forms & Reports 12c is released since a quite long time and I had now some chance to have a more detailed look on the Oracle Reports 12c component.

After you have successfully installed and configured the Oracle Forms & Reports 12c, you might find out that your Oracle Reports 12c is not working ... because its not yet configured, even you completed the Configuration Assistent successfully :-)

The following steps are describing the necessary tasks for Linux.

There some steps to take as "Post-Configuration":

  1. Create a Reports Tool Instance
  2. Create a Reports Server Instance
  3. if you are running under Linux 7 (either Oracle Enterprise Linux or RedHat) fix libXm.so.3 issue
  4. Adjust the Application Roles within your WebLogic Server Domain

Create a Reports Tool Instance

connect to your Linux server as oracle user and create the necessary Reports Tool Instance via WLST

[oracle@server] cd $ORACLE_HOME/oracle_common/common/bin
[oracle@server] ./wlst.sh
# replace the password with your password and verify if port 7001 is your Admin Server Port
wls:/offline> connect('weblogic','password','localhost:7001')
wls:/fr_domain/serverConfig/> createReportsToolsInstance(instanceName='reptools1',machine='AdminServerMachine')
wls:/fr_domain/serverConfig/> exit()

The above execution of the createReportsToolsInstance command will create under your DOMAIN_HOME following subdirectories:

  • reports/bin
  • reports/cache
  • reports/fonts
  • reports/plugins
  • reports/server
as next step we can create our Reports Server.

Create a Reports Server Instance

connect to your Linux server as oracle user and create the necessary Reports Server Instance via WLST

[oracle@server] cd $ORACLE_HOME/oracle_common/common/bin
[oracle@server] ./wlst.sh
# replace the password with your password and verify if port 7001 is your Admin Server Port
wls:/offline> connect('weblogic','password','localhost:7001')
wls:/fr_domain/serverConfig/> createReportsServerInstance(instanceName='rep_server1',machine='AdminServerMachine')
wls:/fr_domain/serverConfig/> exit()



libXm.so.3 Problem

in case you are using an Oracle Enterprise Linux 7 or RedHat 7, you need to fix a small libXm.so.3 problem. Oracle Reports is looking for the libXm.so.3, but under OEL 7 and RH7 you will find only a libXm.so.4
Simply perform following steps as root user on your Linux server

[root@server] cd /usr/lib64
[root@server] ls libXm.so*
libXm.so.4  libXm.so.4.0.4
[root@server] ln -s /usr/lib64/libXm.so.4 libXm.so.3

Startup your Reports Server Instance

since we have created the Reports Server Instance by attaching to the NodeManager, you must make sure that the NodeManager is up and running and than perform following steps:

[oracle@server] cd $DOMAIN_HOME/bin
[oracle@server] ./startComponent.sh rep_server1
. . .
Successfully Connected to Node Manager.
Starting server rep_server1 ...
Successfully started server rep_server1 ...
Successfully disconnected from Node Manager.

Exiting WebLogic Scripting Tool.

Done

Adjust the Application Roles within your WebLogic Server Domain

At first you need to login to the Fusion Middleware Enterprise Manager, normally http://<your_server_name>:7001/em and access under the menu "Security / Application Roles"


Within the Application Roles option chose from the drop down menu the option reports, than click on the arrow button, mark the line with the Role Name RW_ADMINISTRATOR and finally click the Edit button to modify the selected role



Under "Edit Application Role : RW_ADMINISTRATOR" use the Add button


In the Add Principal screen, select under the option Type "User", click the arrow button and mark the line with the Principal "weblogic" and proceed with the button OK



The last OK button will redirect you to the Application Roles screen, there simply click the OK button on the top right corner, when everything works fine you will get following Information


Now, you are able to access the Reports Status URLs by providing the username and password of the weblogic user

For Example
  • http://<your_server_name>:9002/reports/rwservlet/showenv?server=rep_server1
  • http://<your_server_name>:9002/reports/rwservlet/getserverinfo?server=rep_server1