This Blog is discontinued, its only read-only

Wednesday, September 6, 2017

Starting and Stopping Oracle Reports Servers with WLST

Normally people are using to start and stop their Oracle Reports Servers the by Oracle provided scripts startComponent.sh and stopComponent.sh in the $DOMAIN_HOME/bin.

The problem with this set of scripts is, that they really take long time to complete and you need to execute it for each Reports Server:
cd $DOMAIN_HOME/bin
# Lets measure the time
time ./startComponent.sh rep_server1
Starting system Component rep_server1 ...

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Reading domain from /u00/app/oracle/user_projects/domains/demo_domain
 
Connecting to Node Manager ...
<Sep 6, 2017 8:45:02 PM CEST> <Info> <Security> <BEA-090905> <Disabling the CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true.> 
<Sep 6, 2017 8:45:02 PM CEST> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG128 to HMACDRBG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true.> 
<Sep 6, 2017 8:45:02 PM CEST> <Info> <Security> <BEA-090909> <Using the configured custom SSL Hostname Verifier implementation: weblogic.security.utils.SSLWLSHostnameVerifier$NullHostnameVerifier.> 
Successfully Connected to Node Manager.
Starting server rep_server1 ...
Successfully started server rep_server1 ...
Successfully disconnected from Node Manager.

Exiting WebLogic Scripting Tool.

Done

real   0m22.784s
user   0m37.029s
sys    0m2.065s

As you can see, the time to startup a single Oracle Reports Server can be up to 22 seconds (depending on your server, might be a bit lesser or more) and on top the execution for the startComponent.sh is only for one Oracle Reports Server, so in case you have multiple Oracle Reports Servers, you need to execute the startComponent.sh for each Reports Server . . .

With a simple Python Script for WLST you can perform the startup task much quicker and you can perform within one execution of my Python Script multiple startups and shutdowns for several Oracle Reports Servers.

You will need files for that:
  • domain.properties: which contains the required connect informations for the Node Manager and a comma separated list of your Oracle Reports Servers
  • start_stop_reports.py: a Python Script with named arguments to start or stop your provided Reports Servers within the domain.properties file
domain.properties:
# Replace with your Port of Node Manager
nm.port=5556
# Replace with your Hostname
nm.host=localhost
# Replace with your Password
nm.password=welcome1
# Replace with your Username
nm.username=nodemanager
# Replace your Domain Name
domain.name=demo_domain
# Replace your Domain Home
domain.home=/u00/app/oracle/user_projects/domains/demo_domain
# Replace with your Reports Server Name
reports.servers=rep_server1,rep_server2,rep_server3

start_stop_reports.py:
# ============================================================
#
# Script: start_stop_reports.py
#
# Author: Dirk Nachbar, http://dirknachbar.blogpost.com
#
# Purpose: Start / Stop Script for a list of Oracle Reports Servers
#
# ============================================================

import sys
import re
import os
from datetime import datetime
from java.io import File
from java.io import FileOutputStream
from java.io import FileInputStream
 
func=''
propfile=''
 
def helpUsage():
   print 'Usage: start_stop_reports.py [-help]'
   print '      [-function] provide function either start or stop'
   print '      [-propfile] provide the property file'
   exit()
 
for i in range(len(sys.argv)):
   if sys.argv[i] in ("-help"):
           helpUsage()
   elif sys.argv[i] in ("-function"):
           if i+1 < len(sys.argv):
                   func = sys.argv[i+1]
   elif sys.argv[i] in ("-propfile"):
           if i+1 < len(sys.argv):
                   propfile = sys.argv[i+1]
 
if len(func)==0 or len(propfile)==0:
   print 'Missing required arguments (-func, -propfile)'
   print ' '
   helpUsage()
 
# Load Connection Properties
propInputStream = FileInputStream(propfile)
configProps = Properties()
configProps.load(propInputStream)
nmPort=configProps.get("nm.port")
nmHost=configProps.get("nm.host")
nmPassword=configProps.get("nm.password")
nmUser=configProps.get("nm.username")
domainName=configProps.get("domain.name")
domainHome=configProps.get("domain.home")
reportsServers=configProps.get("reports.servers")
 
# Connect to Node Manager
nmConnect(nmUser, nmPassword, nmHost, nmPort, domainName, domainHome, 'ssl')
 
# Perform startup of defined Oracle Reports Servers
if func=="start":
   print 'Starting configured Reports Servers'
   for repserver in reportsServers.split(','):
      print 'Starting Reports Server: ' +repserver
      nmStart(serverName=repserver, serverType='ReportsServerComponent')
 
# Perform stop of defined Oracle Reports Servers
if func=="stop":
   print 'Stopping configured Reports Servers'
   for repserver in reportsServers.split(','):
      print 'Stopping Reports Server: ' +repserver
      nmKill(serverName=repserver, serverType='ReportsServerComponent')


The execution of the script is really straight forward:
Usage: start_stop_reports.py [-help]
      [-function] provide function either start or stop
      [-propfile] provide the property file


# Just call the script with wlst and provide the required parameters
# e.g. for starting all defined Reports Servers (rep_server1,rep_server2,rep_server3)

$ORACLE_HOME/oracle_common/common/bin/wlst.sh start_stop_reports.py -func start -propfile domain.properties

# e.g. for stopping all defined Reports Servers (rep_server1,rep_server2,rep_server3)

$ORACLE_HOME/oracle_common/common/bin/wlst.sh start_stop_reports.py -func stop -propfile domain.properties


Now let's see how long it will take to startup 3 Oracle Reports Servers with my above solution:
# Let's measure the time to execute
time $ORACLE_HOME/oracle_common/common/bin/wlst.sh start_stop_reports.py -func start -propfile domain.properties
Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Connecting to Node Manager ...
<Sep 6, 2017 9:15:17 PM CEST> <Info> <Security> <BEA-090905> <Disabling the CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true.> 
<Sep 6, 2017 9:15:17 PM CEST> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG128 to HMACDRBG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true.> 
<Sep 6, 2017 9:15:17 PM CEST> <Info> <Security> <BEA-090909> <Using the configured custom SSL Hostname Verifier implementation: weblogic.security.utils.SSLWLSHostnameVerifier$NullHostnameVerifier.> 
Successfully Connected to Node Manager.
Starting configured Reports Servers
Starting Reports Server: rep_server1
Starting server rep_server1 ...
Successfully started server rep_server1 ...
Starting Reports Server: rep_server2
Starting server rep_server2 ...
Successfully started server rep_server2 ...
Starting Reports Server: rep_server3
Starting server rep_server3 ...
Successfully started server rep_server3 ...

real   0m13.602s
user   0m22.066s
sys    0m0.915s

As you can see with my solution, you will need only 13 seconds to startup three Oracle Reports Servers and thats just with one command instead of calling startComponent.sh or stopComponent.sh three times and each execution takes around 22 seconds.


Tuesday, September 5, 2017

Oracle Forms Application Deployment Services (FADS)

Within the latest release of Oracle Forms & Reports 12.2.1.3.0 is a really cool new feature - Oracle Forms Application Deployment Services (FADS).

FADS allows you to package, deploy, configure and store complete Forms Applications. A normal Forms Application contains executables like fmx, mmx and plx, but also jar's, html's. With FADS you can package them all together, version them.

