Oracle Fusion Middleware & Application Server

Thursday, December 7, 2017

Oracle Forms & Reports on Docker - The Concept and Technique behind

In the last days I was working on my Oracle Forms & Reports in Docker solution and I already published it via my blog and in my personal GitHub Repository.

With this blog post, I want to explain the Concept and Technique behind my solution and the motivation.

Lets start with the motivation :-) With the Oracle Forms & Reports 12.2.x releases, Oracle has decided to remove the option to create script-based the WebLogic Domain for Oracle Forms & Reports. In case, I just have to install and configure one server with Oracle Forms & Reports, its quite fine to click through the Domain Configuration Wizard, but normally you don't have to configure just one environment, mostly 3 or more environments. Questions directed to Oracle, if the script-based configuration will be enabled again, were just answered with "you have to use the graphical Domain Configuration Wizard" ...
So, Jan-Peter Timmermann (https://jan-peter.me), Robert Crames (http://robertcrames.blogspot.ch) and I, were developing together a script set for installation and configuration of a complete Oracle Forms & Reports 12.2.x environment on Unix (Linux and so on) Servers, because we couldn't accept the fact, that we should start the Domain Configuration Wizard and click through several times just to create multiple Oracle Forms & Reports 12.2.x environments. 
The blog posts including the source code with the above mentioned solution can be found here:
We used this solution in our own test labs and also in real-life for customers, which reduced the efforts in installing and configuring Oracle Forms & Reports 12.2.x environments dramatically.

As I am a Docker fan and using heavily the by Oracle provided Docker solutions on https://github.com/oracle/docker-images, the next step was for me, to convert/integrate our script based solution for Oracle Forms & Reports into a Docker Image and here we are ...

The concept and technique behind the Oracle Forms & Reports in Docker solution is quite straight forward and simple.

Assuming you have a server with Docker (I personally prefer an Oracle Enterprise Linux 7.4 with Docker Engine from the Oracle Repos), you just have to decide if your Oracle Database for the required Metadata Repository for Oracle Forms & Reports should be also residing in your Docker or you have somewhere else (native) an Oracle Database (I am using an Oracle Database inside Docker on the same Docker server).
So at first you will pull your Oracle Linux 7 Image, which will be used as Base Image for your Oracle Database Image. For this I highly recommend the Oracle provided solution on GitHub (https://github.com/oracle/docker-images/tree/master/OracleDatabase) mainly maintained by Gerald Venzl (https://twitter.com/GeraldVenzl). After you got your Oracle DB Image installed, you just have to create your Oracle Database by following the instructions on https://github.com/oracle/docker-images/tree/master/OracleDatabase#running-oracle-database-in-a-docker-container.

The next step is to build up your Oracle Forms & Reports Stack, just get a copy of my GitHub Repository https://github.com/DirkNachbar/Docker. Download all the required Software binaries (JDK, Oracle WebLogic Server Infrastructure, Oracle Forms & Reports, optionally SQL Developer if you want to use Forms Application Deployment Services) for your desired Release (currently I am supporting Forms & Reports 12.2.1.2.0 and 12.2.1.3.0 ).

The first step is to create your JDK Image (I am using a full JDK and not a server-side version), based on Oracle Linux 7 Base Image (will be automatically pulled if not present).
As next you will need to create your WebLogic Server Infrastructure Image based on the prior created JDK Image. Within the creation of the WebLogic Server Infrastructure Image, I am also installing all required RPM's for Oracle Forms & Reports and fixing the libXm.so bug (without this fix Oracle Reports will not work).
After that you will need to create the Forms & Reports Image, based on the prior created WebLogic Server Infrastructure Image. During the build of the Oracle Forms & Reports Image, all required scripts for the Domain creation will be copied into the Image. These scripts will be used in the final step by the docker-compose file. In case you are using Forms & Reports 12.2.1.3.0, you have also the option to use Forms Application Deployment Services (FADS). For this, if the variable DC_FADS12C is set to true in the OracleFormsReports/setenv.sh, the Image will transfer the required SQL Developer binary file and replace the old version of the SQL Developer under the Oracle Forms & Reports ORACLE_HOME directory.

Before you proceed with the final step to create your Forms & Reports Domain, you need to align the script OracleFormsReports/setenv.sh. This is the most important step before you start with the Domain creation. 
Most of the variables, which will be declared within the setenv.sh script are self-explained, like DC_ADM_USER, DC_ADM_PWD and so on). Some variables you need to take care very well, like the DC_DB%. In case you don't align them to your environment, the creation of the Metadata Repository will fail and finally your Domain creation will fail. 
Another important variable is DC_USERHOME, this one configures the to be used volume on your Docker host, which will be mapped from your Docker Container. I am using volumes within the Forms & Reports Docker Container, which will contain the complete DOMAIN_HOME, because this allows you later on, to configure directly from your Docker host on the defined volume various settings, eg. formsweb.cfg, rwserver.conf, httpd.conf and so on. The defined DC_USERHOME you will have to create before you are starting with the Domain creation.

Finally (make sure that your target Database for the Metadata Repository is up and running) you can start the Domain Creation with the provided docker-compose file, which will create you a base domain, extend this with Forms & Reports, configure an Oracle HTTP Server (OHS) and creates you a Reports Server and finally it will configure port-forwarding from your Docker Container to your Docker Host of the most important ports, e.g. WebLogic Admin Server, Managed Servers and Oracle HTTP Server. The provided docker-compose script will take all the defined variables from the setenv.sh script and push them into to the to-be created Container, so that at the beginning mentioned script-set for creating the Domain for Forms & Reports can use them.
For fans of the new feature Forms Application Deployment Services (FADS), which is available from release 12.2.1.3.0 going. I have also implemented a pre-configuration task within the Domain creation for FADS, so that you just need later on, when your Container is running, to execute the fads_config.py script to get your FADS functionality. 

In case something goes wrong during the Domain creation, you can easily wipe out your half-Docker Container with "docker rm frfmw" and dont forget to cleanup below your defined volume ($DC_USERHOME/user_projects) potentially created directories like domains or applications. And then you can restart with the docker-compose your creation of the Docker Container.

The last step is, after a successful build of the Docker Container, to start the Container. For this you can use the command "docker start frfmw" and thats all ...

I will regularly update or enhance my Docker solution for Oracle Forms & Reports, so check out my GitHub Repository (https://github.com/DirkNachbar/Docker) from time to time. Or if you have some specific needs, just drop me a message here or give me a message in Twitter (https://twitter.com/DirkNachbar) or create a Issue on the GitHub Repository.

Last words: even when Oracle tells you, something is not possible, mostly it is ;-)

I hope you will enjoy and use my Docker solution for Oracle Forms & Reports ;-) 


Tuesday, December 5, 2017

Oracle Forms & Reports 12.2.1.3.0 with FADS in Docker

The next release of my Oracle Forms & Reports 12.2.1.3.0 Docker solution is now containing an option on running the Oracle Forms Application Deployment Services (FADS) within the Docker container.

The source code can be found under my personal GitHub Repository: https://github.com/DirkNachbar/Docker

Feel free to get a copy and enjoy playing around with Oracle Forms Application Deployment Services (FADS) under a Docker container.





Friday, December 1, 2017

Oracle Forms & Reports 12.2.1.3.0 in Docker

After I published yesterday my Docker solution for Oracle Forms & Reports 12.2.1.2.0, I received several question, if and when there will be a Docker solution for Oracle Forms & Reports 12.2.1.3.0.

Here we go, I spent once again some time and created the necessary Docker files and uploaded them to my GitHub Repository https://github.com/DirkNachbar/Docker

Now the above referenced Repository contains the necessary Docker files and docker-compose files for building Oracle Forms & Reports 12.2.1.2.0 and Oracle Forms & Reports 12.2.1.3.0.



In the README.md you will find two main sections, "How to build Oracle Forms & Reports 12.2.1.2.0" https://github.com/DirkNachbar/Docker#how-to-build-oracle-forms--reports-122120 and "How to build Oracle Forms & Reports 12.2.1.3.0" https://github.com/DirkNachbar/Docker#how-to-build-oracle-forms--reports-122130

Feel free to grab a copy of my Repository and enjoy Oracle Forms & Reports under Docker ;-)

Thursday, November 30, 2017

Oracle Forms & Reports 12.2.1.2.0 in Docker

As Robert Crames and me has developed some times ago a script set to install and configure Oracle Forms & Reports 12.2.1.2.0 completely silent and unattended, the next step was for me to port this all to Docker ;-)


Oracle has a really good GitHub Repository (https://github.com/oracle/docker-images) with several Oracle Products, but no Docker Image for Oracle Forms & Reports :-(

So I spent some time and managed to port our above mentioned script set for Oracle Forms & Reports 12.2.1.2.0 to build a Docker image for Oracle Forms & Reports.

The complete set of Docker build files and a docker-compose sample can be found under my GitHub Repository https://github.com/DirkNachbar/Docker

My solution is mainly based on Oracle Images, but very modified:

  • OracleJava:
    • instead of pulling an oraclelinux:7-slim, I am using an oraclelinux:latest.
    • instead of using an Oracle Server JRE, I am using an Oracle JDK 
  • OracleFMWInfrastructure:
    • within this Image, which is based on the above OracleJava Image, I am installing all required RPM's for Oracle Forms & Reports, eg. motif, compat-libstdc++-33 and so on and implementing the libXm.so fix directly for Oracle Reports
  • OracleFormsReports:
    • this is completely new developed by me. This installs on top of the OracleFMWInfrastructure Image the Oracle Forms & Reports 12.2.1.2.0 Software
    • with a sample docker-compose file you can create a required Oracle Database based on the Oracle Database Image https://github.com/oracle/docker-images/tree/master/OracleDatabase for the Metadata Repository and you can create the Oracle Forms & Reports 12.2.1.2.0 Domain including configuration of an Oracle HTTP Server and an Oracle Reports Server
    • The storage location for the Oracle Database Files will be a volume on your Docker host and also the storage location for the $DOMAIN_HOME of the Oracle Forms & Reports 12.2.1.2.0 Domain will be a volume on your Docker host.
      • With the usage of the volume on your Docker host, you are able to modify all Oracle Forms & Reports configuration files. E.g. formsweb.cfg, rwserver.conf and so on directly on your Docker host
I will regularly update my Repository, next ToDo is to provide Docker Images for Oracle Forms & Reports 12.2.1.3.0


So, feel free to pull my GitHub Repository and play around with my solution ;-) any comments, feature requests are welcome, just drop me a comment here ...

