This Blog is discontinued, its only read-only

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['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.


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 :-)