The installation is quite simple, but ONLY if you follow the Standard Naming convention from Oracle :-(, which means DONT CHANGE the name of the Admin Server within your WebLogic Domain for Oracle Forms & Reports 12.2.1.3.0, the Admin Server name MUST be AdminServer !!!!

The reason for that is, that within the configuration script $ORACLE_HOME/forms/fads/fads_config.py all references for the Admin Server are hardcoded (!!!) with the name AdminServer.
In case you are like me and want to change that hardcoded values (2 times in line 69 and 1 time in line 255) from the hardcoded name "AdminServer" to the name of your AdminServer and you execute the fads_config.py script, you will be happy at the first stage ... the deployment will complete successfully ... but afterwards you can not use FADS, looks like that within the deployed ear files are also hardcoded references to the Admin Server name "AdminServer"

Snippet from $DOMAIN_HOME/servers/<Your Admin Server Name>/logs/fads-diagnostic.log as you can see internally com.bea:Name=AdminServer,Type=Server is even hardcoded :-(

[2017-09-04T10:39:54.024+02:00] [FRTESTAdminServer] [ERROR] [] [oracle.forms.fads.bundles] [tid: 136] [userId: <anonymous>] [ecid: 98ca6478-f846-4dc7-8614-317c730df63b-00000062,0] [APP: fads] [partition-name: DOMAIN] [tenant-name: GLOBAL] [SRC_CLASS: oracle.forms.fads.deployment.engine.config.DeploymentServiceConfig] [SRC_METHOD: <init>] FRM-80020 error parsing Deployment Services configuration file {0}[[
javax.management.InstanceNotFoundException: com.bea:Name=AdminServer,Type=Server
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:643)
        at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:678)
        at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$17.run(WLSMBeanServerInterceptorBase.java:466)
        at java.security.AccessController.doPrivileged(Native Method)
        at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.getAttribute(WLSMBeanServerInterceptorBase.java:464)
        at weblogic.management.mbeanservers.internal.JMXContextInterceptor.getAttribute(JMXContextInterceptor.java:157)
        at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$17.run(WLSMBeanServerInterceptorBase.java:466)
        at java.security.AccessController.doPrivileged(Native Method)
        at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.getAttribute(WLSMBeanServerInterceptorBase.java:464)
        at weblogic.management.mbeanservers.internal.SecurityInterceptor.getAttribute(SecurityInterceptor.java:294)
        at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$17.run(WLSMBeanServerInterceptorBase.java:466)
        at java.security.AccessController.doPrivileged(Native Method)
        at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.getAttribute(WLSMBeanServerInterceptorBase.java:464)
        at weblogic.management.mbeanservers.internal.MBeanCICInterceptor.getAttribute(MBeanCICInterceptor.java:139)
        at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$17.run(WLSMBeanServerInterceptorBase.java:466)
        at java.security.AccessController.doPrivileged(Native Method)
        at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.getAttribute(WLSMBeanServerInterceptorBase.java:464)
        at weblogic.management.mbeanservers.internal.PartitionJMXInterceptor.getAttribute(PartitionJMXInterceptor.java:307)
        at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$17.run(WLSMBeanServerInterceptorBase.java:466)
        at java.security.AccessController.doPrivileged(Native Method)
        at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.getAttribute(WLSMBeanServerInterceptorBase.java:464)
        at weblogic.management.mbeanservers.internal.CallerPartitionContextInterceptor.getAttribute(CallerPartitionContextInterceptor.java:177)

In case you have environments with a Non-Oracle-Standard-Naming-Convention for your Admin Server, sorry, no chance currently to use FADS ...

In case you are Oracle-Standard-Naming-Convention conform, enjoy the new FADS :-)

Before you start, you have to consider some important points for your WebLogic Domain creation.
Make sure that the required Repository is created with following components:


And make sure that on your "NOT-RENAMED" Admin Server the Server Group is WSMPM-MAN-SVR is selected.



As I pointed out already in my previous blogpost "Oracle Forms & Reports 12.2.1.3.0 - First Look", at first you need to update the SQL Developer binaries, which are delivered in a 3.2 version and you will need SQL Developer 4.2 or higher. Simply download the latest version of SQL Developer, currently 17.2 from here http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html, take the "Other Platforms" version and place the zip file in your $ORACLE_HOME.

# Connect to your server as oracle user
mv sqldeveloper sqldeveloper_org
unzip sqldeveloper-17.2.0.188.1159-no-jre.zip

As next we can configure the FADS:

# Connect to your server as oracle user
# export your ORACLE_HOME variable
# for example, align with your settings
export ORACLE_HOME=/u00/app/oracle/product/fmw-fr-12.2.1.3.0
# now we are running the configuration for FADS
cd $ORACLE_HOME/forms/fads
../../oracle_common/common/bin/wlst.sh fads_config.py

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

----------------------------------------------------------------------
               fads configuration script                        
----------------------------------------------------------------------

Admin Server will be shutdown by running this script.
Do you want to continue? [Y/n] :y

You need to install Oracle SQL Developer 4.2 or higher under ORACLE_HOME.  Did you install SQL Developer 4.2? [Y/n] :y

SQL Developer 4.2 is installed under /u00/app/oracle/product/fmw-fr-12.2.1.3.0

connecting to WebLogic:

Please enter your username :weblogic
Please enter your password :
Please enter your server URL [t3://localhost:7001] :
Connecting to t3://localhost:7001 with userid weblogic ...
Successfully connected to Admin Server "AdminServer" 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.

obtaining Admin Server host/port information
Location changed to domainRuntime tree. This is a read-only tree 
with DomainMBean as the root MBean. 
For more help, use help('domainRuntime')

fadsui.ear:-> /u00/app/oracle/user_projects/applications/demo_domain/forms/fads/fads-ui.ear
webservices - http://localhost:7001/fads/apis (updated to http://192.168.56.119:7001/fads/apis)
Saving...
Totals {connections=1, rest=1, updated=1}
updating FADS OWSM policy
creating fads keystore
Already in Domain Runtime Tree

Keystore created

Already in Domain Runtime Tree

Key pair generated

Context is missing, therefore using current context "/WLS/demo_domain".

Successfully configured property "keystore.type".

Successfully configured property "location".

Successfully configured property "keystore.sig.csf.key".

Successfully configured property "keystore.enc.csf.key".
creating fads WSM policy set
Session started for modification.
Description defaulted to "Global policy attachments for RESTful Resource resources."
The policy set was created successfully in the session.
Policy reference "oracle/multi_token_rest_service_policy" added.
The configuration override property "propagate.identity.context" having value "true" has been added to the reference to policy with URI "oracle/multi_token_rest_service_policy".
The policy set restPolicySet is valid.
Creating policy set restPolicySet in repository.

Session committed successfully.
importing fads authorization policy
import fadsWSpolicy passed /u00/app/oracle/product/fmw-fr-12.2.1.3.0/forms/fads/policy/fadsWSMPolicy.zip
Importing "META-INF/policies/oracle/binding_authorization_template_fads"
Successfully imported "1" documents
Location changed to edit custom tree. This is a writable tree with No root.
For more help, use help('editCustom')

Starting an edit session ...
Started edit session, be sure to save and activate your changes once you are done.
Saving all your changes ...
Saved all your changes successfully.
Activating all your changes, this may take a while ... 
The edit lock associated with this edit session is released once the activation is completed.
Activation completed
shutting down the Admin Server
Shutting down the server AdminServer with force=false while connected to AdminServer ...
..Disconnected from weblogic server: AdminServer
shutting down the Admin Server
                                                    
.......done with fads post configuration............


        please start the Admin Server           
                                                    
----------------------------------------------------------------------

Exiting WebLogic Scripting Tool.


The next step is to startup your AdminServer and finally you can connect to your FADS WebFrontend with http://<servername>:<port>/fadsui for the Login use your WebLogic Admin User and the corresponding password



For the next steps consult the official Oracle Documentation here http://docs.oracle.com/middleware/12213/formsandreports/deploy-forms/oracle-forms-application-deployment-services-fads.htm#FSDEP-GUID-7859329F-D2A5-43A5-A2F4-02C7282C75C1 or wait for my next blogpost on "What you can do with FADS"

As short summing up, great tool the new Oracle Forms Application Deployment Services (FADS), but the implementation with hardcoded names for the Admin Server is a bit annoying ... I hope that Oracle will enhance FADS, so that you are free to use your own Admin Server names ... let's see :-)

Update 18th September 2017: I received from My Oracle Support an official statement to the point that you can use FADS only when your Admin Server is called "AdminServer":

I have checked with Development Team ,
This is currently a known limitation. Development is investigating several possible improvements that might be introduced in a future release. For now, You will need to either retain the default "AdminServer" name when configuring the domain or change the script at their own risk.
Note: We will not support if any changes made to the script by You . 

Let's see if they will remove this limitation ...

Friday, September 1, 2017

Oracle Forms & Reports 12.2.1.3.0 - First Look

Today I had some time to play around with the latest Release of the Oracle Forms & Reports Services 12.2.1.3.0.

Here are my first impressions (at first the positive findings ...):

The installation procedure is the same as the previous release, so just install your JDK 1.8 (minimum version must be JDK 1.8_131), after that install your Oracle WebLogic Server Infrastructure 12.2.1.3.0 (not the generic WebLogic Server) and finally install over the WebLogic Server Infrastructure your Oracle Forms & Reports 12.2.1.3.0 Software.

The next step is as usual to run the rcu (Repository Creation Utility) from your $ORACLE_HOME/oracle_common/bin location.

Here you can find some new option, under the option "Database Connection Details" you have now the choice between Connection String Format as "Connection Parameter" or "Connection String". This option is new compared to the previous release 12.2.1.2.0



Under the Option "Select Components" be aware that the Installation Documentation from Oracle is incorrect, in the documentation is just mentioned you should select following components:

  • Oracle Platform Security Services, Audit Services, Audit Services Append, Audit Services Viewer



On top to the above mentioned Components you will need the Component "Metadata Services", so make sure you have selected following components in your rcu:


When you your rcu is done, the next step is to run the Configuration Wizard from $ORACLE_HOME/oracle_common/common/bin/config.sh

Here you will find (as I blogged already yesterday about it) under the Option "Templates" the new feature "Filter Templates". Moreover you will find within the Available Templates one brand new Template "Oracle Forms Application Deployment Service (FADS) - 12.2.1.3.0". About this new Template I will give my comment a bit later ... 



In case you are modifying the settings for the Admin Server, beware that the Server Groups for the Admin Server will get lost, you need to select under the Server Groups for the Admin Server "WSMPM-MAN-SVR", in you case you will forget this, at the final configuration step you will receive following error "CFGFWK-64038: The app-svc-name "wsm-pm" must have target . . ."



Finally, you can startup as usual your complete environment:

  1. Startup your Node Manager
  2. Startup your Admin Server
  3. Startup your Managed Server
Now you can access the Oracle Test Form with http://<servername>:9001/forms/frmservlet


Now some words (the negative impressions ...) about the new Forms Application Deployment Service (FADS). When you are navigating to your $ORACLE_HOME, you will find a new subdirectory sqldeveloper there, within this directory you will find a full SQL Developer version 3.2 (!!!!). Now lets have a look on the Oracle Documentation for FADS https://docs.oracle.com/middleware/12213/formsandreports/deploy-forms/oracle-forms-application-deployment-services-fads.htm#FSDEP-GUID-64C66670-3278-4C32-9F3A-0F1CBBD660A8, here you will find a Note like that:


@Dear_OracleFormsPM: why do you provide a full SQLDeveloper Version 3.2 with your initial Software Installation, when I have to update it later, maybe it would be a good idea to install initially directly the required SQL Developer Version 4.2 .... might be a good thing :-)


Thursday, August 31, 2017

WebLogic Server 12.2.1.3.0 - First Look

Since last night the latest release of the Oracle WebLogic Server 12.2.1.3.0 is available.

I have already installed and configured the latest release, the installation process remains the same as in the previous release, so nothing really new.

The Configuration Wizard ($ORACLE_HOME/oracle_common/common/bin/config.sh) got a new cool neat feature. On the screen 2 of the Configuration Wizard (Templates), you will find a Filter Templates option. In this Filter Templates you can type in the Template you are searching for, which is really useful when you got a fully installed Oracle Fusion Middleware Product like SOA Suite and the Template list is really long.



When you apply a filter (it must only be a part of the string) like "Coher", you available Templates will be aligned accordingly.


The WebLogic Server Console remains the same as the previous releases, there are on the first look no changes and new sections.

Also a cool new feature is within the Data Sources (Active Grid Link AGL), that you can use now an alias from a referenced tnsnames.ora file.
You will need to the set the following system property "-Doracle.net.tns_directory=<path to your tnsnames.ora&gt" in which you point to the directory in which your tnsnames.ora is located. In the tnsnames.ora you just define as usual your tnsnames alias.

Furthermore you should have a closer look on the "What's New in Oracle WebLogic Server 12.2.1.3.0" documentation (http://docs.oracle.com/middleware/12213/wls/NOTES/whatsnew.htm#NOTES107), specially the Section "Patch Set 3". Under Deprecated Features you will find following:


JMS resource adapters will be removed in the next release of Oracle WebLogic Server, which might be 12.2.1.4.0 or 12.3.1.0.0 !

Wednesday, August 30, 2017

Oracle Fusion Middleware 12.2.1.3.0 available

Since today the latest release of the Oracle Fusion Middleware Stack is available for download under Oracle Technology Network.

The latest release of the Fusion Middleware Stack 12.2.1.3.0 contains various products:

Oracle WebLogic Server 12.2.1.3.0 can be found under http://www.oracle.com/technetwork/middleware/weblogic/downloads/index.html



Oracle Forms & Reports  12.2.1.3.0 can be found under http://www.oracle.com/technetwork/developer-tools/forms/downloads/index.html



Oracle SOA Suite 12.2.1.3.0 can be found under http://www.oracle.com/technetwork/middleware/soasuite/downloads/index.html



Oracle Traffic Director 12.2.1.3.0 can be found under http://www.oracle.com/technetwork/middleware/otd/downloads/index.html



JDeveloper 12.2.1.3.0 can be found under http://www.oracle.com/technetwork/middleware/otd/downloads/index.html


And there is a lot more ...

The complete documentation set for the latest Oracle Fusion Middleware 12.2.1.3.0 Release can be found under http://docs.oracle.com/en/middleware/fusion-middleware/index.html



Happy download and testing :-)

Internet Explorer under Mac OS X

In case, you are like me regularly working with Web environments, you will need to test from time to time your stuff with different browser, e.g. Safari, Chrome, Firefox and Internet Explorer.

Under Mac OS X many Users are using for example Safari and switching the User Agent to Internet Explorer 11 or something like that to simulate an Internet Explorer.

Microsoft is providing for free (YES, its for FREE !!!) a Virtual Machine for 90 days. The Downloads can be found here: https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/ 

You can choose between following Internet Explorer Versions:

  • IE8 on Windows 7
  • IE9 on Windows 7
  • IE10 on Windows 7
  • IE11 on Windows 7
  • IE11 on Windows 81
  • MSEdge on Windows 10 Stable 15.15063
  • MSEdge on Windows 10 Preview 16.16257


And for all above Release combinations you have the choice between following VM-Types:

  • VirtualBox
  • Vagrant
  • HyperV (Windows)
  • VPC (Windows)
  • VMware (Windows, Mac)
  • Parallels (Mac)


After you are done with the download of your desired combination, just import the VM into your Environment, modify the settings if necessary, e.g. MAC address of Network card and start the VM.


And now you can perform your tests with an real Internet Explorer . .  .

Friday, August 25, 2017

Display Oracle Forms 12c Sessions with WLST

Sometimes you want to get a quick overview of the current connected Forms Sessions in your Oracle Forms 12c environment and the Fusion Middleware Control (http://<servername>:7001/em) is sometimes really slow reacting.

Under the My Oracle Support (MOS) Note 1580517.1 you can find a small handy Python Script, which should display you all informations about your current Forms Sessions against a specific Managed Server hosting your Forms Application. But with Oracle Forms 12c this is not longer working out of box.

Under Oracle Forms 12c the DMS nouns are not converted to MBeans by default and the MOS Script is based on an access to "oracle.dms:type=FormsRuntimeInfo".

So at first you need to enable the DMS Nouns MBeans on your Managed Server hosting your Oracle Forms Application. For this simply connect with WLST to your Admin Server of your WebLogic Server and perform following steps:

$ORACLE_HOME/oracle_common/common/bin/wlst.sh
Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

# Replace Username, Password, Server plus Port with your settings
wls:/offline> connect('weblogic','welcome1','localhost:7001')
Connecting to t3://localhost:7001 with userid weblogic ...
Successfully connected to Admin Server "FRTESTAdminServer" that belongs to domain "FRTEST".

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.

wls:/FRTEST/serverConfig/> updateDMSEventRoute(destinationid="mbeanCreationDestination", enable="true", server="<Servere Name>")
# For example
wls:/FRTEST/serverConfig/> updateDMSEventRoute(destinationid="mbeanCreationDestination", enable="true", server="WLS_FORMS;")
wls:/FRTEST/serverConfig/> exit()

After that restart your Managed Server and from now on you have the DMS nouns converted to MBeans which can be accessed via WLST.

In addition, I found from an unknown author a nice modification of the provided script from the MOS Note 1580517.1, which can be found here http://yong321.freeshell.org/oranotes/FormsServerSessionMonitor.txt (in case you are the author or you know the author, please drop me a comment here, merci)

This script, is quite nice, but I modified it on top, so that you get for each execution of the script a logfile with timestamp in the logfile name and I added a more secure way for the connect data to your Managed Server.

What you will need now are 2 file:
  • domain.properties: which contains your connection details to your Managed Server and the location of the logfile
  • mon_frm_sessions.py: Python Script which retrieves the current running Forms Sessions including Client IP, DB Username, DB Session ID, Forms Session PID, Forms Section Name (from formsweb.cfg)
Create the property file named domain.properties and set the permission to 600 (chmod 600 domain.properties):

# Replace with your hostname and Port of Managed Server
admin.url=localhost:9001
# Replace with your Password
admin.password=welcome1
# Replace with your Username
admin.username=weblogic
# Replace with your preferred Logfile Location
# Please note, the trailing slash at the end is needed !
logfile.location=/u00/app/oracle/logs/

As next create the mon_frm_sessions.py

import sys
import re
import os
from datetime import datetime
from java.io import File
from java.io import FileOutputStream
from java.io import FileInputStream

# Load Connection Properties
propInputStream = FileInputStream("domain.properties")
configProps = Properties()
configProps.load(propInputStream)
adminURL=configProps.get("admin.url")
adminPassword=configProps.get("admin.password")
adminUser=configProps.get("admin.username")
logFileLocation=configProps.get("logfile.location")

# Construct the Logfile with Timestamp
LogFileName = logFileLocation +'mon_frm_sessions-%s.log'%datetime.now().strftime('%Y_%m_%d_%H_%M_%S')

redirect('/dev/null', 'false')
# Perform connection to Managed Server hosting Forms App
connect(adminUser,adminPassword,adminURL)
custom()
cd ('oracle.dms')
children = ls()
childList = children.split("\n");
f = open(LogFileName, 'a')
f.write("\n" + datetime.now().strftime("%Y-%m-%d %H:%M:%S") + "\n")
f.write("Config\tDBName\tDBSessID\tClientIP\tPID\tUser\n")
# Printout for stdout
print "Config\tDBName\tDBSessID\tClientIP\tPID\tUser"
for child in childList:
  childInfo = child.split(' ');
  length = len(childInfo);
  if (len(childInfo) > 2 and re.match('oracle.dms:type=FormsRuntimeInfo,name=/frmDMS/\d',childInfo[3])):
     cd(childInfo[3]);
     attrs = ls();
     attrList = attrs.split("\n");
     for attr in attrList:
       if (attr.find("config_value") != -1 or attr.find("dbname_value") != -1 or attr.find("dbsessid_value") != -1 or attr.find("ip_value") != -1 or attr.find("pid_value") != -1 or attr.find("user_value") != -1):
          try:
            vl = attr.split()[2]+'\t'
          except IndexError:
            vl = '\t'
          f.write(vl)
          sys.stdout.write(vl)
     f.write("\n")
     print
     cd ('..')
print " "
print "Logfile are generated: " + LogFileName
disconnect()

And now you can execute the above Python Script with WLST

$ORACLE_HOME/oracle_common/common/bin/wlst.sh mon_frm_sessions.py
Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Config  DBName  DBSessID        ClientIP        PID     User
test    DB122   1145            172.18.46.11    10313   scott
demo    DB122   1234            172.18.46.11    21330   scott

Logfile are generated: /u00/app/oracle/logs/mon_frm_sessions-2017_08_25_15_40_54.log

Enjoy displaying your current Forms Sessions without connecting to the Fusion Middleware Control :-)

Thursday, August 24, 2017

Oracle Forms 12c and FRM-93652

I am currently working on a huge migration project for Oracle Forms 11g to Oracle Forms 12c (12.2.1.2.0) and we experience some nice FRM-93652 errors in several Forms.

We had several Forms masks on which we executed a query over the menu, data is displayed in the Forms mask afterwards we clicked a button to exit the Forms and the complete Forms session crashed with FRM-93652 :-)