Update 1st December 2017: As I received several questions, if and when Oracle Forms & Reports 12.2.1.3.0 in Docker will be available in my GitHub Repository, I spent some time on it and here we go http://dirknachbar.blogspot.ch/2017/12/oracle-forms-reports-122130-in-docker.html


Tuesday, November 7, 2017

AdminServer under WebLogic 12.2.1.2.0 consumes more than defined -Xmx

In case you are observing that your AdminServer under Oracle WebLogic Server 12.2.1.2.0 consumes a lot more memory than your defined -Xmx size, you may hit the Oracle Bug 25665727.

In order to valid this, you just need to perform following steps, connect to your Server on which is running your WebLogic Server with your AdminServer.

Check the current defined -Xmx size

 ps -ef | grep AdminServer
oracle   12793 12738  0 Nov01 ?        00:23:22 /u00/app/oracle/product/java/current/bin/java -server -Xms768m -Xmx1536m -XX:PermSize=256m -XX:MaxPermSize=1024m -Dweblogic.Name=AdminServer -Djava.security.policy= . . .

Now valid with the top command the current RES size

# top -p <pid from above ps command>
top -p 12793

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
12793 oracle    20   0 9479852 6.187g   9908 S 0.000 19.69  23:22.72 java

As you can see, the RES size is 6.187 GB, which is around 4.6 GB more that the defined -Xmx size after an uptime of around 6 days !!

The next step is to take a heap dump with jmap

# jmap -dump:format=b,file=<file_name>.bin <PID from above ps command>
jmap -dump:format=b,file=AdminServer.bin 12793

Next transfer the AdminServer.bin file to your Desktop and open it with Eclipse Memory Analyzer (Eclipse MAT) https://www.eclipse.org/mat/

Under the option Actions you will find the menu "Duplicate Classes: Detect Classes loaded by multiple class loaders"


Click the menu "Duplicate Classes: Detect Classes loaded by multiple class loaders":


In case you will find a high count of CIE classes (oracle.com.cie.servicetable.impl.*), you are hitting the Bug 25665727.

Just download the Patch 25665727 https://updates.oracle.com/download/25665727.html and apply the Patch to your WebLogic Server Software Home.



Tuesday, October 24, 2017

Manually rotate WebLogic Server Logfiles

From time to time you have the requirement to rotate the WebLogic Server Logfiles manually on the fly without stopping the WebLogic Managed Servers or AdminServer, for example while you perform some load tests in order to have fresh WebLogic Server Logfiles.

Here is a small Python Script, which rotates the WebLogic Server Logfiles for a list of given Managed Servers and AdminServer.

You will need:
  • rotatelogs.py = Python Script which rotates the Logfiles
  • domain.properties = Property File for the required connect data to the Admin Server of your WebLogic Domain
The rotatelogs.py Python Script will read the Property File (parameter -props) in order to get the necessary data for the connect to the Admin Server of your WebLogic Server Domain and will loop through your provided list of Servers (parameter -servers) and force a rotating of the logfiles. The list of Servers (parameter -servers) can accept multiple Servers delimited by ":".

domain.properties

# Align the values for your settings
admin.url=localhost:7001
admin.userName=weblogic
admin.password=welcome01

rotatelogs.py

# ============================================================
#
# Script: rotatelogs.py
#
# Author: Dirk Nachbar, https/dirknachbar.blogspot.ch
#
# Purpose: Rotates the WebLogic Server Logfiles for a list
#          of given Servers, either AdminServer or Managed Servers
#
# ============================================================

# Imports 
import sys
from java.io import File
from java.io import FileOutputStream
from java.io import FileInputStream

servers_list=''
configfile=''

def helpUsage():
    print 'Usage: rotatelogs.py -help'
    print '          [-servers] list of Servers, delimited by :'
    print '          [-props] properties file for connect to AdminServer'
    print 'E.g.:  wlst.sh rotatelogs.py -servers DEMOMS1:DEMOMS2 -props /home/oracle/domain.properties'
    exit()

def connectAdmin():
    connect(adminUserName,adminPassword,adminURL)

for i in range(len(sys.argv)):
    if sys.argv[i] == "-help":
        helpUsage()
    elif sys.argv[i] == "-servers":
        if i+1 < len(sys.argv):
            servers_list = sys.argv[i+1]
    elif sys.argv[i] == "-props":
        if i+1 < len(sys.argv):
            configfile = sys.argv[i+1]

if len(servers_list)==0 or len(configfile)==0:
    print 'Missing required arguments (-servers, -props)'
    print ''
    helpUsage()

propInputStream = FileInputStream(configfile)
configProps = Properties()
configProps.load(propInputStream)
adminURL=configProps.get("admin.url")
adminUserName=configProps.get("admin.userName")
adminPassword=configProps.get("admin.password")

connectAdmin()

domainRuntime()

servers=servers_list.split(":")

for server in servers:
    print '================================================'
    print 'Current Server: ' +server
    cd('/ServerRuntimes/'+server+'/ServerLogRuntime/'+server)
    print 'Rotating Logfile for Server: ' +server
    cmo.forceLogRotation()
    print '================================================'

Create the 2 above given files on your Server hosting the Oracle WebLogic Domain, align the domain.properties file with your settings, connect to your Server with the Oracle Software User and execute the script as following:

oracle@server> $ORACLE_HOME/oracle_common/common/bin/wlst.sh rotatelogs.py -props domain.properties -servers DEMOMS1:DEMOMS2
Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Connecting to t3://localhost:7001 with userid weblogic ...
Successfully connected to Admin Server "DemoAdminServer" that belongs to domain "demo_domain".

Warning: An insecure protocol was used to connect to the server. 
To ensure on-the-wire security, the SSL port or Admin port should be used instead.

Location changed to domainRuntime tree. This is a read-only tree 
with DomainMBean as the root MBean. 
For more help, use help('domainRuntime')

================================================
Current Server: DEMOMS1
Rotating Logfile for Server: DEMOMS1
================================================
================================================
Current Server: DEMOMS2
Rotating Logfile for Server: DEMOMS2
================================================

Happy rotating of WebLogic Server Logfiles . . .

Thursday, October 12, 2017

Changing Logfiles Permission of WebLogic and Node Manager Logfiles to 644

In some cases you will need to align the Logfile permissions of the Oracle WebLogic Server (12.2.1.1 and 12.2.1.2) and Node Manager generated Logfiles to 644 (-rw-r--r--), so that for example Monitoring Tools like Patrol can access and monitor the WebLogic Server Logfiles with another OS user as the Oracle Software Installation user.

Just take a look on the Start Script startWebLogic.sh under your $DOMAIN_HOME/bin and the startNodeManager.sh under $ORACLE_HOME/wlserver/server/bin. Within these 2 Start Scripts you will find each a line defining the umask with 027.

# Snippet from $ORACLE_HOME/wlserver/server/bin/startNodeManager.sh

. . .
# Set user-defined variables.
unset JAVA_VM MEM_ARGS

umask 027


mypwd="$(pwd)"
. . .

# Replace the line "umask 027" with "umask 022"

. . .
# Set user-defined variables.
unset JAVA_VM MEM_ARGS

umask 022


mypwd="$(pwd)"
. . .

# Snippet from $DOMAIN_HOME/bin/startWebLogic.sh

. . .
umask 027


mypwd="$(pwd)"
. . .

# Replace the line "umask 027" with "umask 022"

. . .
umask 022


mypwd="$(pwd)"
. . .