In the underlying formsapp-diagnostic.log in $DOMAIN_HOME/servers/<servername>/logs directory, I only could see following 3 lines:

[2017-08-24T11:16:50.300+02:00] [MS_FORMS] [ERROR] [FRM-93546] [oracle.forms.servlet] [tid: 21] [userId: <anonymous>] [ecid: b629152b-5758-4998-8aac-f6d306179e0f-000000f0,0] [APP: formsapp] [partition-name: DOMAIN] [tenant-name: GLOBAL] [FORMS_SESSION_ID: MS_FORMS.formsapp.6] [SRC_CLASS: oracle.forms.servlet.RunformProcess] [SRC_METHOD: fromFrmwebToODL] external message from runtime process: In-flux value for a pin at 0x29d0290
[2017-08-24T11:16:50.300+02:00] [MS_FORMS] [ERROR] [FRM-93546] [oracle.forms.servlet] [tid: 21] [userId: <anonymous>] [ecid: b629152b-5758-4998-8aac-f6d306179e0f-000000f0,0] [APP: formsapp] [partition-name: DOMAIN] [tenant-name: GLOBAL] [FORMS_SESSION_ID: MS_FORMS.formsapp.6] [SRC_CLASS: oracle.forms.servlet.RunformProcess] [SRC_METHOD: fromFrmwebToODL] external message from runtime process: kgepop: no error frame to pop to for error 600
[2017-08-24T11:16:50.306+02:00] [MS_FORMS] [ERROR] [FRM-93652] [oracle.forms.servlet] [tid: 21] [userId: <anonymous>] [ecid: b629152b-5758-4998-8aac-f6d306179e0f-000000f0,0] [APP: formsapp] [partition-name: DOMAIN] [tenant-name: GLOBAL] [FORMS_SESSION_ID: MS_FORMS.formsapp.6] [SRC_CLASS: oracle.forms.servlet.BaseServlet] [SRC_METHOD: logConnectionException] The runtime process has terminated abnormally.

The important parts are:

. . . [FRM-93546] . . . external message from runtime process: In-flux value for a pin at 0x29d0290
. . . [FRM-93546] . . . external message from runtime process: kgepop: no error frame to pop to for error 600
. . . [FRM-93652] . . . logConnectionException] The runtime process has terminated abnormally.

After some investigations in My Oracle Support (MOS), I only found a MOS Note for Oracle Forms 11g "Forms Crash With Error FRM-93652 After 11g Upgrade (Doc ID 1096125.1)". This MOS Note is providing a solution who to avoid the above mentioned FRM-93652 error by setting the menu property "Share Library with Form"= Yes or apply a Patch 9965029. But this MOS Note is exclusively for Oracle Forms 11g (11.1.1.2.0 to 11.1.2.2.0) and the referenced Patch is a One-Off-Patch Oracle Database 11g (11.1.0.70 to 11.2.0.3.7).

Every Oracle Forms & Reports Software Home is also containing Oracle Database Required Support Files, so I simply cross checked my ORACLE_HOME which Version are the Database Components in my Oracle Forms and Reports 12.2.1.2.0 Release:

$ORACLE_HOME/oui/bin/viewInventory.sh | grep "FeatureSet: db_clientFR"
     FeatureSet: db_clientFR 11.2.0.3.0

I downloaded the Patch 9965029 for Linux and Oracle Release 11.2.0.3.0, stopped all processes from the Oracle Forms & Reports environment (Managed Servers, OHS, AdminServer and Node Manager) and applied the Patch 9965029 to my Oracle Forms & Reports Software Home with the opatch utility under $ORACLE_HOME/OPatch, started my complete Oracle Forms & Reports Environment and tested once again if the FRM-93652 error comes up again . . . and the problem was solved :-)

I hope that Oracle Support or Oracle Product Management for Forms & Reports will update the My Oracle Support Note 1096125.1, that the provided Patch can also be used for Oracle Forms & Reports 12c.

Update 25th August 2017: I received a confirmation from My Oracle Support, that the above mentioned patch can be used for Oracle Forms & Reports Release 12.2.1.2.0



Tuesday, August 22, 2017

Parsing Named Arguments into Python Scripts

If you are coming from the Shell Script World, you are used to parse Named Arguments into your Shell Script, e.g "-u" for Username, "-p" for Password and so on. With Python Scripts you normally pass ordered arguments into your Python Script, so you are bond with the arguments in a fixed order, while passing Named Arguments you can reshuffle them in any order.

A typical Shell Script Snippet would look like that:

export UserName=""
export PassWord=""
export URL=""

while getopts u:p:c: CurOpt; do
    case ${CurOpt} in
        u) UserName="${OPTARG}"  ;;
        p) PassWord="${OPTARG}"  ;;
        c) URL="${OPTARG}"       ;;
        ?) Usage                 ;;
    esac
done

shift $((${OPTIND}-1))

# Call a function for checking of given Parameter Values
CheckInputParams

The same you can achieve for your Python Scripts to be used with the Oracle WebLogic Server command line tool wlst.

import sys

uname=''
pword=''
url=''

def helpUsage():
   print 'Usage: test.py [-help]'
   print '      [-username] Username for the connect'
   print '      [-password] Password for the connect User'
   print '      [-url] URL for the connect'
   exit()