When you startup now your Node Manager and your WebLogic Server Domain, your Logfiles will still have the permissions "-rw-r-----" :-(

That's a known bug, for Oracle WebLogic Server 12.2.1.1.0 and 12.2.1.2.0 just apply the Patch 24794915.



After you applied the patch, you will get the required permissions with "-rw-r--r--".
Under Oracle WebLogic Server 12.2.1.3.0 the bug is already fixed and you don't need to apply any patch for the umask problem.


Tuesday, October 10, 2017

ODC Appreciation Day: Oracle GitHub Docker Images and Oracle Container Registry

It's time again for the ODC Appreciation Day (formerly known as OTN Appreciation Day) driven by Tim Hall.

My personal favorite this year are the Oracle GitHub Docker Images and the Oracle Container Registry.

The Oracle GitHub Docker Images (https://github.com/oracle/docker-images) are the "Community Version" provided by Oracle. So in order to use them you will need to download upfront the required Installation Software from OTN or Oracle Software Delivery Cloud.

Under the Oracle GitHub Docker Images you can find a wide range of Ready-To-Use Docker Images for nearly all the main products of Oracle:

  • Oracle WebLogic
  • Oracle Fusion Middleware Infrastructure
  • Oracle Java
  • Oracle Database
  • Oracle SOA Suite
  • and so on

The great thing about is, that you can easily start by using simple architectures, e.g. a single Oracle WebLogic Domain and learn how to build Docker Images.
In the next step you can extend the provided Dockerfiles with your own stuff/needs or use more complex architectures like Oracle WebLogic Cluster.

The Oracle GitHub Docker Images are quite frequently updated, corrected and extended by several Oracle people, e.g. Bruno Borges and Gerald Venzl. For example under the Section OracleWebLogic you can even find Dockerfiles the latest Release of Oracle WebLogic Server 12.2.1.3.0.


On top you can even find Workshop materials within the Oracle GitHub Docker Images, e.g. Workshop for Creating Docker Images for Oracle WebLogic.



On the other hand you have the Oracle Container Registry (https://container-registry.oracle.com) which is a kind of "Official Source". They are containing complete Docker Images, so you dont need to download any Installation Software from Oracle Technology Network or Oracle Software Delivery Cloud, just simply pull your required Docker images. 



If any body is interested to know more about Docker Images or got some specific questions or problems, a good starting point is the Oracle Community Forum "OTN Docker Space" https://community.oracle.com/community/server_&_storage_systems/containers.

Happy ODC Appreciation Day to everyone :-)

Friday, September 29, 2017

Configure Oracle Reports 12c (12.2.x) for destype=file

I currently had in a project a request, that Oracle Reports should be generated with the option destype=file to a specific location on the server which is hosting the Oracle Forms & Reports 12c environment.

Since Oracle Forms & Reports 12c, the so called "File System Access Control" is enabled by default, so any request like http://<server>:<Port_of_ManagedServer_Reports>/reports/rwservlet?report=test.rdf&userid=test/test@db1&destype=file&desformat=pdf&desname=/u00/app/oracle/demo_app/rep_output/test.pdf&server=rep_server1 will fail:

When you check the corresponding log files for your Reports Server you will find following:

cd $DOMAIN_HOME/servers/<ReportsServerName>/logs
vi rwEng-0_diagnostic.log

[2017-09-29T10:27:14.058+02:00] [reports] [INCIDENT_ERROR] [REP-69] [oracle.reports.engine] [tid: 12] [ecid: 0000LvCjcD33n3WjLxjO8A1PnW5h000008,0:1:100000001] [EngineName: rwEng-0] REP-69 : An internal error occurred[[
REP-56133: Access is denied to write to the specified location.

oracle.reports.RWException: IDL:oracle/reports/RWException:1.0
        at oracle.reports.engine.EngineImpl.run(EngineImpl.java:553)
        at oracle.reports.engine.EngineClassPOA._invoke(EngineClassPOA.java:104)
        at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:654)
        at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:205)
        at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1700)
        at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1558)
        at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:940)
        at com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:198)
        at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:712)
        at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:471)
        at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1230)
        at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:490)
        at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:519)

]]
[2017-09-29T10:27:14.058+02:00] [reports] [NOTIFICATION] [] [oracle.reports.engine] [tid: 12] [ecid: 0000LvCjcD33n3WjLxjO8A1PnW5h000008,0:1:100000001] [EngineName: rwEng-0] EngineImpl:run  oracle.reports.RWException: IDL:oracle/reports/RWException:1.0

You simply have to edit your rwserver.conf of your Reports Server and add the required folderAccess option within your engine. The required folderAccess option looks like that:

# Single Target Directory
      <folderAccess>
          <write>Target_Directory</write>
      </folderAccess>

# Multiple Target Directories are separated with semi-colon
      <folderAccess>
          <write>Target_Directory1;Target_Directory2</write>
      </folderAccess>


Example:

cd $DOMAIN_HOME/config/fmwconfig/components/ReportsServerComponent/<ReportsServerName>
vi rwserver.conf

<?xml version = '1.0' encoding = 'ISO-8859-1'?>
<server  
    xmlns="http://xmlns.oracle.com/reports/server"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    
    >

   <cache class="oracle.reports.cache.RWCache">
      <property name="cacheSize" value="50"/>
      <property name="cacheDir" value="/u00/app/oracle/demo_app/tmp"/>
      <!--property name="maxCacheFileNumber" value="max number of cache files"/-->
   </cache>
   <!--Please do not change the id for reports engine.-->
   <!--The class specifies below is subclass of _EngineClassImplBase and implements EngineInterface.-->
   <engine id="rwEng" class="oracle.reports.engine.EngineImpl" maxEngine="5" minEngine="2" engLife="50" >
      <property name="sourceDir" value="/u00/app/oracle/demo_app/reports"/>
      <property name="tempDir" value="/u00/app/oracle/demo_app/tmp"/>
      <!--property name="keepConnection" value="yes"/-->
      <folderAccess>
          <write>/u00/app/oracle/demo_app/rep_output</write>
      </folderAccess>
   </engine>
   <engine id="rwURLEng" class="oracle.reports.urlengine.URLEngineImpl" maxEngine="1" minEngine="0" engLife="50" />

   <security id="rwJaznSec" class="oracle.reports.server.RWJAZNSecurity"/>
. . .
. . .

After the above changes, you need to stop and start your Reports Server

cd $DOMAIN_HOME/bin
./stopComponent.sh <ReportsServerName>
./startComponent.sh <ReportsServerName> 

# e.g.:
./stopComponent.sh rep_server1
./startComponent.sh rep_server1

Now you can re-run the URL request http://<server>:<Port_of_ManagedServer_Reports>/reports/rwservlet?report=test.rdf&userid=test/test@db1&destype=file&desformat=pdf&desname=/u00/app/oracle/demo_app/rep_output/test.pdf&server=rep_server1 and your PDF named test.pdf will be generated under your target directory you defined in the URL with parameter desname.


Now, lets take the stuff one level upper :-) in some case you will have different sub directories below in which you want to generate your Reports. To list them all by semi-colon separated under the folderAccess parameter is not really my personal goal, so lets try it with wildcard:

# Target Directory with wildcard for sub directories
      <folderAccess>
          <write>Target_Directory/*</write>
      </folderAccess>

In my corresponding rwserver.conf it would look like that:

<?xml version = '1.0' encoding = 'ISO-8859-1'?>
<server  
    xmlns="http://xmlns.oracle.com/reports/server"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    
    >

   <cache class="oracle.reports.cache.RWCache">
      <property name="cacheSize" value="50"/>
      <property name="cacheDir" value="/u00/app/oracle/demo_app/tmp"/>
      <!--property name="maxCacheFileNumber" value="max number of cache files"/-->
   </cache>
   <!--Please do not change the id for reports engine.-->
   <!--The class specifies below is subclass of _EngineClassImplBase and implements EngineInterface.-->
   <engine id="rwEng" class="oracle.reports.engine.EngineImpl" maxEngine="5" minEngine="2" engLife="50" >
      <property name="sourceDir" value="/u00/app/oracle/demo_app/reports"/>
      <property name="tempDir" value="/u00/app/oracle/demo_app/tmp"/>
      <!--property name="keepConnection" value="yes"/-->
      <folderAccess>
          <write>/u00/app/oracle/demo_app/rep_output/*</write>
      </folderAccess>
   </engine>
   <engine id="rwURLEng" class="oracle.reports.urlengine.URLEngineImpl" maxEngine="1" minEngine="0" engLife="50" />

   <security id="rwJaznSec" class="oracle.reports.server.RWJAZNSecurity"/>
. . .
. . .

After the above changes, restart your Reports Server once again in order to catch the changed rwserver.conf changes.

Under the target directory /u00/app/oracle/demo_app/rep_output I have 2 sub directories called out1 and out2. So lets try to set the desname parameter in the URL call to desname=/u00/app/oracle/demo_app/rep_output/out1/test.pdf
The result will be:


:-( but no worries, just download the patch 22334822 https://updates.oracle.com/download/22334822.html. The patch is available for following Releases:

  • Oracle Reports 12.2.1.0.0
  • Oracle Reports 12.2.1.1.0
  • Oracle Reports 12.2.1.2.0


Simply apply this patch to your Oracle Forms & Reports installation:

# Stop your complete Oracle Forms & Reports Environment
# All Reports Servers, Oracle HTTP Server (OHS), Managed Servers, Admin Server and Node Manager

# unzip the patch and navigate to the sub directory 22334822
unzip p22334822_122120_Generic.zip
cd 22334822
$ORACLE_HOME/OPatch/opatch apply
Oracle Interim Patch Installer version 13.9.1.0.0
Copyright (c) 2017, Oracle Corporation.  All rights reserved.


Oracle Home       : /u00/app/oracle/product/fmw-fr-12.2.1.2.0
Central Inventory : /u00/app/oraInventory
   from           : /u00/app/oracle/product/fmw-fr-12.2.1.2.0/oraInst.loc
OPatch version    : 13.9.1.0.0
OUI version       : 13.9.1.0.0
Log file location : /u00/app/oracle/product/fmw-fr-12.2.1.2.0/cfgtoollogs/opatch/opatch2017-09-29_14-50-57PM_1.log

OPatch detects the Middleware Home as "/u00/app/oracle/product/fmw-fr-12.2.1.2.0"

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

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u00/app/oracle/product/fmw-fr-12.2.1.2.0')

Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '22334822' to OH '/u00/app/oracle/product/fmw-fr-12.2.1.2.0'

Patching component oracle.reports.core, 12.2.1.2.0...
Patch 22334822 successfully applied.
Log file location: /u00/app/oracle/product/fmw-fr-12.2.1.2.0/cfgtoollogs/opatch/opatch2017-09-29_14-50-57PM_1.log

OPatch succeeded.

# Afterwards validate that the patch is applied
$ORACLE_HOME/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 13.9.1.0.0
Copyright (c) 2017, Oracle Corporation.  All rights reserved.

. . .
. . .

Interim patches (9) :

Patch  22334822     : applied on Fri Sep 29 14:51:09 CEST 2017
Unique Patch ID:  20728353
Patch description:  "One-off"
   Created on 1 Nov 2016, 01:05:08 hrs PST8PDT
   Bugs fixed:
     22334822

. . .
. . .

Now, just startup your complete Oracle Forms & Reports Environment and you can even use the wildcard option with the folderAccess parameter.

In case you are already on Oracle Forms & Reports 12.2.1.3.0, you are lucky the patch 22334822 is already included and you can use directly the wildcard option :-)

Wednesday, September 20, 2017

Decrypt any encrypted password in your WebLogic Server Domain

It happens regularly, that you configure a WebLogic Domain and you forgot after some time the given password for the WebLogic Administration User or you have configured a JDBC Data Source and you forgot the password of the used Oracle Database User.

All you need is following small Python Script called decrypt.py:

#/bin/python
#=====================================================================
#
# $Id: decrypt.py $
#
# PURPOSE:    Script to decrypt any Password or Username 
#             within a WebLogic Server Domain
#
# PARAMETERS: none
#
# NOTES:      none
#
# AUTHOR:     Dirk Nachbar, https://dirknachbar.blogspot.com
#
# MODIFIED:
#
#
#=====================================================================

# Import weblogic.security.internal and weblogic.security.internal.encryption
from weblogic.security.internal import *
from weblogic.security.internal.encryption import *

# Provide Domain Home Location
domain = raw_input("Provide Domain Home location: ")

# Get encryption service with above Domain Home Location
encryptService = SerializedSystemIni.getEncryptionService(domain)
clearOrEncryptService = ClearOrEncryptedService(encryptService)

# Provide the encrypted password or username, e.g. from boot.properties
encrypted_pwd = raw_input("Provide encrypted password or username (e.g.: {AES}jNdVLr...): ")

# Clear the encrypted value from escaping characters
cleared_pwd = encrypted_pwd.replace("\\", "")

# Personal security hint :-)
raw_input("Make sure that nobody is staying behind you :-) Press ENTER to see the password ...")

# Decrypt the encrypted password or username
print "Value in cleartext is: " + clearOrEncryptService.decrypt(cleared_pwd)


Let's say you will need the password from your WebLogic Administration user, which is present in your boot.properties file under $DOMAIN_HOME/servers/<AdminServerName>/security

cd $DOMAIN_HOME/servers/AdminServer/security
cat boot.properties

#Tue Sep 05 14:05:32 CEST 2017
password={AES}hjP+5eQrx8j6S6b5JRdluvACHjtov3vo3pQ10c+h/Pg\=
username={AES}bHAMPwpk4izstmC7RW3K0jjQK4h4WlNEGu17LqRKYaE\=

Now start the script with your wlst.sh from $ORACLE_HOME/oracle_common/common/bin, provide your DOMAIN_HOME directory and provide the encrypted password.

$ORACLE_HOME/oracle_common/common/bin/wlst.sh decrypt.py

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Provide Domain Home location: /u00/app/oracle/user_projects/domains/demo_domain
Provide encrypted password (e.g.: {AES}jNdVLr...): {AES}hjP+5eQrx8j6S6b5JRdluvACHjtov3vo3pQ10c+h/Pg\=
Make sure that nobody is staying behind you :-) Press ENTER to see the password ...
Value in cleartext is: Oracle12c

The same works with encrypted passwords in your JDBC Data Source configuration file.

cat $DOMAIN_HOME/config/jdbc/testDS*.xml | grep password-encrypted
    {AES}xYk2xRXa5DzyCK/qC0TZJ+bsxWiGIxMDtiVWMstJxD0=

# Now execute the decrypt.py
$ORACLE_HOME/oracle_common/common/bin/wlst.sh decrypt.py

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Provide Domain Home location: /u00/app/oracle/user_projects/domains/demo_domain
Provide encrypted password (e.g.: {AES}jNdVLr...): {AES}xYk2xRXa5DzyCK/qC0TZJ+bsxWiGIxMDtiVWMstJxD0=
Make sure that nobody is staying behind you :-) Press ENTER to see the password ...
Value in cleartext is: Test12c

So, you don't have to rebuild your Oracle WebLogic Domain when you lost your WebLogic Admin User Password.

Happy decrypting :-)

Tuesday, September 19, 2017

Oracle Installer fails with [EXCEPTION]:java.lang.reflect.InvocationTargetException under RedHat 7.4

I recently had a customer with a fresh installed RedHat 7.4 system on which we wanted to install different Oracle Software in graphical mode, like Oracle Database 12.1.0.2.0, Oracle WebLogic Server 12.2.1.3.0 and Oracle Data Integrator 12.2.1.3.0.

Following error occured when we were starting the Oracle Installers, either runInstaller or java -jar fmw_12.2.1.3.0_odi.jar:

export JAVA_HOME=/u00/app/oracle/product/jdk1.8.0_131
export PATH=$JAVA_HOME/bin:$PATH
cd /u00/app/oracle/install
java -jar fmw_12.2.1.3.0_odi.jar
Launcher log file is /tmp/OraInstall2017-09-19_09-12-33AM/launcher2017-09-19_09-12-33AM.log.
Extracting the installer . . . . . . . . Done
Checking if CPU speed is above 300 MHz.   Actual 3191.776 MHz    Passed
Checking monitor: must be configured to display at least 256 colors.   Actual 16777216    Passed
Checking swap space: must be greater than 512 MB.   Actual 8191 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 5139 MB    Passed
Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2017-09-19_09-12-33AM
Log: /tmp/OraInstall2017-09-19_09-12-33AM/install2017-09-19_09-12-33AM.log
java.lang.ArrayIndexOutOfBoundsException: 0
        at sun.font.CompositeStrike.getStrikeForSlot(CompositeStrike.java:75)
        at sun.font.CompositeStrike.getFontMetrics(CompositeStrike.java:93)
        at sun.font.FontDesignMetrics.initMatrixAndMetrics(FontDesignMetrics.java:359)
        at sun.font.FontDesignMetrics.<init>(FontDesignMetrics.java:350)
        at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:302)
        at sun.swing.SwingUtilities2.getFontMetrics(SwingUtilities2.java:1113)
        at javax.swing.JComponent.getFontMetrics(JComponent.java:1626)
        at javax.swing.text.GlyphPainter1.sync(GlyphPainter1.java:226)
        at javax.swing.text.GlyphPainter1.getSpan(GlyphPainter1.java:59)
        at javax.swing.text.GlyphView.getPreferredSpan(GlyphView.java:592)
        at javax.swing.text.FlowView$LogicalView.getPreferredSpan(FlowView.java:732)
        at javax.swing.text.FlowView.calculateMinorAxisRequirements(FlowView.java:233)
        at javax.swing.text.ParagraphView.calculateMinorAxisRequirements(ParagraphView.java:717)
        at javax.swing.text.html.ParagraphView.calculateMinorAxisRequirements(ParagraphView.java:157)
        at javax.swing.text.BoxView.checkRequests(BoxView.java:935)
        at javax.swing.text.BoxView.getMinimumSpan(BoxView.java:568)
        at javax.swing.text.html.ParagraphView.getMinimumSpan(ParagraphView.java:270)
        at javax.swing.text.BoxView.calculateMinorAxisRequirements(BoxView.java:903)
        at javax.swing.text.html.BlockView.calculateMinorAxisRequirements(BlockView.java:146)
        at javax.swing.text.BoxView.checkRequests(BoxView.java:935)
        at javax.swing.text.BoxView.getMinimumSpan(BoxView.java:568)
        at javax.swing.text.html.BlockView.getMinimumSpan(BlockView.java:378)
        at javax.swing.text.BoxView.calculateMinorAxisRequirements(BoxView.java:903)
        at javax.swing.text.html.BlockView.calculateMinorAxisRequirements(BlockView.java:146)
        at javax.swing.text.BoxView.checkRequests(BoxView.java:935)
        at javax.swing.text.BoxView.getPreferredSpan(BoxView.java:545)
        at javax.swing.text.html.BlockView.getPreferredSpan(BlockView.java:362)
        at javax.swing.plaf.basic.BasicHTML$Renderer.<init>(BasicHTML.java:383)
        at javax.swing.plaf.basic.BasicHTML.createHTMLView(BasicHTML.java:67)
        at javax.swing.plaf.basic.BasicHTML.updateRenderer(BasicHTML.java:207)
        at javax.swing.plaf.basic.BasicLabelUI.propertyChange(BasicLabelUI.java:417)
        at oracle.bali.ewt.olaf2.OracleLabelUI.propertyChange(OracleLabelUI.java:53)
        at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
        at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327)
        at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263)
        at java.awt.Component.firePropertyChange(Component.java:8428)
        at javax.swing.JLabel.setText(JLabel.java:330)
        at oracle.as.install.engine.modules.presentation.ui.common.label.ModifiedJLabel.setText(ModifiedJLabel.java:183)
        at oracle.as.install.engine.modules.presentation.ui.screens.WelcomeWindow.jbInit(WelcomeWindow.java:309)
        at oracle.as.install.engine.modules.presentation.ui.screens.WelcomeWindow.<init>(WelcomeWindow.java:112)
        at oracle.as.install.engine.modules.presentation.action.LaunchWelcomeWindowAction.execute(LaunchWelcomeWindowAction.java:86)
        at oracle.as.install.engine.modules.presentation.util.ActionQueue.run(ActionQueue.java:70)
        at oracle.as.install.engine.modules.presentation.PresentationModule.prepareAndRunActions(PresentationModule.java:281)
        at oracle.as.install.engine.modules.presentation.PresentationModule.launchModule(PresentationModule.java:235)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at oracle.as.install.engine.InstallEngine.launchModule(InstallEngine.java:580)
        at oracle.as.install.engine.InstallEngine.processAndLaunchModules(InstallEngine.java:522)
        at oracle.as.install.engine.InstallEngine.startOperation(InstallEngine.java:471)
        at oracle.sysman.oio.oioc.OiocOneClickInstaller.main(OiocOneClickInstaller.java:717)
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at oracle.as.install.engine.InstallEngine.launchModule(InstallEngine.java:580)
        at oracle.as.install.engine.InstallEngine.processAndLaunchModules(InstallEngine.java:522)
        at oracle.as.install.engine.InstallEngine.startOperation(InstallEngine.java:471)
        at oracle.sysman.oio.oioc.OiocOneClickInstaller.main(OiocOneClickInstaller.java:717)
Caused by: java.lang.ExceptionInInitializerError
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
        at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
        at javax.swing.UIDefaults.getUI(UIDefaults.java:769)
        at javax.swing.UIManager.getUI(UIManager.java:1016)
        at javax.swing.JComboBox.updateUI(JComboBox.java:266)
        at javax.swing.JComboBox.init(JComboBox.java:231)
        at javax.swing.JComboBox.<init>(JComboBox.java:183)
        at oracle.help.DefaultNavigatorPanel$MinimumSizedComboBox.<init>(DefaultNavigatorPanel.java:791)
        at oracle.help.DefaultNavigatorPanel.<init>(DefaultNavigatorPanel.java:106)
        at oracle.help.Help._initHelpSystem(Help.java:1045)
        at oracle.help.Help.<init>(Help.java:243)
        at oracle.help.Help.<init>(Help.java:200)
        at oracle.help.Help.<init>(Help.java:125)
       at oracle.as.install.engine.modules.presentation.ui.common.help.WizardHelpManager.configure(WizardHelpManager.java:77)
        at oracle.as.install.engine.modules.presentation.action.WizardHelpConfigAction.execute(WizardHelpConfigAction.java:246)
        at oracle.as.install.engine.modules.presentation.util.ActionQueue.run(ActionQueue.java:70)
        at oracle.as.install.engine.modules.presentation.PresentationModule.prepareAndRunActions(PresentationModule.java:281)
        at oracle.as.install.engine.modules.presentation.PresentationModule.launchModule(PresentationModule.java:235)
        ... 8 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
        at sun.font.CompositeStrike.getStrikeForSlot(CompositeStrike.java:75)
        at sun.font.CompositeStrike.getFontMetrics(CompositeStrike.java:93)
        at sun.font.FontDesignMetrics.initMatrixAndMetrics(FontDesignMetrics.java:359)
        at sun.font.FontDesignMetrics.<init>(FontDesignMetrics.java:350)
        at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:302)
        at sun.swing.SwingUtilities2.getFontMetrics(SwingUtilities2.java:1113)
        at javax.swing.JComponent.getFontMetrics(JComponent.java:1626)
        at javax.swing.text.PlainView.calculateLongestLine(PlainView.java:639)
        at javax.swing.text.PlainView.updateMetrics(PlainView.java:209)
        at javax.swing.text.PlainView.updateDamage(PlainView.java:527)
        at javax.swing.text.PlainView.insertUpdate(PlainView.java:451)
        at javax.swing.text.FieldView.insertUpdate(FieldView.java:293)
        at javax.swing.plaf.basic.BasicTextUI$RootView.insertUpdate(BasicTextUI.java:1610)
        at javax.swing.plaf.basic.BasicTextUI$UpdateHandler.insertUpdate(BasicTextUI.java:1869)
        at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:201)
        at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:748)
        at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:707)
        at javax.swing.text.PlainDocument.insertString(PlainDocument.java:130)
        at javax.swing.text.AbstractDocument.replace(AbstractDocument.java:669)
        at javax.swing.text.JTextComponent.setText(JTextComponent.java:1669)
        at javax.swing.JTextField.<init>(JTextField.java:243)
        at javax.swing.JTextField.<init>(JTextField.java:183)
        at com.jgoodies.looks.plastic.PlasticComboBoxUI.<clinit>(PlasticComboBoxUI.java:88)
        ... 33 more
[ERROR]: Installer has encountered an internal Error. Contact Oracle support with details
[EXCEPTION]:java.lang.reflect.InvocationTargetException

All required Linux Packages were present on the new RedHat 7.4 System and the JDK were the correct and certified Version.

The most interesting lines in the above error stack are:

java.lang.ArrayIndexOutOfBoundsException: 0
        at sun.font.CompositeStrike.getStrikeForSlot(CompositeStrike.java:75)
        at sun.font.CompositeStrike.getFontMetrics(CompositeStrike.java:93)
        at sun.font.FontDesignMetrics.initMatrixAndMetrics(FontDesignMetrics.java:359)
        at sun.font.FontDesignMetrics.<init>(FontDesignMetrics.java:350)
        at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:302)


RedHat comes with Release 7.4 (either fresh installed or updated) with the so called stix-fonts packages. This will change the default font Utopia to STIX, which is causing than finally the above error stack. This affects only Oracle Software installations in graphical mode, when you are installing your Oracle Software in silent mode you will not hit this Problem.

The solution is really simple, just create under /etc/fonts a file called local.conf with following content:

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
  <alias>
    <family>serif</family>
    <prefer><family>Utopia</family></prefer>
  </alias>
  <alias>
    <family>sans-serif</family>
    <prefer><family>Utopia</family></prefer>
  </alias>
  <alias>
    <family>monospace</family>
    <prefer><family>Utopia</family></prefer>
  </alias>
  <alias>
    <family>dialog</family>
    <prefer><family>Utopia</family></prefer>
  </alias>
  <alias>
    <family>dialoginput</family>
    <prefer><family>Utopia</family></prefer>
  </alias>
</fontconfig>

And now you can install your Oracle Software without any problems.

Friday, September 15, 2017

How to install and configure Oracle Traffic Director 12c - fully unattended

As I am not a fan of clicking through several Configuration Wizards, I am trying to script as much as possible.
Here is a fully unattended way of how to install and configure Oracle Traffic Director 12.2.1.3.0.

Following pre requirements are necessary:
  • you need a certified Linux Server, e.g. with Oracle Enterprise Linux 7.3
  • an oracle user on the Linux Server
  • all required packages as per documentation and the necessary kernel settings and so on
  • create an ORACLE_BASE, e.g. /u00/app/oracle
Now you need to create an install/stage directory under $ORACLE_BASE:

cd /u00/app/oracle
mkdir install

Now place in the above create following Software Installation files from Oracle Technology Network:

Copy all above listed files to your Linux Server under $ORACLE_BASE/install and extract the Oracle WebLogic Server Infrastructure Installer and the Oracle Traffic Director

cd /u00/app/oracle/install
unzip fmw_12.2.1.3.0_infrastructure_Disk1_1of1.zip
unzip fmw_12.2.1.3.0_otd_linux64_Disk1_1of1.zip

Next you need to create several files for the unattended installation and configuration:
  • setLocalEnv.sh: This file contains all the required variables for the installation and configuration
  • silent_jdk.sh: Performs the installation of the JDK 1.8 Update 144
  • silent_wls_infra.sh: Performs the installation of the Oracle WebLogic Server Infrastructure 12.2.1.3.0
  • respone_file_wls_infra.rsp: Response file for the WebLogic Server Infrastructure 12.2.1.3.0 installation
  • silent_otd.sh: Performs the installation of Oracle Traffic Director 12.2.1.3.0 on top of the Oracle WebLogic Server Infrastructure 12.2.1.3.0
  • response_file_otd.rsp: Response file for the Oracle Traffic Director 12.2.1.3.0 installation
  • oraInst.loc: contains the location of the Oracle Inventory, used by silent_wls_infra.sh and silent_otd.sh
  • crDomain.sh: Shell script wrapper for the configuration of the Oracle Traffic Director as "Collocated Installation", which means the Oracle Traffic Director will reside inside a WebLogic Domain with Restricted JRF, so no Oracle Metadata Repository is required
  • crDomain.py: Python Script for the Domain creation including generation of a sample Traffic Director Instance and Configuration
All the above mentioned files should be created under $ORACLE_BASE/install

setLocalEnv.sh
# Location to the directory in which the create Domain scripts are residing
export SCRIPT_HOME=$PWD

# Software Defintions
export JDK_SOURCE=jdk-8u144-linux-x64.tar.gz
export JDK_REL=jdk1.8.0_144

# Directories
export ORACLE_BASE=/u00/app/oracle
export INT_ORACLE_HOME=$ORACLE_BASE/product/fmw-otd-12.2.1.3.0
export WL_HOME=$INT_ORACLE_HOME/wlserver
export WLST_HOME=$INT_ORACLE_HOME/oracle_common/common/bin
export MW=$INT_ORACLE_HOME
export DOMAIN_BASE=$ORACLE_BASE/user_projects/domains
export APPLICATION_BASE=$ORACLE_BASE/user_projects/applications
export APP_VZ=$APPLICATION_BASE
export JAVA_HOME=$ORACLE_BASE/product/$JDK_REL

# Domain specific
export TEMPLATE=$WL_HOME/common/templates/wls/wls.jar
export DOMAIN_NAME=OTDDOMAIN

# AdminServer
export AS_NAME=${DOMAIN_NAME}AdminServer
export ADM_USER=weblogic
export ADM_PWD=welcome1
export ADMINPORT=7001 
export ADMINPORTSSL=7101
export AS_HOST=`hostname -f`
export MACHINE_NAME=`hostname -s`

# NodeManager
export NM_LISTENADDRESS=`hostname -f`
export NM_TYPE=SSL
export NM_PORT=5556
export NM_USERNAME=nodemanager
export NM_PWD=welcome1

# OTD Configuration
export OTD_CONFIGNAME=test
export OTD_SERVERNAME=myserver
export OTD_SERVERPORT=7777
export OTD_ORIGINSERVER=weblogic122130:7003

silent_jdk.sh
#!/bin/bash
#=====================================================================
#
# $Id: silent_jdk.sh $
#
# PURPOSE: Script to install JDK
#
# PARAMETERS: none
#
# NOTES:   setLocalEnv.sh must be present and aligned
#
# AUTHOR:  Dirk Nachbar, https://dirknachbar.blogspot.com
#
# MODIFIED:
#
#
#=====================================================================
 
source setLocalEnv.sh
 
mkdir -p ${ORACLE_BASE}/product/
cp ${JDK_SOURCE} ${ORACLE_BASE}/product/
cd ${ORACLE_BASE}/product/
gunzip ${JDK_SOURCE}
JDK_TAR=${JDK_SOURCE::-3}
tar -xvf ${JDK_TAR}
rm ${ORACLE_BASE}/product/${JDK_TAR}

silent_wls_infra.sh
#!/bin/bash
#=====================================================================
#
# $Id: silent_wls_infra.sh $
#
# PURPOSE: Script to install WebLogic Infrastructure
#
# PARAMETERS: none
#
# NOTES:   setLocalEnv.sh must be present and aligned
#
# AUTHOR:  Dirk Nachbar, https://dirknachbar.blogspot.com
#
# MODIFIED:
#
#
#=====================================================================
 
source setLocalEnv.sh
 
export PATH=$JAVA_HOME/bin:$PATH
 
java -jar fmw_12.2.1.3.0_infrastructure.jar -silent -responseFile ${SCRIPT_HOME}/response_file_wls_infra.rsp -jreLoc ${JAVA_HOME} -invPtrLoc ${SCRIPT_HOME}/oraInst.loc

reponse_file_wls_infra.rsp
[ENGINE]
#DO NOT CHANGE THIS.
Response File Version=1.0.0.0.0
[GENERIC]
#Set this to true if you wish to skip software updates
DECLINE_AUTO_UPDATES=true
#My Oracle Support User Name
MOS_USERNAME=
#My Oracle Support Password
MOS_PASSWORD=<SECURE VALUE>
#If the Software updates are already downloaded and available on your local system, then specify the path to the directory where these patches are available and set SPECIFY_DOWNLOAD_LOCATION to true
AUTO_UPDATES_LOCATION=
#Proxy Server Name to connect to My Oracle Support
SOFTWARE_UPDATES_PROXY_SERVER=
#Proxy Server Port
SOFTWARE_UPDATES_PROXY_PORT=
#Proxy Server Username
SOFTWARE_UPDATES_PROXY_USER=
#Proxy Server Password
SOFTWARE_UPDATES_PROXY_PASSWORD=<SECURE VALUE>
#The oracle home location. This can be an existing Oracle Home or a new Oracle Home
ORACLE_HOME=/u00/app/oracle/product/fmw-otd-12.2.1.3.0
#Set this variable value to the Installation Type selected. e.g. Fusion Middleware Infrastructure, Fusion Middleware Infrastructure With Examples.
INSTALL_TYPE=Fusion Middleware Infrastructure
#Provide the My Oracle Support Username. If you wish to ignore Oracle Configuration Manager configuration provide empty string for user name.
MYORACLESUPPORT_USERNAME=
#Provide the My Oracle Support Password
MYORACLESUPPORT_PASSWORD=<SECURE VALUE>
#Set this to true if you wish to decline the security updates. Setting this to true and providing empty string for My Oracle Support username will ignore the Oracle Configuration Manager configuration
DECLINE_SECURITY_UPDATES=true
#Set this to true if My Oracle Support Password is specified
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
#Provide the Proxy Host
PROXY_HOST=
#Provide the Proxy Port
PROXY_PORT=
#Provide the Proxy Username
PROXY_USER=
#Provide the Proxy Password
PROXY_PWD=<SECURE VALUE>
#Type String (URL format) Indicates the OCM Repeater URL which should be of the format [scheme[Http/Https]]://[repeater host]:[repeater port]
COLLECTOR_SUPPORTHUB_URL=


oraInst.loc
# Align the two values to your environment
inst_group=oinstall
inventory_loc=/u00/app/oracle/oraInventory

silent_otd.sh
#!/bin/bash
#=====================================================================
#
# $Id: silent_otd.sh $
#
# PURPOSE: Script to install Oracle Traffic Director
#           on top of existing WebLogic Server Infrastructure Installation
#
# PARAMETERS: none
#
# NOTES:   setLocalEnv.sh must be present and aligned
#
# AUTHOR:  Dirk Nachbar, https://dirknachbar.blogspot.com
#
# MODIFIED:
#
#
#=====================================================================
 
source setLocalEnv.sh
 
./fmw_12.2.1.3.0_otd_linux64.bin -silent -responseFile ${SCRIPT_HOME}/response_file_otd.rsp -jreLoc ${JAVA_HOME} -invPtrLoc ${SCRIPT_HOME}/oraInst.loc

response_file_otd.rsp
[ENGINE]
#DO NOT CHANGE THIS.
Response File Version=1.0.0.0.0
[GENERIC]
#Set this to true if you wish to skip software updates
DECLINE_AUTO_UPDATES=true
#My Oracle Support User Name
MOS_USERNAME=
#My Oracle Support Password
MOS_PASSWORD=<SECURE VALUE>
#If the Software updates are already downloaded and available on your local system, then specify the path to the directory where these patches are available and set SPECIFY_DOWNLOAD_LOCATION to true
AUTO_UPDATES_LOCATION=
#Proxy Server Name to connect to My Oracle Support
SOFTWARE_UPDATES_PROXY_SERVER=
#Proxy Server Port
SOFTWARE_UPDATES_PROXY_PORT=
#Proxy Server Username
SOFTWARE_UPDATES_PROXY_USER=
#Proxy Server Password
SOFTWARE_UPDATES_PROXY_PASSWORD=<SECURE VALUE>
#The oracle home location. This can be an existing Oracle Home or a new Oracle Home
ORACLE_HOME=/u00/app/oracle/product/fmw-otd-12.2.1.3.0
#Set this variable value to the Installation Type selected as either Standalone Forms Builder OR Forms and Reports Deployment
INSTALL_TYPE=Collocated OTD (Managed through WebLogic server)

crDomain.sh
#!/bin/bash
#=====================================================================
#
# $Id: crDomain.sh $
#
# PURPOSE: Script to call the Python Script crDomain.py
#
# PARAMETERS: none
#
# NOTES:   setLocalEnv.sh must be present and aligned
#
# AUTHOR:  Dirk Nachbar, https://dirknachbar.blogspot.com
#
# MODIFIED:
#
#
#=====================================================================

# set -x

# Set Start Time
start_time=$(date +%s)

echo ${DOMAIN_NAME}

source $PWD/setLocalEnv.sh

echo $ORACLE_HOME


function warten
{
echo " "
echo "ENTER to proceed ..."
read
echo "The Installation Process is started ..."
}

echo "======================================================================================"
echo " Program  : crDomain.sh                                                ........"
echo "======================================================================================"

if [ -z "${WLST_HOME}" ]; then
    echo "Environment not correctly set - please verify"
    exit 1
fi

if ! test -d "${DOMAIN_BASE}/${DOMAIN_NAME}"; then
   echo "=================================================="
   echo "Domain will be installed ..."
   echo "=================================================="
   if [  -z "${ADM_PWD}"  -o -z "${TEMPLATE}" -o -z "${ADMINPORT}" -o -z "${MW}" -o -z "${ADMINPORTSSL}" -o -z " ${DOMAIN_NAME}" ]; then
      echo "Environment not set - Exit"
      exit 1
   fi

   # In case we are facing problems with /dev/random
   export CONFIG_JVM_ARGS=-Djava.security.egd=file:/dev/./urandom:$CONFIG_JVM_ARGS

   ${WLST_HOME}/wlst.sh ${SCRIPT_HOME}/crDomain.py 

   mkdir -p  ${DOMAIN_BASE}/${DOMAIN_NAME}/servers/${AS_NAME}/security
   echo "username=${ADM_USER}" >  ${DOMAIN_BASE}/${DOMAIN_NAME}/servers/${AS_NAME}/security/boot.properties
   echo "password=${ADM_PWD}" >> ${DOMAIN_BASE}/${DOMAIN_NAME}/servers/${AS_NAME}/security/boot.properties

crDomain.py
#!/usr/bin/python

# Things to do:
# Log output in File via redirect()

import os, sys
v_asName=os.environ['AS_NAME']
v_asUser=os.environ['ADM_USER']
v_webpw=os.environ['ADM_PWD']
v_adminport=os.environ['ADMINPORT']
v_adminportssl=os.environ['ADMINPORTSSL']
v_domainName=os.environ['DOMAIN_NAME']
v_template=os.environ['TEMPLATE']
v_javaHome=os.environ['JAVA_HOME']
v_setup_domain_base=os.environ['DOMAIN_BASE']
v_setup_application_base=os.environ['APPLICATION_BASE']
v_OracleHome=os.environ['INT_ORACLE_HOME']
v_MachineName=os.environ['MACHINE_NAME']
v_nmListenAddress=os.environ['NM_LISTENADDRESS']
v_nmPort=os.environ['NM_PORT']
v_nmUserName=os.environ['NM_USERNAME']
v_nmPwd=os.environ['NM_PWD']
v_otdTemplate=os.environ['OTD_TEMPLATE']
v_otdConfigName=os.environ['OTD_CONFIGNAME']
v_otdServerPort=os.environ['OTD_SERVERPORT']
v_otdServerName=os.environ['OTD_SERVERNAME']
v_otdOriginServer=os.environ['OTD_ORIGINSERVER']

def printHeader(headerText):
    print "\n======================================================================================"
    print "--> "+headerText
    print "======================================================================================\n"

def printInfo(infoText):
    print "-->: "+infoText

printHeader("Started: crDomain.py")

printHeader("Step: Read default template (always wls.jar!!)")
readTemplate(v_template)
printInfo("Template: "+v_template+" successfully read")   

printHeader("Step: Prepare Domain --> Set Domain Name to "+v_domainName)
cd('/')
cmo.setName(v_domainName)
printInfo("Step: Set Domain Name --> Successful")

printHeader("Step: Prepare Domain --> Set User Password")
cd('/')
cd('/Security/'+v_domainName+'/User/'+v_asUser)
cmo.setPassword(v_webpw)
printInfo("Step: Set User Password --> Successful")

printHeader('Step: Prepare Domain --> Set AdminServer Name ('+v_asName+') and Port ('+v_adminport+')')
cd('/')
cd('/Server/AdminServer')
cmo.setName(v_asName)
cd('/')
cd('/Server/'+v_asName)
cmo.setListenPort(int(v_adminport))
printInfo("Step: Set AdminServer Name --> Successful")

printHeader("Step: Prepare Domain --> Set Domain Properties")
setOption('OverwriteDomain', 'true')
setOption('ServerStartMode','prod')
printInfo("Step: Set Domain Properties --> Successful")

printHeader("Step: Prepare Domain --> Align NodeManager")
cd('/NMProperties')
set('ListenAddress',v_nmListenAddress)
set('ListenPort',int(v_nmPort))
set('CrashRecoveryEnabled', 'true')
set('NativeVersionEnabled', 'true')
set('StartScriptEnabled', 'false')
set('SecureListener', 'true')
set('LogLevel', 'INFO')

cd('/SecurityConfiguration/base_domain')
set('NodeManagerUsername', v_nmUserName)
set('NodeManagerPasswordEncrypted', v_nmPwd)
printInfo("Step: Align NodeManager --> Successful")


printHeader("Step: Prepare Domain --> Set JAVA_HOME in Domain")
setOption('JavaHome',v_javaHome)
printInfo("Step: Set JAVA_HOME in Domain --> Successful")

printHeader("Step: writeDomain and closeTemplate")
writeDomain(v_setup_domain_base+'/'+v_domainName)
closeTemplate()

readDomain(v_setup_domain_base+'/'+v_domainName)

printHeader('Step: Create Unix Machine --> Set Machine Name ('+v_MachineName+') and Port ('+v_nmPort+')')
cd('/')
create(v_MachineName, 'UnixMachine')
cd('Machine/' + v_MachineName)
create(v_MachineName, 'NodeManager')
cd('NodeManager/'+v_MachineName)
set('ListenAddress', v_nmListenAddress)
set('ListenPort',int(v_nmPort))
set('NMType','ssl')

cd('/Servers/'+v_asName)
set('Machine',v_MachineName)
printInfo("Step: Create Unix Machine --> Successful")
updateDomain()
closeDomain()

readDomain(v_setup_domain_base+'/'+v_domainName)
printHeader('Step: Include OTD template')
selectTemplate('Oracle Traffic Director - Restricted JRF','12.2.1.3.0')
loadTemplates()
printInfo('Step: Include OTD template --> Successful')
updateDomain()
closeDomain()
printInfo("Step: writeDomain and closeTemplate --> Successful")

printHeader('Step: Creating OTD Instance')
readDomain(v_setup_domain_base+'/'+v_domainName)
props = {}
props['configuration'] = v_otdConfigName
props['listener-port'] = v_otdServerPort
props['server-name'] = v_otdServerName
props['origin-server'] = v_otdOriginServer
otd_createConfiguration(props)
updateDomain()
closeDomain()

readDomain(v_setup_domain_base+'/'+v_domainName)
props = {}
props['configuration'] = v_otdConfigName
props['machine'] = v_MachineName
otd_createInstance(props)
updateDomain()
closeDomain()
printInfo('Step: Creating OTD Instance --> Successful')

printHeader("Finished: crDomain.py")

And now you can start to install and configure your Oracle Traffic Director 12.2.1.3.0.

At first you need to execute the installation scripts:

cd $ORACLE_BASE/install
# Install the JDK
./silent_jdk.sh

jdk1.8.0_144/
jdk1.8.0_144/THIRDPARTYLICENSEREADME-JAVAFX.txt
jdk1.8.0_144/THIRDPARTYLICENSEREADME.txt
jdk1.8.0_144/lib/
jdk1.8.0_144/lib/jexec
jdk1.8.0_144/lib/javafx-mx.jar
jdk1.8.0_144/lib/packager.jar
jdk1.8.0_144/lib/visualvm/
. . .
. . .
jdk1.8.0_144/man/ja_JP.UTF-8/man1/tnameserv.1
jdk1.8.0_144/man/ja_JP.UTF-8/man1/pack200.1
jdk1.8.0_144/man/ja_JP.UTF-8/man1/jcmd.1
jdk1.8.0_144/man/ja_JP.UTF-8/man1/javapackager.1
jdk1.8.0_144/man/ja_JP.UTF-8/man1/jstat.1

# Install the Oracle WebLogic Server Infrastructure
./silent_wls_infra.sh

Launcher log file is /tmp/OraInstall2017-09-15_05-51-04PM/launcher2017-09-15_05-51-04PM.log.
Extracting the installer . . . . . . . . . . . . Done
Checking if CPU speed is above 300 MHz.   Actual 2194.918 MHz    Passed
Checking swap space: must be greater than 512 MB.   Actual 3071 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 10035 MB    Passed
Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2017-09-15_05-51-04PM
Log: /tmp/OraInstall2017-09-15_05-51-04PM/install2017-09-15_05-51-04PM.log
Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
Reading response file..
Skipping Software Updates
Starting check : CertifiedVersions
Expected result: One of oracle-6, oracle-7, redhat-7, redhat-6, SuSE-11, SuSE-12
Actual Result: oracle-7.3
Check complete. The overall result of this check is: Passed
CertifiedVersions Check: Success.
. . .
. . .
Percent Complete : 90
Percent Complete : 100

The installation of Oracle Fusion Middleware 12c Infrastructure 12.2.1.3.0 completed successfully.
Logs successfully copied to /u00/app/oracle/oraInventory/logs.

# Install the Oracle Traffic Director
./silent_otd.sh

Launcher log file is /tmp/OraInstall2017-09-15_05-54-37PM/launcher2017-09-15_05-54-37PM.log.
Checking if CPU speed is above 300 MHz.   Actual 2194.918 MHz    Passed
Checking swap space: must be greater than 512 MB.   Actual 3071 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 8508 MB    Passed
Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2017-09-15_05-54-37PM
Log: /tmp/OraInstall2017-09-15_05-54-37PM/install2017-09-15_05-54-37PM.log
Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
Reading response file..
Skipping Software Updates
Starting check : CertifiedVersions
Expected result: One of redhat-7, redhat-6, oracle-6, oracle-7, SuSE-11, SuSE-12
Actual Result: oracle-7.3
Check complete. The overall result of this check is: Passed
CertifiedVersions Check: Success.
. . .
. . .
Percent Complete : 90
Percent Complete : 100

The installation of Oracle Traffic Director 12.2.1.3.0 completed successfully.
Logs successfully copied to /u00/app/oracle/oraInventory/logs.

As next you can configure your Oracle Traffic Director Domain:

cd $ORACLE_BASE/install
./crDomain.sh

======================================================================================
 Program  : crDomain.sh                                                ........
======================================================================================
==================================================
Domain will be installed ...
==================================================

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands


======================================================================================
--> Started: crDomain.py
======================================================================================


======================================================================================
--> Step: Read default template (always wls.jar!!)
======================================================================================

-->: Template: /u00/app/oracle/product/fmw-otd-12.2.1.3.0/wlserver/common/templates/wls/wls.jar successfully read

======================================================================================
--> Step: Prepare Domain --> Set Domain Name to OTDDOMAIN
======================================================================================

-->: Step: Set Domain Name --> Successful

======================================================================================
--> Step: Prepare Domain --> Set User Password
======================================================================================

-->: Step: Set User Password --> Successful

======================================================================================
--> Step: Prepare Domain --> Set AdminServer Name (OTDDOMAINAdminServer) and Port (7001)
======================================================================================

-->: Step: Set AdminServer Name --> Successful

======================================================================================
--> Step: Prepare Domain --> Set Domain Properties
======================================================================================

-->: Step: Set Domain Properties --> Successful

======================================================================================
--> Step: Prepare Domain --> Align NodeManager
======================================================================================

-->: Step: Align NodeManager --> Successful

======================================================================================
--> Step: Prepare Domain --> Set JAVA_HOME in Domain
======================================================================================

-->: Step: Set JAVA_HOME in Domain --> Successful

======================================================================================
--> Step: writeDomain and closeTemplate
======================================================================================


======================================================================================
--> Step: Create Unix Machine --> Set Machine Name (otd122130) and Port (5556)
======================================================================================

-->: Step: Create Unix Machine --> Successful

======================================================================================
--> Step: Include OTD template
======================================================================================

-->: Step: Include OTD template --> Successful
-->: Step: writeDomain and closeTemplate --> Successful

======================================================================================
--> Step: Creating OTD Instance
======================================================================================

-->: Step: Creating OTD Instance --> Successful

======================================================================================
--> Finished: crDomain.py
======================================================================================

Finished
Domain Build Time: 1  minutes.
Start Domain manually by using startNodeManager.sh and startWeblogic.sh

Now you can startup the NodeManager and the WebLogic AdminServer:

cd $DOMAIN_HOME/bin
nohup ./startNodeManager > /dev/null 2>&1 &

cd $DOMAIN_HOME
nohup ./startWebLogic.sh > /dev/null 2>&1 &

Wait some minutes and then access with a browser the Oracle Enterprise Manager Fusion Middleware Control http://<servername>:<port>/em



Under the top right menu option "WebLogic Domain" go to "Administration / OTD Configurations"


And now you can see your Oracle Traffic Director Instance and Configuration and start the Instance from here, mark the line of your Instance and then click "Start Instances"


And that's it ... with the above script set you are easily in the position to install and configure your Oracle Traffic Director 12.2.1.3.0 and you can easily align the configuration for the Traffic Director Instances and Configurations to your needs.


Friday, September 8, 2017

Oracle Forms 12.2.1.3.0 and the impact of new Required Support Files 12.1.0.2.0

With the latest Release of Oracle Forms & Reports 12.2.1.3.0 the Database Required Support Files got a facelift. Oracle moved the Database Required Support Files up from Release 11.2.0.3.0 to 12.1.0.2.0.

On the first look this seems not to be too dramatically, but when you check out the Release Note for Oracle Forms & Reports 12.2.1.3.0 Section Lifecycle Management Informations, you will find this statement http://docs.oracle.com/middleware/12213/formsandreports/releasenotes-fnr/lifecycle-management-information.htm#FRREL-GUID-241658D3-387D-4154-9484-1BF55D4EFFB7


Which means in short terms, once you open pre-12.2.1.3.0 Forms Sources with the latest Forms Builder 12.2.1.3.0, the Required Support Files will be updated to Version 12.1.0.2.0 and therefor your Forms Sources can not longer be open with a pre-12.2.1.3.0 Forms Builder . . . and also not longer compiled with frmcmp.sh or frmcmp_batch.sh from for example Oracle Forms 12.2.1.2.0.

So don't forget to make sufficient backups from your Forms Sources before you open them with the latest Oracle Forms Builder 12.2.1.3.0 Release !

Moreover the usual warning from Oracle, that you should not copy your compile Forms from one machine to another is still applicable :-)


WebLogic Server 12.2.1.3.0 - Get Patch List with RESTful Management Services

Yesterday, I discovered a new field within the RESTful Management Services under serverRuntime - patchList.

This new field contains the list of applied patches to your Oracle WebLogic Server 12.2.1.3.0 installation, so I thought, I will not longer need to access opatch lsinventory to retrieve the list of applied patches on my WebLogic Server installation ...

You can check the list of applied Patches with following URL call within a browser or just use a curl command:
http://<servername>:<port>/management/weblogic/latest/serverRuntime?links=none&fields=patchList


Now lets compare the above list with opatch lsinventory.

cd $ORACLE_HOME/OPatch
./opatch lsinventory
Oracle Interim Patch Installer version 13.9.2.0.0
Copyright (c) 2017, Oracle Corporation.  All rights reserved.


Oracle Home       : /u00/app/oracle/product/fmw-wls-12.2.1.3.0
Central Inventory : /u00/app/oracle/oraInventory
   from           : /u00/app/oracle/product/fmw-wls-12.2.1.3.0/oraInst.loc
OPatch version    : 13.9.2.0.0
OUI version       : 13.9.2.0.0
Log file location : /u00/app/oracle/product/fmw-wls-12.2.1.3.0/cfgtoollogs/opatch/opatch2017-09-08_12-48-42PM_1.log


OPatch detects the Middleware Home as "/u00/app/oracle/product/fmw-wls-12.2.1.3.0"

Lsinventory Output file location : /u00/app/oracle/product/fmw-wls-12.2.1.3.0/cfgtoollogs/opatch/lsinv/lsinventory2017-09-08_12-48-42PM.txt

--------------------------------------------------------------------------------
Local Machine Information::
Hostname: weblogic122130
ARU platform id: 226
ARU platform description:: Linux x86-64


Interim patches (4) :

Patch  26355633     : applied on Thu Aug 31 14:26:20 CEST 2017
Unique Patch ID:  21447583
Patch description:  "One-off"
   Created on 1 Aug 2017, 21:40:20 hrs UTC
   Bugs fixed:
     26355633

Patch  26287183     : applied on Thu Aug 31 14:26:10 CEST 2017
Unique Patch ID:  21447582
Patch description:  "One-off"
   Created on 1 Aug 2017, 21:41:27 hrs UTC
   Bugs fixed:
     26287183

Patch  26261906     : applied on Thu Aug 31 14:25:53 CEST 2017
Unique Patch ID:  21344506
Patch description:  "One-off"
   Created on 12 Jun 2017, 23:36:08 hrs UTC
   Bugs fixed:
     25559137, 25232931, 24811916

Patch  26051289     : applied on Thu Aug 31 14:25:48 CEST 2017
Unique Patch ID:  21455037
Patch description:  "One-off"
   Created on 31 Jul 2017, 22:11:57 hrs UTC
   Bugs fixed:
     26051289

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

OPatch succeeded.

Looks so far so good. 4 applied Patches are reported with the RESTful Management Services URL access and the same 4 patches are reported with opatch lsinventory.

Now lets perform the same on an Oracle WebLogic Server 12.2.1.3.0 (Infrastructure) hosting Oracle Forms & Reports 12.2.1.3.0.

RESTful Management Services access http://<servername>:<port>/management/weblogic/latest/serverRuntime?links=none&fields=patchList give me a list of 11 applied patches:


And now the usual crosschecking with opatch lsinventory

cd $ORACLE_HOME/OPatch
./opatch lsinventory
Oracle Interim Patch Installer version 13.9.2.0.0
Copyright (c) 2017, Oracle Corporation.  All rights reserved.


Oracle Home       : /u00/app/oracle/product/fmw-fr-12.2.1.3.0
Central Inventory : /u00/app/oraInventory
   from           : /u00/app/oracle/product/fmw-fr-12.2.1.3.0/oraInst.loc
OPatch version    : 13.9.2.0.0
OUI version       : 13.9.2.0.0
Log file location : /u00/app/oracle/product/fmw-fr-12.2.1.3.0/cfgtoollogs/opatch/opatch2017-09-08_13-16-42PM_1.log


OPatch detects the Middleware Home as "/u00/app/oracle/product/fmw-fr-12.2.1.3.0"

Lsinventory Output file location : /u00/app/oracle/product/fmw-fr-12.2.1.3.0/cfgtoollogs/opatch/lsinv/lsinventory2017-09-08_13-16-42PM.txt

--------------------------------------------------------------------------------
Local Machine Information::
Hostname: fr122130
ARU platform id: 226
ARU platform description:: Linux x86-64


Interim patches (14) :

Patch  26248143     : applied on Fri Sep 01 13:47:48 CEST 2017
Unique Patch ID:  21362003
   Created on 26 Jun 2017, 11:23:19 hrs PST8PDT
   Bugs fixed:
     26248143
   This patch overlays patches:
     24732082
   This patch needs patches:
     24732082
   as prerequisites

Patch  25549931     : applied on Fri Sep 01 13:46:55 CEST 2017
Unique Patch ID:  21137755
   Created on 20 Apr 2017, 02:55:44 hrs PST8PDT
   Bugs fixed:
     25549931

Patch  24737021     : applied on Fri Sep 01 13:46:08 CEST 2017
Unique Patch ID:  21289586
   Created on 22 May 2017, 04:19:02 hrs PST8PDT
   Bugs fixed:
     24737021

Patch  22754279     : applied on Fri Sep 01 13:45:25 CEST 2017
Unique Patch ID:  20383951
Patch description:  "One-off"
   Created on 9 Jul 2016, 00:36:58 hrs UTC
   Bugs fixed:
     22754279

Patch  21663638     : applied on Fri Sep 01 13:44:30 CEST 2017
Unique Patch ID:  20477024
Patch description:  "One-off"
   Created on 31 Aug 2016, 21:01:13 hrs UTC
   Bugs fixed:
     21663638

Patch  19795066     : applied on Fri Sep 01 13:43:29 CEST 2017
Unique Patch ID:  19149348
Patch description:  "One-off"
   Created on 16 Jul 2015, 15:51:43 hrs UTC
   Bugs fixed:
     19795066

Patch  19632480     : applied on Fri Sep 01 13:42:49 CEST 2017
Unique Patch ID:  19278519
Patch description:  "One-off"
   Created on 25 Aug 2015, 07:19:43 hrs UTC
   Bugs fixed:
     19632480

Patch  19154304     : applied on Fri Sep 01 13:42:13 CEST 2017
Unique Patch ID:  19278518
Patch description:  "One-off"
   Created on 25 Aug 2015, 07:10:13 hrs UTC
   Bugs fixed:
     19154304

Patch  19030178     : applied on Fri Sep 01 13:41:36 CEST 2017
Unique Patch ID:  19234068
Patch description:  "One-off"
   Created on 4 Aug 2015, 05:40:22 hrs UTC
   Bugs fixed:
     19030178

Patch  24732082     : applied on Fri Sep 01 13:41:00 CEST 2017
Unique Patch ID:  20904347
Patch description:  "Database Patch Set Update : 12.1.0.2.170117 (24732082)"
   Created on 21 Dec 2016, 07:15:01 hrs PST8PDT
Sub-patch  24006101; "Database Patch Set Update : 12.1.0.2.161018 (24006101)"
Sub-patch  23054246; "Database Patch Set Update : 12.1.0.2.160719 (23054246)"
Sub-patch  22291127; "Database Patch Set Update : 12.1.0.2.160419 (22291127)"
Sub-patch  21948354; "Database Patch Set Update : 12.1.0.2.160119 (21948354)"
Sub-patch  21359755; "Database Patch Set Update : 12.1.0.2.5 (21359755)"
Sub-patch  20831110; "Database Patch Set Update : 12.1.0.2.4 (20831110)"
Sub-patch  20299023; "Database Patch Set Update : 12.1.0.2.3 (20299023)"
Sub-patch  19769480; "Database Patch Set Update : 12.1.0.2.2 (19769480)"
   Bugs fixed:
     19309466, 19902195, 18250893, 21172913, 17655240, 21266085, 19028800
. . .
. . .
. . .
     21294938, 20898997, 18510194, 19534363, 19188927

Patch  26355633     : applied on Fri Sep 01 13:33:37 CEST 2017
Unique Patch ID:  21447583
Patch description:  "One-off"
   Created on 1 Aug 2017, 21:40:20 hrs UTC
   Bugs fixed:
     26355633

Patch  26287183     : applied on Fri Sep 01 13:33:24 CEST 2017
Unique Patch ID:  21447582
Patch description:  "One-off"
   Created on 1 Aug 2017, 21:41:27 hrs UTC
   Bugs fixed:
     26287183

Patch  26261906     : applied on Fri Sep 01 13:33:03 CEST 2017
Unique Patch ID:  21344506
Patch description:  "One-off"
   Created on 12 Jun 2017, 23:36:08 hrs UTC
   Bugs fixed:
     25559137, 25232931, 24811916

Patch  26051289     : applied on Fri Sep 01 13:32:56 CEST 2017
Unique Patch ID:  21455037
Patch description:  "One-off"
   Created on 31 Jul 2017, 22:11:57 hrs UTC
   Bugs fixed:
     26051289

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

OPatch succeeded.

Unfortunately opatch lsinventory reports me 14 applied patches on my environment while the RESTful Management Services reports only 11 patches :-(

Seems that there is a small unexpected feature (some people would call it a bug ...) within the WebLogic Server 12.2.1.3.0 Infrastructure version. I have already started a SR with Oracle about that, lets see what will be the result ..

So summing up, its a really nice enhancement to retrieve your applied patches via a simple URL call or curl command, but be careful depending on your version of the WebLogic Server (Generic or Infrastructure) you might not see the correct list.