for i in range(len(sys.argv)):
   if sys.argv[i] in ("-help"):
           helpUsage()
   elif sys.argv[i] in ("-url"):
           if i+1 < len(sys.argv):
                   url = sys.argv[i+1]
   elif sys.argv[i] in ("-username"):
           if i+1 < len(sys.argv):
                   uname = sys.argv[i+1]
   elif sys.argv[i] in ("-password"):
           if i+1 < len(sys.argv):
                   pword = sys.argv[i+1]

if len(uname)==0 or len(pword)==0 or len(url)==0:
   print 'Missing required arguments (-url, -username, -password)'
   print ' '
   helpUsage()


connect(uname,pword,url)

#
# Perform your Tasks
#

exit()

Now you can call your Python Script with wlst and provide the required Named Arguments in any order you like, e.g.:

# Using Named Argument -help
wlst.sh test.py -help

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Usage: test.py [-help]
      [-username] Username for the connect
      [-password] Password for the connect User
      [-url] URL for the connect

Exiting WebLogic Scripting Tool.


# Using Named Arguments -username / -password / -URL
wlst.sh test.py -username weblogic -url t3://localhost:7001 -password Welcome1

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 "DEMODomain".

Exiting WebLogic Scripting Tool.


# Using Named Arguments, but forgot to pass a value for Argument -Password
wlst.sh test2.py -username weblogic -url t3://localhost:7001 -password

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Missing required arguments (-url, -username, -password)

Usage: test.py [-help]
      [-uname] Username for the connect
      [-password] Password for the connect User
      [-url] URL for the connect

Exiting WebLogic Scripting Tool.

With a simple small Python Block you can easily pass Named Arguments into your Python Scripts in the same way you know it with Shell Scripts.

Monday, August 21, 2017

Configure Single Sign On for Cloud Control 13c against Active Directory

In many cases you want to use your Microsoft Active Directory Login to be authenticated against your Oracle Cloud Control 13c.

Here is a step by step solution how to implement Single Sign On for your Oracle Cloud Control against Microsoft Active Directory.

Lets assume following Environment:

  • AD Domain = DEMO.COM
  • Microsoft AD Server = adserver.demo.com
  • AD LDAP Port = 389
  • Cloud Control 13c Server = cloudcontrol13c.demo.com

Windows Steps


Connect to the Windows Server Hosting your Active Directory and execute following steps

1. Create a corresponding Service Account for the Oracle Management Server (OMS) in your Active Directory:


Name the to be created Service Account = your Cloud Control Server
dsadd user="cn=<ServiceAccountName>,cn=users,dc=<Domain>,dc=<TLD>" -disabled no -pwd <Password for ServiceAccountName> -canchpwd no -mustchpwd no -pwdneverexpirer yes

# For Example
dsadd user="cn=cloudcontrol13c,cn=users,dc=demo,dc=com" -disabled no -pwd Welcome1 -canchpwd no -mustchpwd no -pwdneverexpirer yes

2. Create a keytab file:


ktpass -princ HTTP/<ServiceAccountName>.<Domain>.<TLD>@;.<Domain>.<TLD> -mapuser <ServiceAccountName> -crypto all -ptype KRB5_NT_PRINCIPAL -out c:\temp\krb5.keytab

# For Example:
ktpass -princ HTTP/cloudcontrol13c.demo.com@DEMO.COM -mapuser cloudcontrol13c -crypto all -ptype KRB5_NT_PRINCIPAL -out c:\temp\krb5.keytab

Afterwards transfer the above created keytab file named krb5.keytab to your Cloud Control 13c Server.

Cloud Control Steps


Now connect to your Server which is Hosting your Oracle Cloud Control 13c and perform following steps.

1. Create the Active Directory Authentication Provider


emctl config auth ad -ldap_host "<AD-Servername>" -ldap_port "<LDAP-PORT>" \
ldap_principal "cn=<ServiceAccountName>,cn=users,dc=<Domain>,dc=<TLD>" -ldap_credential "<Password for ServiceAccountName>" \
-user_base_dn "cn=users,dc=<Domain>,dc=<TLD>" -Group_base_dn "cn=groups,dc=<Domain>,dc=<TLD>" \
-sysman_pwd "<SYSMAN Password>"

# For Example:
emctl config auth ad -ldap_host "adserver.demo.com" -ldap_port "389" \
ldap_principal "cn=cloudcontrol13c,cn=users,dc=demo,dc=com" -ldap_credential "Welcome1" \
-user_base_dn "cn=users,dc=demo,dc=com" -Group_base_dn "cn=groups,dc=demo,dc=com" \
-sysman_pwd "Welcome1"

# Now restart your OMS
emctl stop oms -all
emctl start oms

After the restart of your OMS, connect to the WebLogic Server Console of your Oracle Cloud Control 13c, usually its the SSL Port 7101 (https://<CloudControlServer>:7101/console )
Select in the Domain Structure "Security Realms" and navigate to "Providers / Authentication"


Open the Authentication Provider EM_AD_Provider and navigate to "Configuration / Provider Specific"



Align following Attributes (activate at first in the Change Center the "Lock & Edit" Mode):

Original Attributes:
  • All Users Filter: <empty>
  • User From Name Filter: (&cn=%u) (objectclass=user))
  • User Name Attribute: cn
  • User Object Class: user
New Attributes:
  • All Users Filter: (&(sAMAccountName=*) (objectclass=user))
  • User From Name Filter: (&(sAMAccountName=%u) (objectclass=user))
  • User Name Attribute: sAMAccountName
  • User Object Class: user
Save the modifications and Activate them in the Change Center.

2. Create the JAAS Configuration File krb5Login.conf

The next step is to create the required JAAS Configuration File krb5Login.conf within the DOMAIN_HOME of your Cloud Control 13c.

# for Oracle (SUN) JDK
com.sun.security.jgss.krb5.initiate {
    com.sun.security.auth.module.Krb5LoginModule required
    principal="HTTP/cloudcontrol13c.demo.com@DEMO.COM"
    useKeyTab=true keyTab=/etc/krb5.keytab
    storeKey=true debug=true;
};
com.sun.security.jgss.krb5.accept {
    com.sun.security.auth.module.Krb5LoginModule required
    principal="HTTP/cloudcontrol13c.demo.com@DEMO.COM"
    useKeyTab=true keyTab=/etc/krb5.keytab
    storeKey=true debug=true;
};

# For IBM JDK (under AIX)
com.ibm.security.jgss.krb5.initiate {
    com.ibm.security.auth.module.Krb5LoginModule REQUIRED
    principal="http/cloudcontrol13c.demo.com"
    useKeytab="FILE:/etc/krb5.keytab"
    credsType=initiator
    debug=true;
};
com.ibm.security.jgss.krb5.accept {
    com.ibm.security.auth.module.Krb5LoginModule REQUIRED
    principal="http/cloudcontrol13c.demo.com"
    useKeytab="FILE:/etc/krb5.keytab"
    credsType=acceptor
    debug=true;
};

3. Align setDomainEnv.sh

Now we need to align the setDomainEnv.sh in the DOMAIN_HOME/bin directory. Search for the 2 lines:
EXTRA_JAVA_PROPERTIES="-Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder ${EXTRA_JAVA_PROPERTIES}"
export EXTRA_JAVA_PROPERTIES
and add below this 2 lines following block:

if [ "${SERVER_NAME}" = "EMGC_OMS1" ] ; then
     EXTRA_JAVA_PROPERTIES="-Djava.security.krb5.realm=%lt;Domain>.<TLD> -Djava.security.krb5.kdc=<AD-Servername> -Djava.security.auth.login.config=<Path to krb5Login.conf>/krb5Login.conf -Djavax.security.auth.useSubjectCredsOnly=false -Dweblogic.security.enableNegotiate=true ${EXTRA_JAVA_PROPERTIES}"
     export EXTRA_JAVA_PROPERTIES
fi

# For Example:
if [ "${SERVER_NAME}" = "EMGC_OMS1" ] ; then
     EXTRA_JAVA_PROPERTIES="-Djava.security.krb5.realm=DEMO.COM -Djava.security.krb5.kdc=adserver.demo.com -Djava.security.auth.login.config=/u00/app/oracle/product/gc_inst_13cR1/user_projects/domains/GCDomain/krb5Login.conf -Djavax.security.auth.useSubjectCredsOnly=false -Dweblogic.security.enableNegotiate=true ${EXTRA_JAVA_PROPERTIES}"
     export EXTRA_JAVA_PROPERTIES
fi

5. Configure Single Sign On within OMS

The next step is to create an external role within OMS, this external role must be named exactly the same as your corresponding AD Group for the OMS Users

emcli create_role -name="oracle_dba" -type="EXTERNAL_ROLE" -desc="Active Directory Group for oracle_dba"

Now configure the SSO for the OMS

emctl set property -name oracle.sysman.core.security.sso.type -value "OTHER"
emctl set property -name oracle.sysman.core.security.auth.is_external_authentication_enabled -value "true"
emctl set property -name oracle.sysman.emSDK.sec.DirectoryAuthenticationType -value "SSO"
emctl set property -name oracle.sysman.core.security.auth.autoprovisioning -value "true"

After that perform a restart of your OMS:

emctl stop oms -all
emctl start oms

Now, when you are connecting the first time to the Cloud Control 13c and logging in with your AD-User, there will be automatically created the SSO User within your Cloud Control 13c and you can connect with your AD-User and corresponding AD-Password.

Thursday, July 27, 2017

Check Composite State of Oracle SOA Suite by Command Line

I was currently fighting a bit with the monitoring of Oracle SOA Suite 12c Composites.

The goal was to check the state of deployed Composites on an Oracle SOA Suite 12c with following requirements/dependencies:

  • No Oracle Cloud Control
  • Capture only Active Composites and not Retired Composites
After some discussions with colleagues and a lot of Google and serveral tests with Python Scripts in wlst, I came to following solution:

  • one main Pythin Script, called check_composite_state.py which is checking the State of a non retired given Composite Name for a given Partition|Folder and a given Managed Server
  • one property file called domain.properties which will be used by the Python Script in order to build the required connect string to the Admin Server of the SOA Suite
  • one wrapper Shell Script, which takes the required 3 Arguments (Name of Managed Server, Composite Name and Partition|Folder Name)

Property File domain.properties
# Replace the below given values with your settings
admin.url=wlssoa1:7001
admin.userName=weblogic
admin.password=Oracle12c

Python Script check_composite_state.py
# ============================================================
#
# Script: check_composite_state.py
#
# Author: Dirk Nachbar, http://dirknachbar.blogpost.com
#
# Purpose: Checks the state of a given Composite
#          for Oracle SOA Suite 12c
#
# ============================================================

import sys;
from java.util import Date
from java.text import SimpleDateFormat
from java.io import File
from java.io import FileOutputStream
from java.io import FileInputStream

# Load the WLS Connection Credential and establish the connection
propInputStream = FileInputStream("domain.properties")
configProps = Properties()
configProps.load(propInputStream)
adminURL=configProps.get("admin.url")
adminUserName=configProps.get("admin.userName")
adminPassword=configProps.get("admin.password")
managedServer=sys.argv[1]
compositeName=sys.argv[2]
partitionName=sys.argv[3]

# Initialization of Logfile
f = File('logs/' + compositeName + '.log')
fos = FileOutputStream(f)
theInterpreter.setOut(fos)

# Perform the Connect to the AdminServer of the SOA Suite
connect(adminUserName,adminPassword,adminURL)

domainRuntime()

for n in mbs.queryNames(ObjectName('oracle.soa.config:Location=' + managedServer + ',partition=' + partitionName + ',j2eeType=SCAComposite,name="' + compositeName + '",*'), None):
    RetiredFlag = mbs.getAttribute(n,'Mode')
    if RetiredFlag != 'retired':
        print 'Name: ' + mbs.getAttribute(n, 'Name')
        print 'Mode: ' + mbs.getAttribute(n,'Mode')
        print 'State: ' + mbs.getAttribute(n,'State')


Wrapper Shell Script check_composite_state.sh
In line 13 of the Script, align the Variable OracleHome to your Oracle Home Location
In line 66 of the Script, align the directory location were to find the check_composite_state.py Python Script
#!/bin/bash
# ============================================================
#
# Script: check_composite_state.sh
#
# Author: Dirk Nachbar, http://dirknachbar.blogspot.com
#
# Purpose: Wrapper Script to check the state of a given Composite
#          for Oracle SOA Suite 12c
#
# ============================================================

OracleHome=/data/oracle/product/fmw-soa-12.2.1.2.0

#---------------------------------------------------------------------
Usage()
#
# PURPOSE: Displays the Usage of the script
#---------------------------------------------------------------------
{
cat << EOF
Usage: check_composite_state.sh -s <ManagedServer> -c <CompositeName> -p <Partition|Folder>
       Monitoring script for SOA Suite Composite

Parameters:
   -s: Name of the Managed SOA Server
   -c: Name of Composite to be checked
   -p: Name of Parition | Folder

e.g. check_composite_state.sh -s soa_server1 -c PayPal -p default

EOF
exit 1
}

#---------------------------------------------------------------------
CheckParams()
#
# PURPOSE: Checks the input Parmeter
#---------------------------------------------------------------------
{
    if [ "${ManagedServer}" = "" ] ; then
        echo "ERR: Missing parameter(s), the flags -s must be used."
        Usage
    fi

    if [ "${CompositeName}" = "" ] ; then
        echo "ERR: Missing parameter(s), the flags -c must be used."
        Usage
    fi

    if [ "${Partition}" = "" ] ; then
        echo "ERR: Missing parameter(s), the flags -p must be used."
        Usage
    fi

}

#---------------------------------------------------------------------
CallCheckCompositeState()
#
# PURPOSE: Calls the check_composite_state.py Script
#---------------------------------------------------------------------
{

${OracleHome}/oracle_common/common/bin/wlst.sh /home/oracle/check_composite_state.py ${ManagedServer} ${CompositeName} ${Partition}

}

#---------------------------------------------------------------------
# MAIN
#---------------------------------------------------------------------

ManagedServer=''
CompositeName=''
Partition=''

while getopts s:c:p:h: CurOpt; do
    case ${CurOpt} in
        s) ManagedServer="${OPTARG}" ;;
        c) CompositeName="${OPTARG}" ;;
        p) Partition="${OPTARG}"     ;;
        h) Usage           exit 1    ;;
        ?) Usage           exit 1    ;;
    esac
done
shift $((${OPTIND}-1))

if [ $# -ne 0 ]; then
    Usage
fi

# Check Input Parameters
CheckParams

# Start the Check State of Composite
CallCheckCompositeState

Create the 3 above provided files in one location, align the said Variables and/or directory location and create a subdirectory called "logs" in the directory. Than call the Wrapper Shell Script with following options:
#
# ./check_composite_state.sh -s <Name of Managed Server> -c <Composite Name> -p <Partition|Folder>
# for example:
./check_composite_state.sh -s soa_server1 -c PayPal -p default


Under the directory logs you will find an outfile with naming convention CompositeName.log with the Status of your Composite
cd logs
cat PayPal.log

Connecting to t3://wlssoa1:7001 with userid weblogic ...
Successfully connected to Admin Server "DEVAdminServer" that belongs to domain "dev_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')

Name: PayPal [1.0]
Mode: active
State: on



Happy Composite State Checking ... :-)

Thursday, July 20, 2017

Oracle Forms 12c oracle.security.jps.JpsException Error after Database change

My current huge Oracle Forms 12c Migration Project is still going on and every day we have some new problems.

After the DBA's were moving our Repository Database for the new Oracle Forms 12c environments (without any notice to us ...), nothing were working again on our environment :-)

So the first step, were to stop all processes from our Oracle Forms 12c environment:
  • Reports Server
  • all Managed Servers containing Oracle Reports and Oracle Forms Applications
  • Admin Server
Next step, we aligned the 4 JDBC Connections under $DOMAIN_HOME/config/jdbc in order to point to the new Database Server location:
  • LocalSvcTblDataSource-jdbc.xml
  • opss-audit-jdbc.xml
  • opss-auditview-jdbc.xml
  • opss-datasource-jdbc.xml
After that I tried to startup the Admin Server ... after some seconds the Admin Server stopped directly and in the corresponding logfile of the Admin Server I could find following error message:
<BEA-000362> <Server failed. Reason:
There are 1 nested errors:
oracle.security.jps.JpsException: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: java.lang.ClassCastException: oracle.jdbc.xa.client.OracleXADataSource cannot be cast to java.sql.Driver
        at oracle.security.jps.internal.config.OpssCommonStartup.start(OpssCommonStartup.java:215)
        at oracle.security.jps.wls.JpsWlsStartup.start(JpsWlsStartup.java:104)
        at oracle.security.jps.JpsStartup.start(JpsStartup.java:210)
        at oracle.security.jps.wls.JpsDefaultService.start(JpsDefaultService.java:74)
        . . .
        . . .
Caused by: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: java.lang.ClassCastException: oracle.jdbc.xa.client.OracleXADataSource cannot be cast to java.sql.Driver
        at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.processJPAException(JpsDBDataManager.java:2658)
        at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.existsTable(JpsDBDataManager.java:1682)
        . . .
        . . .

I verfied once again, if all JDBC Connections were defined correctly and I didn't found any typomistake or error ...

Finally, I came across the configuration files for the Oracle Platform Security for Java Configuration Files jps-config.xml and jps-config-jse.xml under $DOMAIN_HOME/config/fmwconfig. Within these 2 Configuration Files you also have to align the changed Database Server location.

In jps-config.xml go to line 22 and align the following line with your new settings:
# Line 22
<property name="jdbc.url" value="jdbc:oracle:thin:@//dbserver:listener_port/DB_ServiceName"/>

In the jps-config-jse.xml you have to align 2 lines with your new settings, line number 20 and line number 168:
# Line 20
<property name="jdbc.url" value="jdbc:oracle:thin:@//dbserver:listener_port/DB_ServiceName"/>

# Line 168
<property name="audit.loader.jdbc.string" value="jdbc:oracle:thin:@//dbserver:listener_port/DB_ServiceName"/>
After that you can startup your Admin Server and your Managed Servers for your Oracle Forms 12c environment without any problems :-)

Wednesday, July 19, 2017

Oracle Container Registry - First Impressions

After my long holiday, I discovered today that the Oracle Container Registry is now world wide accessible :-) before the Oracle Container Registry were only accessible from USA, Australia and UK.

The Oracle Container Registry contains several types of Docker images:
  • Database: Oracle Enterprise Edition, Oracle Standard Edition and Instant Client
  • Java: Oracle Java SE
  • Middleware: Oracle Coherence, Oracle Tuxedo, Oracle WebLogic Server, Oracle WebTier
  • MySQL: MySQL Community Server
  • OS: Oracle Linux, Container Registry
  • OpenStack: contains currently 95 API's and so on ...
At first you need to access the website https://container-registry.oracle.com , click on the top right to sign in, you will need an OTN Account and follow the registration process.


After you have completed your registration to the Oracle Container Registry just Sign In and you will be directed automatically to following website:


From this point you can get down to Docker Image you are interested, for example the Middleware Section:


Within each Main Section you will find different Repositores, e.g. Oracle Coherence, Oracle Tuxedo, Oracle WebLogic Server and Oracle Web Tier.

When you select a specific Repository, e.g. Oracle WebLogic Server, you will be directed to the Repository Info Page:



On this page you will find various informations about the Repository and informations how to pull the Image, how to create e.g. a WebLogic Domain with an Admin Server and so on.

Let's try it.

# At First Login with your Docker
# to the Oracle Container Registry
din@server> docker login container-registry.oracle.com
Username: xx@xx.xxx
Password: 
Email: xx@xx.xxx
WARNING: login credentials saved in /home/din/.docker/config.json
Login Succeeded

# Now let's pull the Oracle WebLogic Server
din@server> docker pull container-registry.oracle.com/middleware/weblogic
Using default tag: latest

Please login prior to pull:
Username: xx@xx.xxx
Password: 
Email: xx@xx.xxx
latest: Pulling from middleware/weblogic
78a05301de27: Pull complete 
1bd2d038d806: Pull complete 
4b7f2458c2b0: Pull complete 
9b1f6785ca2d: Pull complete 
b83e45ee2903: Pull complete 
Digest: sha256:f42f1a6036e240c32e9438dfba3a883da7f99d10b26a1ca6efe6e0e2f5187af9
Status: Downloaded newer image for container-registry.oracle.com/middleware/weblogic:latest

# Now let's start the Oracle WebLogic Domain
din@server> docker run -d -p 7001:7001 container-registry.oracle.com/middleware/weblogic:12.2.1.1
7cdddadc00d8c60d3f310d98bd5f1f0e35d55c305c97195142849ae2bc02772c

# Wait some minutes and check the Container ID in order
# to grep from the logs the newly generated password
# for the WebLogic Admin User
din@server> docker ps
CONTAINER ID        IMAGE                                                        COMMAND                  CREATED              STATUS              PORTS                    NAMES
7cdddadc00d8        container-registry.oracle.com/middleware/weblogic:12.2.1.1   "/u01/oracle/createAn"   About a minute ago   Up About a minute   0.0.0.0:7001->7001/tcp   condescending_swartz

din@server> docker logs 7cdddadc00d8 | grep password
    Oracle WebLogic Server Auto Generated Admin password: d76074ec
*  password assigned to an admin-level user.  For *

Now you can open your Browser and access the following website http://localhost:7001/console and login with the Username weblogic and the password you retrieved from the above shown docker logs command.



There are some small pain points:

  • The current Release of the Oracle WebLogic Server is only 12.2.1.1.0, so its not the actual latest Release
  • The acceptance of the Oracle Standard Terms and Restrictions are only valid for 8 hours, so if you want to pull something new after one day, you have to get back to the Oracle Container Registry Website and re-accept the Oracle Standard Terms and Restrictions

But nevertheless, the Oracle Container Registry is a great option provided by Oracle to get quickly Docker Images for the main product line without any pain to write your own Docker Build Files.

Additional Note 21st July 2017: The above mentioned 8 hours expiration time of the acceptance of the Oracle Standard Terms and Restrictions is no longer valid, Thanks @MikeRaab for the hint


Tuesday, July 18, 2017

Oracle Forms 12c Java Web Start only shows Splash Screen

I am currently working in a project for migrating several Oracle Forms 11g Applications to Oracle Forms 12c.
One requirement within this project is to use Oracle Forms 12c with Java Web Start in order to get rid of any kind of browser dependencies and to be independent from the classical Java Applet.

The configuration of Java Web Start usage within the formsweb.cfg is really straight forward and simple, just follow the Oracle Documentation.

The first test failed as usual :-) I was copying the jnlp file to my local desktop, got a JDK 1.8.0 Update 121 on my local desktop and run following command from the command line:

cd $JAVA_HOME/bin
./javaws /home/oracle/test_webstart.jnlp


What happened was that just the Java Logo Splash Screen showed up for a second and disappeared ...


Cool, I was trying the same on different laptops, every time the same result.

After some investigations, I found the solution, simply open your Java Control Panel (Windows User: System Control and search for Java / Linux User: start from $JAVA_HOME/bin the binary jcontrol / Mac Users: Open System Preferences and click Java) and click the button "Settings..." under the Section "General / Temporary Internet Files"


Check if the Checkbox in front of "Keep temporary files on my computer." is activated.



Mark the Checkbox in front of "Keep temporary files on my computer.", Click OK and in the Main Java Control Panel click the button "Apply".



Now your Oracle Forms should work as Java Web Start Application :-)


Tuesday, June 6, 2017

Find all configured SystemComponents in Oracle Fusion Middleware - The RESTFul way

Today, just a quick post on how to find all your configured System Components within an Oracle Fusion Middleware / Oracle WebLogic Server Environment.

Let's say you are having an Oracle Forms & Reports Environment based on an Oracle WebLogic Server. Within your environment you have configured various so called System Components, and you need to know all the names and the corresponding System Component Type, like:
  • Oracle HTTP Server (OHS)
  • Oracle Reports Standalone Servers
  • Oracle Forms
With the Oracle WebLogic Server RESTFul Management Services you are able to list them all by name and including the type of System Component.

Simply run following cURL command against your WebLogic Server hosting your Oracle Fusion Middleware Components:

# Align the password of your Oracle WebLogic User
# Align the hostname and port of your WebLogic Server
curl \
--user weblogic:Oracle12c \
-H X-Requested-By:MyClient \
-H Accept:application/json \
-H Content-Type:application/json \
-d "{
     fields: [ 'name' ], links: [],
      children: {
         systemComponents: {
             fields: [ 'name' , 'componentType'],
             links: []
                            }
                 }
}" -X POST http://localhost:7001/management/weblogic/latest/domainConfig/search

{
    "name": "FRDEVEL",
    "systemComponents": {"items": [
        {
            "componentType": "FORMS",
            "name": "forms1"
        },
        {
            "componentType": "OHS",
            "name": "ohs1"
        },
        {
            "componentType": "ReportsToolsComponent",
            "name": "reptools1"
        },
        {
            "componentType": "ReportsServerComponent",
            "name": "rep_server1"
        },
        {
            "componentType": "ReportsServerComponent",
            "name": "rep_server2"
        }
    ]}


Unfortunately you can not filter over componentType, as this is not a collection and therefor a query restriction on the componentType will be ignored :-(

This method is a bit quicker then going through your $DOMAIN_HOME/system_components folder and get all your configured System Components.


Wednesday, May 31, 2017

How to install and configure Oracle Forms & Reports 12c fully unattended - Part 1

Today, I will have a novelty on my blog. This blogpost is driven by a joint venture between 3 consultants based in 2 countries (Switzerland and Germany) and working for 3 different consulting companies (Robert Crames = Edorex, Jan-Peter Timmermann = AuraPlayer and myself = Trivadis).

As we three consultants, Robert Crames (https://robertcrames.blogspot.ch), Jan-Peter Timmermann (https://jan-peter.me ) and myself are intensively working with Oracle Fusion Middleware Products, which also covers Oracle Forms & Reports, we’re stumbling over following problem with Oracle Forms & Reports 12c:

  • Missing possibility during the WebLogic Domain creation for Forms & Reports to use a “record” Feature
Different contacts with Oracle and researches within My Oracle Support, confirmed that the “record” feature is no longer available within Oracle Forms & Reports 12c.
Therefore, in case you will have to create on several servers Oracle Forms & Reports environments, you will need a lot of patience while clicking through the Configuration Wizard for WebLogic Domain creation. So automation is quite impossible for a complete installation and configuration ☹

So, the joint venture (Robert, Jan-Peter and myself) we were pooling our knowledge and created a script set for “How to install and configure an Oracle Forms & Reports 12c environment completely unattended and silent”.

Here I will present the first part:
  • Installation of JDK
  • Installation of Oracle WebLogic Server Infrastructure 12.2.1.2.0
  • Installation of Oracle Forms & Reports 12.2.1.2.0
The above steps are requiring following files:
  • setLocalEnv.sh
    • here we define all necessary values for the installation, e.g. ORACLE_BASE, JDK Release, ORACLE_HOME and so on
  • silent_jdk.sh
    • installs under the Oracle Software Owner a private JDK
  • silent_wls_infra.sh
    • Install the Oracle WebLogic Server Infrastructure 12.2.1.2.0
    • Requires setLocalEnv.sh, oraInst.loc and response_file_wls_infra.rsp
  • silent_forms.sh
    • Installs the Oracle Forms & Reports 12.2.1.2.0 over the prior installed Oracle WebLogic Server Infrastructure
    • Requires setLocalEnv.sh, oraInst.loc and response_file_forms.rsp
Place the following files all under one directory, e.g. /u00/app/oracle/install.


Download the required Oracle Software Installation sources and place them as well in the same directory as the script set
First lets have a quick look on the setLocalEnv.sh. I will just explain the for now required variables, the remaining variables will be described in Robert’s Blogpost

For the first steps, we need to have a look on following environment variables in the setLocalEnv.sh
  • JDK_SOURCE: here we define the JDK installation source file (tar.gz)
  • JDK_REL: is the JDK Release, the syntax is for JDK 8 = 1.8.0_<updateversion>
  • ORACLE_BASE: defines our ORACLE_BASE
  • INT_ORACLE_HOME: defines our target ORACLE_HOME
  • The remaining variables will be explained in Robert's second Blogpost
# Location to the directory in which the create Domain scripts are residing
export SCRIPT_HOME=$PWD

export JDK_SOURCE=jdk-8u131-linux-x64.tar.gz
export JDK_REL=1.8.0_131

# Directories
export ORACLE_BASE=/appl/oracle
export INT_ORACLE_HOME=$ORACLE_BASE/product/fmw-fr-12.2.1.2.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

# install forms true / false
export FORMS12C=true
# install reports true / false
export REPORTS12C=true
# install OHS true / false
export WEBTIER12C=true
export OHS_COMPONENTNAME=ohs1
export OHS_LISTENPORT=7777
export OHS_SSLPORT=4443

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

# AdminServer
export AS_NAME=FRTESTAdminServer
export ADM_USER=weblogic
export ADM_PWD=welcome1
export ADMINPORT=7001 
export ADMINPORTSSL=7101
export AS_HOST=`hostname -f`

# Name and Port for the Forms Managed Server
export FORMS_MS_NAME=MS_FORMS
export FORMS12C_MS_PORT=9001

# Name and Port for the Reports Managed Server
export REPORTS_MS_NAME=MS_REPORTS
export REPORTS12C_MS_PORT=9002

# Move Reports Application into WLS_FORMS (true or false)
export REPORTS_IN_FORMS=false

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

# Repository Connect
export DBUSER=sys
export DBPWD=
export DBROLE=SYSDBA
export COMPONENTPWD=
export SCHEMA_PREFIX=$DOMAIN_NAME
export DB_HOST=
export DB_PORT=
export DB_SERVICE=
export DB_OMF=true
export DB_USER_PW=welcome1
export PWDFILE=$SCRIPT_HOME/passwords.txt

The first script to execute is the silent_jdk.sh, this script simply unpacks the JDK under the defined $ORACLE_BASE/product/jdk$JDK_REL
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}


The next step is to install the Oracle WebLogic Server Infrastructure 12.2.1.2.0, here we are using the silent installation option with a response file and an oraInst.loc file

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 JAVA_HOME=${ORACLE_BASE}/product/jdk${JDK_REL}
export PATH=$JAVA_HOME/bin:$PATH

java -jar fmw_12.2.1.2.0_infrastructure.jar -silent -responseFile ${SCRIPT_HOME}/response_file_wls_infra.rsp -jreLoc ${JAVA_HOME} -invPtrLoc ${SCRIPT_HOME}/oraInst.loc


The referenced response file for the silent_wls_infra.sh Installation script looks as follows
response_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=/appl/oracle/product/fmw-fr-12.2.1.2.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=

The referenced oraInst.loc file for the silent_wls_infra.sh Installation script looks as follows
oraInst.loc
inst_group=oinstall
inventory_loc=/u00/app/oracle/oraInventory

The last step is to install the Oracle Forms & Reports 12.2.1.2.0 components over the prior installed Oracle WebLogic Server Infrastructure 12.2.1.2.0.
With this step is one speciality, I am replacing the originally provided frmconfighelper.sh script with my modified version described in my Blogpost https://dirknachbar.blogspot.ch/2017/05/oracle-forms-12c-frmconfighelper.html

For this installation step we are using the silent_forms.sh, which is referencing a corresponding response file and the same oraInst.loc as we used before for the Oracle WebLogic Server Infrastructure installation

silent_forms.sh

#!/bin/bash
#=====================================================================
#
# $Id: silent_forms.sh $
#
# PURPOSE: Script to install Oracle Forms and Reports
#           on top of existing WebLogic Server Infrastructure Installation
#
# PARAMETERS: none
#
# NOTES:   setLocalEnv.sh must be present and aligned
#          Modified frmconfighelper.sh will be provided
#                   with more functions
#
# AUTHOR:  Dirk Nachbar, https://dirknachbar.blogspot.com
#
# MODIFIED:
#
#
#=====================================================================

source setLocalEnv.sh

export JAVA_HOME=${ORACLE_BASE}/product/jdk${JDK_REL}

./fmw_12.2.1.2.0_fr_linux64.bin -silent -responseFile ${SCRIPT_HOME}/response_file_forms.rsp -jreLoc ${JAVA_HOME} -invPtrLoc ${SCRIPT_HOME}/oraInst.loc

mv ${MW}/forms/provision/frmconfighelper.sh ${MW}/forms/provision/frmconfighelper.sh.org
cp ${SCRIPT_HOME}/frmconfighelper.sh ${MW}/forms/provision/
chmod +x ${MW}/forms/provision/frmconfighelper.sh


The referenced response file response_file_forms.rsp for the silent_forms.sh Installation script looks as follows

[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-fr-12.2.1.2.0
#Set this variable value to the Installation Type selected as either Standalone Forms Builder OR Forms and Reports Deployment
INSTALL_TYPE=Forms and Reports Deployment

Putting all together, just create all the above described files into one directory on your Linux Server, e.g. /u00/app/oracle/install. Make the *.sh scripts executable (chmod +x *.sh) and execute them in following order:
cd /u00/app/oracle/install
chmod +x *.sh
./silent_jdk.sh
./silent_wls_infra.sh
./silent_forms.sh

Now, you have the base for the next steps, described by Robert Crames in his Blogpost http://robertcrames.blogspot.ch/2017/05/how-to-install-and-configure-oracle.html

After you are done with reading and applying Robert’s Part, stay tuned for my next Blogpost “How to automate Multiple Managed Servers for Oracle Forms”