Monday, 2 January 2023

BICC Extract

 

BICC Extract

 

Extract data from Oracle Fusion Applications Cloud, BICC needs to be used. This is part of every Fusion Applications Cloud and is typically reachable by extending the URL with /biacm e.g.

https://pod.datacenter.oraclecloud.com/biacm/

When logging into BICC with above example URL, the following screen is shown as starting page:

 


 

 


The offerings (OBIA module) can be selected from the drop down menu and the respective PVOs can be enabled for extract:



This will enable the PVO for use within BICC and the extraction process. In the background these PVOs are created, additionally they will also be associated with the respective OBIA Modules, hence for an OBIA implementation of Human resources, only the required PVOs for HR are extracted from Fusion Cloud.

However, the BICC extracts may fail due to errors which require to execute some tasks within BICC, to fix the Errors as workaround. These tasks include:

§  remove a PVO from an associated offering (OBIA module)

§  deselect columns for a PVO

The following section shows a step-by-step approach to fix these errors within BICC:

remove PVO from offering

A typical reason to remove a PVO from an offering may be due to the following error:

ORA-00942: table or view does not exist 



On the page of the PVO click edit:


On the following page, the associated offerings is listed in the (right) selected menu box. The associated offering can be removed from the PVO, to exclude it from the next extract run of the OBIA module (offering):


After removing the associated offering from the PVO, the customization can be saved and on the following screen of PVO summary, the PVO can be closed by clicking “Done” to get back to the Review PVO page.

The above method of customization, will permanently remove the PVO from the offering (OBIA Module). When scheduling a subsequent extract run, the removed PVO will not be part of the offering. This can be validated when creating a new extractand selecting the offering from the drop-down menu:


The removed PVO will no longer be part of a extract run:


This Data Store List screen can also be used for temporary test of deselecting a PVO from a offering (OBIA module) extract. Typically, the OBIA module is selected from the offering drop-down menu and the enabled for Extract checkbox in the header of the table is clicked to enable all associated PVOs for extract, but an individual PVO can also be deselected for the list, to only affect this specific run (e.g. for temporary testing purposes). Thus, a PVO can be removed from a offering for all subsequent runs or just an specific run (using the Data Store List of the Manage schedule screen).

deselect columns from a PVO

Another common error are missing columns from a PVO e.g. because they are obsolete after an upgrade or not used anymore. The following error is show within the BICC logs:

ORA-00904: “COLLABORATIONENTRIESHISTPEO”.”COLLAB_ENTRY_VERSION”: invalid identifier


In the latter case, the physical column first needs to be mapped to a attribute (field) of the PVO in order to deselect the attribute from the select list. This is most reliably done by create an SR wth Oracle Support. Once the PVO name has been clicked (like in above section) the PVO summary page is shown. From this page the PVO can be edited by clicking “Edit”:


After clicking next to the select column page, the configuration of columns is shown for the PVO:


First, it is recommended to make the highlighted columns visibile to check if an attribute is used for the select list, as primary key or within the incremental filter. The attribute name can then be used to search for the attribute which needs to be deselected:


After deselecting the checkbox e.g. of Select List, the PVO needs to be saved. These changes will then be saved for the next extract run with BICC where the deselected attribute will not be part of the select statement and thus not be retrieved. Since this column hasn’t been available and caused the extract issue, the issue has been fixed by also deselecting the attribute from the PVO definition.

Monday, 22 November 2021

xslt padding with characters call template for left pad and right pad

Could a call-template be written that took two parameters ?

 

a string, and a  number) return the string with empty spaces appended to the 

end so that it  occupied the number of spaces specified by the number  parameter? 

   

So long as you know the number of spaces will never exceed say 100, write

<xsl:template name="pad">

<xsl:param name="s"/>

<xsl:param name="len"/>

<xsl:variable name="spaces">         ...                   </xsl:variable>

<xsl:value-of select="substring(concat($s, $spaces), 1, $len)"/>

</xsl:template>

 

A more elegant solution, which handles any number of spaces, is

for the template to append

one space to the string and then call itself to add another "len-1", until len reaches zero.

You should check out XPath's string-handling functions.

Something like

<xsl:value-of

     select="substring(concat($string, '            '), 1, 12))"/>

Always gives you a string twelve characters long, either the first twelve

characters of $string, or $string padded out with spaces. Variables can be also be

 useful to make things easier to read, reuse and maintain -- for example

<xsl:variable name="spacex12" select="'            '"/>

and then

<xsl:value-of select="substring(concat($string, $spacex12), 1, 12))"/>

 

Example

Just as a challenge, I took it a little further. The following outputs the

color values in this document

  <test>

  <color>red</color>

  <color>blue</color>

  <color>yellow</color>

  </test>

at 12 characters each, right aligned:

  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 

  version="1.0">

    <xsl:variable name="fieldWidth">12</xsl:variable>

 

    <xsl:template match="color">

      <xsl:variable name="valueLength"

           select="string-length(normalize-space(.))"/>

      <xsl:variable name="padding"

           select="$fieldWidth - $valueLength"/>

 

      <xsl:text>[</xsl:text>

      <xsl:value-of select="substring('                  ',1,$padding)"/>

      <xsl:value-of select="."/>

      <xsl:text>]</xsl:text>

    </xsl:template>

 

  </xsl:stylesheet>

giving this output:

  <?xml version="1.0" encoding="utf-8"?>

  [         red]

  [        blue]

  [      yellow]

for Fixed-length String Output

Here are the string padding functions that I use frequently:

 

 

 

  <xsl:template name="prepend-pad">   

  <!-- recursive template to right justify and prepend-->

  <!-- the value with whatever padChar is passed in   -->

    <xsl:param name="padChar"> </xsl:param>

    <xsl:param name="padVar"/>

    <xsl:param name="length"/>

    <xsl:choose>

      <xsl:when test="string-length($padVar) &lt; $length">

        <xsl:call-template name="prepend-pad">

          <xsl:with-param name="padChar" select="$padChar"/>

          <xsl:with-param name="padVar" select="concat($padChar,$padVar)"/>

          <xsl:with-param name="length" select="$length"/>

        </xsl:call-template>

      </xsl:when>

      <xsl:otherwise>

        <xsl:value-of select="substring($padVar,string-length($padVar) -

$length + 1)"/>

      </xsl:otherwise>

    </xsl:choose>

  </xsl:template>

 

 

  <xsl:template name="append-pad">   

  <!-- recursive template to left justify and append  -->

  <!-- the value with whatever padChar is passed in   -->

    <xsl:param name="padChar"> </xsl:param>

    <xsl:param name="padVar"/>

    <xsl:param name="length"/>

    <xsl:choose>

      <xsl:when test="string-length($padVar) &lt; $length">

        <xsl:call-template name="append-pad">

          <xsl:with-param name="padChar" select="$padChar"/>

          <xsl:with-param name="padVar" select="concat($padVar,$padChar)"/>

          <xsl:with-param name="length" select="$length"/>

        </xsl:call-template>

      </xsl:when>

      <xsl:otherwise>

        <xsl:value-of select="substring($padVar,1,$length)"/>

      </xsl:otherwise>

    </xsl:choose>

  </xsl:template>

 

 

Eg: to call the template from xsl variable or element

 

<ns39:elementname>

                                      <xsl:call-template name="prepend-padzero">

                                            <xsl:with-param name="padChar" select="0"/>

                                            <xsl:with-param name="padVar" select="nsmpr5:InvoiceNumber"/>

                                            <xsl:with-param name="length" select="6"/>

                                      </xsl:call-template>

                                      <!--  <xsl:value-of xml:id="id_754" select="concat (&quot;AUT&quot;,nsmpr5:InvoiceNumber)"/> -->

                                </ns39: elementname >

 

 

 

 

 

These will both ensure that the string ends up to be whatever length you pass

in (ie. if the string is longer than expected it will also truncate).

Pete Forman adds an option for left padding

Here's an example of padding on the left using a similar technique.

It prints my size attribute to a width of 4.

<xsl:value-of select="substring(concat('    ', @size),

                       string-length(@size) + 1, 4)"/>

 

This is clearly not as versatile as some of the solutions but it suffices for simple cases.

 

How to pad space to a text node to make it have specific length

 

These are the templates I use to pad on the left or right with any character passed in:

  <xsl:template name="prepend-pad">   

  <!-- recursive template to right justify and prepend-->

  <!-- the value with whatever padChar is passed in   -->

    <xsl:param name="padChar"> </xsl:param>

    <xsl:param name="padVar"/>

    <xsl:param name="length"/>

    <xsl:choose>

      <xsl:when test="string-length($padVar) &lt; $length">

        <xsl:call-template name="prepend-pad">

          <xsl:with-param name="padChar" select="$padChar"/>

          <xsl:with-param name="padVar" select="concat($padChar,$padVar)"/>

          <xsl:with-param name="length" select="$length"/>

        </xsl:call-template>

      </xsl:when>

      <xsl:otherwise>

        <xsl:value-of

                 select="substring($padVar,string-length($padVar) -

                 $length + 1)"/>

      </xsl:otherwise>

    </xsl:choose>

  </xsl:template>

 

  <xsl:template name="append-pad">   

  <!-- recursive template to left justify and append  -->

  <!-- the value with whatever padChar is passed in   -->

    <xsl:param name="padChar"> </xsl:param>

    <xsl:param name="padVar"/>

    <xsl:param name="length"/>

    <xsl:choose>

      <xsl:when test="string-length($padVar) &lt; $length">

        <xsl:call-template name="append-pad">

          <xsl:with-param name="padChar" select="$padChar"/>

          <xsl:with-param name="padVar" select="concat($padVar,$padChar)"/>

          <xsl:with-param name="length" select="$length"/>

        </xsl:call-template>

      </xsl:when>

      <xsl:otherwise>

        <xsl:value-of select="substring($padVar,1,$length)"/>

      </xsl:otherwise>

    </xsl:choose>

  </xsl:template>

The 'padChar' param passed in could be as many characters as you want, actually. 'padVar'

is the variable to pad, and length is length,

obviously. Most of the XSLT I do is for fixed-length text files, and these haven't failed me yet.


Monday, 9 March 2020

Weblogic SSL configuration for (custom identity and trust store) and (Demoidentity and DemoTrust )

Step -1 Create Identity Store
To create an identity store we use key tool command. Actually here we will not only create an identity store but will also generate a private key for our WebLogic server. The below command does both.

keytool -genkeypair -alias serverCert -keyalg RSA -keysize 2048 -validity 3650 -keypass <private key password> -keystore IdentityKeystore.jks -storepass <keystore password>

keytool -genkeypair -alias serverCert -keyalg RSA -keysize 2048 -validity 3650 -keypass welcome1 -keystore IdentityKeystore.jks -storepass welcome1


====================================================================================================
Step-2 Create Sign Request
Next generate a certificate signing request with the private key that was created in earlier step. Run this command.

keytool -certreq -alias serverCert -file certreq.pem -keystore IdentityKeystore.jks

It will create a CSR file 'certreq.pem'. Once you provide this to CA they will sign and return signed certificate along with root and intermediate certificates if any.

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


Step-3 Import Signed Certificates
Now the signed certificates must be imported to the Keystore. Note that the sequence of import must be root, intermediate and server signed certificate.

keytool -importcert -trustcacerts -alias root -file certs/RootCert.cer -keystore IdentityKeystore.jks
keytool -importcert -alias inter -file certs/IntermediateCert.cer -keystore IdentityKeystore.jks
keytool -importcert -alias serverCert -file certs/SignedCert.cer -keystore IdentityKeystore.jks

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


Step-4 Create TrustStore
Here as well the single command will create a trust store and also adds the trusted certificate into it.

keytool -importcert -trustcacerts -file Certs/RootCert.cer -alias root -keystore Truststore.jks
keytool -importcert -file Certs/Intermediate.cer -alias root -keystore Truststore.jks

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

Step-5 Point Weblogic to use Custom Keystore
Now that we have both custom identity and truststore ready, its time to change WebLogic to use these keystore. For this login to admin console and select 'Admin Server' in summary of servers page. Goto Configuration > Keystore and update identity and trust keystore with custom ones.
=========================================================================================================
Step 6 - Update setDomainEnv.sh
Note that you need to remove the reference of DemoTrust from setDomainEnv.sh file. Either remove this entry from the EXTRA_JAVA_PROPERTIES or update it with the location of your custom trust store.

-Djavax.net.ssl.trustStore=${WL_HOME}/server/lib/DemoTrust.jks

If you are removing it then add the value in startup arguments of your admin and managed servers otherwise Weblogic will fall back on cacerts of Java as truststore.



To find out the location of the trust store in force add the following lines in startup arguments -

-Dssl.debug=true -Djavax.net.debug=ssl
==============================================================================================

After performing all the above steps Weblogic is configured to use the custom identity and truststore. Import all the trusted certificates in custom truststore to achieve SSL related functions for e.g. to invoke a webservice over SSL first retrieve the certificates from the URL and import all root, intermediate LB certificates in this truststore. Refer to another post on this here.

Autorenew opss demoidentity and demotrust certs with below wlst scripts

- Connect to admin server:
connect("username","password","t3://host:port")
- Run following wlst command: svc = getOpssService(name='KeyStoreService')
- Renew the certificates by executing the following online WLST command: svc.listExpiringCertificates(days='365', autorenew=true)

Friday, 22 November 2019

SOA Suite 12.2.1.1.0: Create, configure and tune a SOA/OSB Domain

Introduction

This post focuses on the creation, configuration and tuning of an initial SOA Suite 12.2.1.1.0 Domain.
The WebLogic Server is a necessary requirement, and must already be installed. For instruction how to install the WebLogic Server 12.2.1.1 please refer to my previous post:  WebLogic Server 12.2.1.1.0: Installation on the Linux OS
The following tasks will be implemented:
  • Preparing the Operating System for the installation of the WebLogic Server 12.2.1.1, Installation JDK 1.8 and the WebLogic Server 12.2.1.1: WebLogic Server 12.2.1.1.0: Installation on the Linux OS
  • Creating of database schemas
  • Creating a SOA Suite Domain
  • Post-Installation Tasks:
    • Configuring of components
    • Creating of Start & Stop scripts for the automatic start/stop of components
  • SOA Suite Domain Tuning and Troubleshooting
The SOA/OSB Domain will be installed without BAM (different Domain) because of:
–    Oracle Best Practices and our experience
–    In order to stabilize the system (BAM is unstable at the moment)
The Domain will be created on two servers (OS OEL 6.7):
  • host01.example.com
  • host02.example.com
We will configure four clusters:
  • OWSM Cluster (Oracle Web Services Management)
  • ESS Cluster (Enterprise Scheduler Services)
  • SOA Cluster
  • OSB Cluster (Oracle Service Bus)

Installation SOA / OSB 12.2.1.1

Note: All tasks described in this chapter must be running on both servers: host01 and host02

Prepare Software

Download and extract the following software from the Oracle Software Delivery Cloud: https://edelivery.oracle.com:
–    SOA Suite 12.2.1.1.0
–    OSB 12.2.1.1.0

Installation SOA Suite 12.2.1.1 (as OS User oracle)

Note: All tasks described in this chapter must be running on both servers: host01 and host02
Navigate to software directory, extract the SOA software, set the environment and start the installation:
[oracle@host01 Oracle_Home]$ cd /u01/app/oracle/software/SOA_Suite/

[oracle@host01 SOA_Suite]$ unzip V138472-01.zip

[oracle@host01 SOA_Suite]$ export JAVA_HOME=/u01/app/oracle/product/JAVA/jdk

[oracle@host01 SOA_Suite]$ export PATH=$JAVA_HOME/bin:$PATH

[oracle@soa01 SOA_Suite]$ java -jar ./fmw_12.2.1.1.0_soa.jar
On the Welcome page click „Next“:
Enable „Skip Auto Updates“:
Set the Oracle Home to /u01/app/oracle/product/FMW/Oracle_Home:
Activate „Fusion Middleware Infrastructure“:
Activate „SOA Suite“:
Prerequisite Checks:
Verify the Summary of the Installation and click the button „Install“:
Verify installation…Next:
Check installed components and click „Finisch“:
The Installation Oracle SOA Suite 12.2.1.1.0 is now completed

Installation Oracle Service Bus 12.2.1.1 (as OS User oracle)

Note: All tasks described in this chapter must be running on both servers: host01 and host02
[oracle@host01 SOA_Suite]$ cd /u01/app/oracle/software/OSB/

[oracle@host01 OSB]$ unzip V138477-01.zip

[oracle@host01 OSB]$ export JAVA_HOME=/u01/app/oracle/product/JAVA/jdk

[oracle@host01 OSB]$ export PATH=$JAVA_HOME/bin:$PATH

[oracle@host01 OSB]$ java -jar ./fmw_12.2.1.1.0_osb.jar
On the Welcome page click „Next“:
Enable „Skip Auto Updates“:
Set the Oracle Home to /u01/app/oracle/product/FMW/Oracle_Home:
Activate the button „Service Bus“:
Prerequisite Checks:
Verify the Summary of the Installation and click the button „Install“:
Verify installation…Next:
Check installed components and click „Finish“:
The Installation Oracle Servce Bus 12.2.1.1.0 is now completed

Create Database Schemas (as OS User oracle)

Note: The creating of the database schemas must be running only once on the first server: host01
The database must be already created and prepared for the WebLogic Server Domain. For more information about the preparing the database please refer to the documentation:
Login to the server as user oracle, navigate to oracle_common directory, and start the Repository Creation Utility (RCU):
[oracle@host01 oracle]$ cd /u01/app/oracle/product/FMW/Oracle_Home/oracle_common/bin

[oracle@host01 bin]$ ./rcu
Step 1: the Welcome page: click „Next“:
Step 2: Create Repository: For the new SOA Installation choose „Create Repository“ and „System Load and Production Load“:
Step 3: Database Connection Details: On this Page provide the database connection information:
Database Type: Oracle Database
Host Name (database host): host02.example.com
Port (Database Listener Port: 1521)
Service Name (Service Name of the repository database): orcl
Username & Password: Administration Account of the SOA Database: sys/xxx
Role (Database Admin Role: SYSDBA or SYSOPER): SYSDBA
… „Next“:
The Installer checks the database connectivity:
Step 4: Select Components and the Prefix for database schemas:
Following are mandatory selected components:
  • Common Infrastructure Services (Mandatory selected components cannot be deselected)
Additionally I selected „Oracle Platform Security Services“, „SOA Infrastructure“ and „Oracle Enterprise Scheduler“.
The installer will check database prerequisites:
Step 5: Set the password for all database schemas:
Step 6: Choose the size of the SOA Repository (small, medium or high): Medium
Step 7: Map Tablespaces: On this page you can change the tablespace settings:
In the next step the installer asks for the creating tablespaces for the soa repository:
Tablespaces will be created:
Step 8: Summary: check the details and click „Create“:
Check detail and click „Close“:
The SOA Repository Creation is now completed

Create the SOA / OSB Domain (as OS User oracle)

Note: The creating of the WebLogic Server Domain must be running only once on the first server: host01.
Navigate to the oracle_common directory and start the Configuration Wizard:
[oracle@host01 bin]$ cd /u01/app/oracle/product/FMW/Oracle_Home/oracle_common/common/bin

[oracle@host01 bin]$ ./config.sh
Choose „Create a new Domain“ and set the „Domain Location“ to /u01/app/oracle/user_projects/domains/soa_domain:
On the next page you can add several WebLogic Server and SOA – OSB Templates.
Select „SOA Suite“, „Oracle Service Bus“, „Oracle API Manager“, „Oracle Enterprise Scheduler Service Basic“, „Oracle User Messaging Service Basic“ and „Oracle OPSS REST Service Application“ (additional prerequisite components Coherence and JRF will be selected automatically).
For more information about templates please refer to oracle documentation:
Specify an „Application Location“: /u01/app/oracle/user_projects/applications/soa_domain:
Set the Name and Password for the WebLogic Administrator:
Choose „Domain Mode“: Production and check the JDK location:
Configure the database details:
Specify the correct schema prefix: SOATST_STB and the information what were specified when you previously ran RCU (Chapter „Create Database Schemas“).
Then click on the Button „Get RCU Configuration“:
Installer checks database connectivity… „Next“:
Let default values and click „Next“:
The installer checks the database connections:
We don’t configure the Key Store. Let default values and click „Next“
Activate check boxes for Administration Server, Node Manager and Topology for the advanced configuration:
On the next page configure the Administration Server:
Name: AdminServer
Listen Address: 192.168.75.32 (IP Address Server host01.example.com)
Listen Port: 7001
Configure the Node Manager:
Set Node Manager Type to „Per Domain Default Location“ – default
Enter Node Manager Credentials:
Username: nodemanager
On the page „Managed Servers“ add 8 Managed Servers with following settings:
Managed serverListen AddressPortServer Group
soa_server1192.168.75.327003SOA-MGD- SVRS-ONLY
osb_server1192.168.75.327004OSB-MGD-SVRS-ONLY
ess_server1192.168.75.327005ESS-MGD-SVRS
owsm_server1192.168.75.327006JRF-MAN-SVR, WSM-CACHE-SVR, WSMPM-MAN-SVR
soa_server2192.168.75.337003SOA-MGD- SVRS-ONLY
osb_server2192.168.75.337004OSB-MGD-SVRS-ONLY
ess_server2192.168.75.337005ESS-MGD-SVRS
owsm_server2192.168.75.337006JRF-MAN-SVR, WSM-CACHE-SVR, WSMPM-MAN-SVR
In this example we will create eight managed servers for soa, osb, scheduler and webservices.
We will place the four managed server (soa_server1, osb_server1, ess_server1 and owsm_server1) on the server host01.example.com (IP Address: 192.168.75.32) and the four managed server (soa_server2, osb_server2, ess_server2 and owsm_server2) on the host02.example.com (IP Address: 192.168.75.32).
Server groups in the Middleware 12c allow to target and execute of middleware components (such soa or osb) on managed servers.
For example the server group SOA-MGD-sRVC-ONLY is responsible to execute the SOA content.
Server groups JRF-MAN-SVR and WSM-CACHE-SVR / WSMPM-MAN-SRV ensure that Oracle JRF and Oracle Web Services Manager (OWSM) services target Managed Servers you are creating.
Create 4 Clusters: soa_cluster1, osb_cluster1, ess_cluster1 and owsm_cluster1.
Leave all another fields default … „Next“:
Add Managed Servers to clusters:
ess_cluster1: ess_server1, ess_server2
osb_cluster1: osb_server1, osb_server2
owsm_cluster1: owsm_server1, owsm_server2
soa_cluster1: soa_server1, soa_server2
Specify the Coherence Cluster Listen Port:
Create two Unix Machines: one for the host host01.example.com and the second UNIX Machine for the host02.example.com):
NameListen AddressPort
host01.example.com192.168.75.325556
host02.example.com192.168.75.335556
Add Managed Servers to machines:
host01.example.com: AdminServer, ess_server1, osb_server1, owsm_server1, soa_server1
host01.example.com: ess_server2, osb_server2, owsm_server2, soa_server3
In this example we don’t configure „Virtual Targets“:
We don’t create „Partitions“:
Check configuration summary and press the button „Create“:
The Creation of initial Domain is now completed… „Next“
The SOA Domain is now created, …“Finish“:

Post-Installation Tasks

Disabling the Derby Database

Note: All tasks described in this chapter must be running on both servers: host01.example.com and host02.example.com
[oracle@host01]$ cd /u01/app/oracle/product/FMW/Oracle_Home/wlserver/common/derby/lib/

[oracle@host01 lib]$ mv derby.jar disable_derby.jar

Start the AdminServer via script

Enter the values for the Administration User (weblogic) and passwort when prompted:
[oracle@host01 bin]$ cd /u01/app/oracle/user_projects/domains/soa_domain/bin

[oracle@soa01 bin]$ ./startWebLogic.sh

Enter username to boot WebLogic server:weblogic

Enter password to boot WebLogic server:xxx

Shutdown the AdminServer via script:

[oracle@host01 bin]$ cd /u01/app/oracle/user_projects/domains/soa_domain/bin

[oracle@soa01 bin]$ ./stopWebLogic.sh

Create the file boot.properties on the server host01

[oracle@host01]$ cd /u01/app/oracle/user_projects/domains/soa_domain/servers/AdminServer

[oracle@host01 AdminServer]$ mkdir security

[oracle@host01 AdminServer]$ cd security/

[oracle@host01 security]$ echo -e "username=weblogic\npassword=welcome1" > boot.properties

[oracle@host01 security]$ cat boot.properties

username=weblogic
password=welcome1

Copying the Domain configuration from the server host01 to the host02

Save the Domain configuration on the server host01:
[oracle@host01 oracle]$ cd /u01/app/oracle/product/FMW/Oracle_Home/oracle_common/common/bin

[oracle@host01 bin]$ ./pack.sh -domain=/u01/app/oracle/user_projects/domains/soa_domain -template=/home/oracle/soa_domain.jar -template_name=soa_domain
Output:
<< read domain from "/u01/app/oracle/user_projects/domains/soa_domain" >> succeed: read domain from "/u01/app/oracle/user_projects/domains/soa_domain"

<< write template to "/home/oracle/soa_domain.jar" .............................. >> succeed: write template to "/home/oracle/soa_domain.jar"

<< close template >> succeed: close template
Copy the file host01:/home/oracle/soa_domain.jar to the server host02
[oracle@host01 ~]$ scp /home/oracle/soa_domain.jar host02.example.com:/home/oracle
Extract the domain configuration on the server host02.example.com:
[oracle@host02 oracle]$ mkdir -p /u01/app/oracle/user_projects/domains

[oracle@host02 oracle]$ mkdir -p /u01/app/oracle/user_projects/applications

[oracle@host02 oracle]$ cd /u01/app/oracle/product/FMW/Oracle_Home/oracle_common/common/bin

[oracle@host02 bin]$ ./unpack.sh -user_name=weblogic -password=welcome1 -domain=/u01/app/oracle/user_projects/domains/soa_domain -overwrite_domain=true -template=/home/oracle/soa_domain.jar -log_priority=DEBUG -log=/tmp/unpack.log -app_dir=/u01/app/oracle/user_projects/applications
Output:
<< read template from "/home/oracle/soa_domain.jar" >> succeed: read template from "/home/oracle/soa_domain.jar"

<< set config option AppDir to "/u01/app/oracle/user_projects/applications" >> succeed: set config option AppDir to "/u01/app/oracle/user_projects/applications"

<< find User "weblogic" as u1_CREATE_IF_NOT_EXIST >> succeed: find User "weblogic" as u1_CREATE_IF_NOT_EXIST

<< set u1_CREATE_IF_NOT_EXIST attribute Password to "********" >> succeed: set u1_CREATE_IF_NOT_EXIST attribute Password to "********"

<< set u1_CREATE_IF_NOT_EXIST attribute IsDefaultAdmin to "true" >> succeed: set u1_CREATE_IF_NOT_EXIST attribute IsDefaultAdmin to "true"

<< write Domain to "/u01/app/oracle/user_projects/domains/soa_domain" ............................................................................................... >> succeed: write Domain to "/u01/app/oracle/user_projects/domains/soa_domain"

<< close template >> succeed: close template

NodeManager configuration (as OS User oracle)

Server host1:
Edit file nodemanager.properties:
[oracle@host01 ~]$ cd /u01/app/oracle/user_projects/domains/soa_domain/nodemanager

[oracle@host01 nodemanager]$ vi nodemanager.properties
Change parameter:
Old:
CrashRecoveryEnabled=false
New:
CrashRecoveryEnabled=true
Start NodeManager:
[oracle@host01 bin]$ cd /u01/app/oracle/user_projects/domains/soa_domain/bin

[oracle@host01 bin]$ nohup ./startNodeManager.sh &
Server host02:
Edit file nodemanager.properties:
[oracle@host02 ~]$ cd /u01/app/oracle/user_projects/domains/soa_domain/nodemanager

[oracle@host02 nodemanager]$ vi nodemanager.properties
Change parameter:
Old:
ListenAddress=192.168.75.32
CrashRecoveryEnabled=false
New:
ListenAddress=192.168.75.33
CrashRecoveryEnabled=true
Start NodeManager:
[oracle@host02 bin]$ cd /u01/app/oracle/user_projects/domains/soa_domain/bin

[oracle@host02 bin]$ nohup ./startNodeManager.sh &
Start AdminServer via NodeManager and WLST on the Server host01 (as OS User oracle)
Start wlst:
[oracle@host01 oracle]$ /u01/app/oracle/product/FMW/Oracle_Home/oracle_common/common/bin/wlst.sh
Connect to NodeManager:
wlst> nmConnect('nodemanager','welcome1', '192.168.75.32','5556','soa_domain','/u01/app/oracle/user_projects/domains/soa_domain')
Start AdminServer:
wls:/nm/soa_proddomain> nmStart('AdminServer')
Output:
Starting server AdminServer ...

Successfully started server AdminServer ...
Execute nmEnroll commando on the second server: host02.example.com (as OS User oracle)
Start wlst:
[oracle@host02]$ /u01/app/oracle/product/FMW/Oracle_Home/oracle_common/common/bin/wlst.sh
Connect to AdminServer (AdminServer must be running):
wls:/offline> connect('weblogic','welcome1','t3://192.168.75.32:7001')
Execute nmEnroll commando:
wls:/soa_domain/serverConfig/> nmEnroll('/u01/app/oracle/user_projects/domains/soa_domain','/u01/app/oracle/user_projects/domains/soa_domain/nodemanager')
Output.
Enrolling this machine with the domain directory at /u01/app/oracle/user_projects/domains/soa_domain ...

Successfully enrolled this machine with the domain directory at /u01/app/oracle/user_projects/domains/soa_domain.
Restart the NodeManager:
[oracle@host02 bin]$ cd /u01/app/oracle/user_projects/domains/soa_domain/bin

[oracle@host02 bin]$ ./stopNodeManager.sh

[oracle@host02 bin]$ nohup ./startNodeManager.sh &

Start all Managed Servers via AdminConsole

Open the Browser and go to http://192.168.75.32:7001/console
Starting all Managed Servers via WebLogic Server Admin Console:
All Managed Servers are running:

Get your familiar with the new look of the Enterprise Manager:

Prepare the WebLogic Server domain for the auto start

Server host01:
Create directory (as OS User oracle):
[oracle@host01 ~]$ mkdir /u01/app/oracle/scripts

[oracle@host01 ~]$ chmod 744 /u01/app/oracle/scripts

[oracle@host01 ~]$ cd /u01/app/oracle/scripts
Create scripts in the directory /u01/app/oracle/scripts (as OS User oracle)
Create script /home/oracle/scripts/fmw_nodemanager.sh:
#!/bin/bash
## fmw_nodemanager.sh

DOMAIN_HOME=/u01/app/oracle/user_projects/domains/soa_domain
WORK_DIR=/u01/app/oracle/scripts
export DOMAIN_HOME WORK_DIR

case "$1" in
  start)
    nohup ${DOMAIN_HOME}/bin/startNodeManager.sh > ${WORK_DIR}/nodemanager.out 2>&1 &
    ;;
  stop)
    ${DOMAIN_HOME}/bin/stopNodeManager.sh
    ;;
  *)
    echo "usage: $0 [start|stop]"
    exit 2
    ;;
esac
Create script /u01/app/oracle/scripts/fmw_admin_and_ms.sh:
#!/bin/bash
## fmw_admin_and_ms.sh

DOMAIN_HOME=/u01/app/oracle/user_projects/domains/soa_domain
ORACLE_HOME=/u01/app/oracle/product/FMW/Oracle_Home
WORK_DIR=/u01/app/oracle/scripts
export DOMAIN_HOME ORACLE_HOME WORK_DIR
WLST=${ORACLE_HOME}/oracle_common/common/bin/wlst.sh
export WLST

case "$1" in
  start)
    ${WLST} ${WORK_DIR}/start_admin.py
    ${WLST} ${WORK_DIR}/start_ms.py
    ;;
  start_admin)
    ${WLST} ${WORK_DIR}/start_admin.py
    ;;
  start_ms)
    ${WLST} ${WORK_DIR}/start_ms.py
    ;;
  stop)
    ${WLST} ${WORK_DIR}/stop_ms.py
    ${WLST} ${WORK_DIR}/stop_admin.py
    ;;
  stop_admin)
    ${WLST} ${WORK_DIR}/stop_admin.py
    ;;
  stop_ms)
    ${WLST} ${WORK_DIR}/stop_ms.py
    ;;
  *)
    echo "usage: $0 [start|start_admin|start_ms|stop|stop_admin|stop_ms]"
    exit 2
    ;;
esac
Create script /u01/app/oracle/scripts/start_admin.py:
nmConnect('nodemanager','welcome1, '192.168.75.32','5556','base_domain','/u01/app/oracle/user_projects/domains/soa_domain')
nmStart('AdminServer')
Create script /u01/app/oracle/scripts/stop_admin.py:
nmConnect('nodemanager','welcome1, '192.168.75.32','5556','base_domain','/u01/app/oracle/user_projects/domains/soa_domain')
nmKill('AdminServer')
Create script /u01/app/oracle/scripts/start_ms.py:
nmConnect('nodemanager','welcome1, '192.168.75.32','5556','base_domain','/u01/app/oracle/user_projects/domains/soa_domain')
nmStart('owsm_server1')
nmStart('osb_server1')
nmStart('soa_server1')
nmStart('ess_server1')
Create script /u01/oracle/scripts/stop_ms.py:
nmConnect('nodemanager','welcome1, '192.168.75.32','5556','base_domain','/u01/app/oracle/user_projects/domains/soa_domain')
nmKill('ess_server1')
nmKill('soa_server1')
nmKill('osb_server1')
nmKill('owsm_server1')
Set permissions:
[oracle@host01 scripts]$ chmod -R 747 /u01/app/oracle/scripts
Integrate start-stop-scripts in Linux run-level (as OS user root)
Create script /etc/init.d/oracle (as root):
#!/bin/sh
# chkconfig: 345 99 10
# description: Oracle auto start-stop script.
# Set ORA_OWNER to the user id of the owner of the
export HOME=/u01/app/oracle/scripts
ORA_OWNER=oracle

if [ ! -f ${HOME}/fmw_nodemanager.sh \
  -o ! -f ${HOME}/fmw_admin_and_ms.sh     \
  -o ! -f ${HOME}/start_admin.py     \
  -o ! -f ${HOME}/stop_admin.py     \
  -o ! -f ${HOME}/start_ms.py     \
  -o ! -f ${HOME}/stop_ms.py ]
then
  echo "Oracle FMW startup: cannot start"
  exit
fi

case "$1" in
  'start')
    su $ORA_OWNER -c "$HOME/fmw_nodemanager.sh start"
    sleep 120
    su $ORA_OWNER -c "$HOME/fmw_admin_and_ms.sh start"
    ;;
  'stop')
    su $ORA_OWNER -c "${HOME}/fmw_admin_and_ms.sh stop"
    su $ORA_OWNER -c "${HOME}/fmw_nodemanager.sh stop"
    ;;
esac
Integrate the script /etc/init.d/oracle in run-levels (as root):
[root@host01 init.d]# chmod 700 /etc/init.d/oracle

[root@host01 init.d]# cd /etc/init.d

[root@host01 init.d]# chkconfig --add oracle
Check ( as root):
[root@host01 init.d]# chkconfig --list oracle

oracle 0:off 1:off 2:off 3:on 4:on 5:on 6:off
Server soa02
Create directory (as OS User oracle):
[oracle@host02 ~]$ mkdir /u01/app/oracle/scripts

[oracle@host02 ~]$ chmod 744 /u01/app/oracle/scripts

[oracle@host02 ~]$ cd /u01/app/oracle/scripts
Create scripts in the directory /u01/app/oracle/scripts (as OS User oracle)
Create script /u01/app/oracle/scripts/fmw_nodemanager.sh:
#!/bin/bash
## fmw_nodemanager.sh

DOMAIN_HOME=/u01/app/oracle/user_projects/domains/soa_domain
WORK_DIR=/u01/app/oracle/scripts
export DOMAIN_HOME WORK_DIR

case "$1" in
  start)
    nohup ${DOMAIN_HOME}/bin/startNodeManager.sh > ${WORK_DIR}/nodemanager.out 2>&1 &
    ;;
  stop)
    ${DOMAIN_HOME}/bin/stopNodeManager.sh
    ;;
  *)
    echo "usage: $0 [start|stop]"
    exit 2
    ;;
esac
Create script /u01/app/oracle/scripts/fmw_ms.sh:
#!/bin/bash
## fmw_ms.sh

DOMAIN_HOME=/u01/app/oracle/user_projects/domains/soa_domain
ORACLE_HOME=/u01/app/oracle/product/FMW/Oracle_Home
WORK_DIR=/u01/app/oracle/scripts
export DOMAIN_HOME ORACLE_HOME WORK_DIR
WLST=${ORACLE_HOME}/oracle_common/common/bin/wlst.sh
export WLST

case "$1" in
  start)
    ${WLST} ${WORK_DIR}/start_ms.py
    ;;
  stop)
    ${WLST} ${WORK_DIR}/stop_ms.py
    ;;
  *)
    echo "usage: $0 [start|stop]"
    exit 2
    ;;
esac
Create script /u01/app/oracle/scripts/start_ms.py:
nmConnect('nodemanager','welcome1, '192.168.75.33','5556','base_domain','/u01/app/oracle/user_projects/domains/soa_domain')
nmStart('owsm_server2')
nmStart('osb_server2)
nmStart('soa_server2')
nmStart('ess_server2')
Create script /u01/app/oracle/scripts/stop_ms.py:
nmConnect('nodemanager','welcome1, '192.168.75.33','5556','base_domain','/u01/app/oracle/user_projects/domains/soa_domain')
nmKill('ess_server2')
nmKill('soa_server2')
nmKill('osb_server2')
nmKill('owsm_server2')
Set permissions:
[oracle@host02 scripts]$ chmod -R 747 /home/oracle/scripts
Integrate start-stop-scripts in Linux run-level (as OS user root)
Create script /etc/init.d/oracle (as root):
#!/bin/sh
# chkconfig: 345 99 10
# description: Oracle auto start-stop script.
# Set ORA_OWNER to the user id of the owner of the
export HOME=/u01/app/oracle/scripts
ORA_OWNER=oracle

if [ ! -f ${HOME}/fmw_nodemanager.sh \
  -o ! -f ${HOME}/fmw_ms.sh     \
  -o ! -f ${HOME}/start_ms.py     \
  -o ! -f ${HOME}/stop_ms.py ]
then
  echo "Oracle FMW startup: cannot start"
  exit
fi

case "$1" in
  'start')
    su $ORA_OWNER -c "$HOME/fmw_nodemanager.sh start"
    sleep 120
    su $ORA_OWNER -c "$HOME/fmw_ms.sh start"
    ;;
  'stop')
    su $ORA_OWNER -c "${HOME}/fmw_ms.sh stop"
    su $ORA_OWNER -c "${HOME}/fmw_nodemanager.sh stop"
    ;;
esac
Integrate the script /etc/init.d/oracle in run-levels (as root):
[root@host02 init.d]# chmod 700 /etc/init.d/oracle

[root@host02 init.d]# cd /etc/init.d

[root@host02 init.d]# chkconfig --add oracle
Check (as root):
[root@host02 init.d]# chkconfig --list oracle

oracle 0:off 1:off 2:off 3:on 4:on 5:on 6:off

Tuning and Troubleshooting the SOA Domain

Tuning JVM (as OS User oracle)

We will customize the settings for the Java Heap size and for WebLogic Server Start parameters by the creating the File setUserOverrrides.sh.
We will tune the Java heap size for the Admin Server and for each Managed Server.
We will set some WebLogic Server start Parameter:
  • -Dweblogic.MaxMessageSize=300000000    # increase the MessageSize
  • -Dweblogic.threadpool.MinPoolSize=1024    # Tuning the WebLogic ThreadPool
Creating the File setUserOverrides.sh on both hosts: host01.example.com and host02.example.com:
[oracle@host01 ~]$ cd /u01/app/oracle/user_projects/domains/soa_domain/bin

[oracle@host01 bin]$ cat setUserOverrides.sh
Content of setUserOverrides.sh:
#!/bin/bash
echo "Setting from UserOverrides.sh"

# global settinga (for all servers)s
export JAVA_OPTIONS="$JAVA_OPTIONS -Dweblogic.MaxMessageSize=300000000 -Dweblogic.threadpool.MinPoolSize=1024"

# customer settings for each server
if [ "${SERVER_NAME}" = "AdminServer" ]
then
  echo "Customizing USER_MEM_ARGS for SERVER_NAME ${SERVER_NAME}"
  export USER_MEM_ARGS="-Xms512m -Xmx1g"
fi

if [ "${SERVER_NAME}" = "soa_server1" ]
then
  echo "Customizing USER_MEM_ARGS for SERVER_NAME ${SERVER_NAME}"
  export USER_MEM_ARGS="-Xms1g -Xmx2g -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:NewSize=1g"
  echo "Customizing JAVA_OPTIONS for SERVER_NAME ${SERVER_NAME}"
  export JAVA_OPTIONS="$JAVA_OPTIONS -Djava.awt.headless=true"
  # Coherence Settings
  export JAVA_OPTIONS="${JAVA_OPTIONS} -Dtangosol.coherence.localhost=192.168.75.32"
  export JAVA_OPTIONS="${JAVA_OPTIONS} -Dtangosol.coherence.wka1=192.168.75.32 -Dtangosol.coherence.wka2=192.168.75.33"
  export JAVA_OPTIONS="${JAVA_OPTIONS} -Dtangosol.coherence.localport=8090"
  export JAVA_OPTIONS="${JAVA_OPTIONS} -Dtangosol.coherence.localport.adjust=true"
fi

if [ "${SERVER_NAME}" = "soa_server2" ]
then
  echo "Customizing USER_MEM_ARGS for SERVER_NAME ${SERVER_NAME}"
  export USER_MEM_ARGS="-Xms1g -Xmx2g -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:NewSize=1g"
  echo "Customizing JAVA_OPTIONS for SERVER_NAME ${SERVER_NAME}"
  export JAVA_OPTIONS="$JAVA_OPTIONS -Djava.awt.headless=true"
  # Coherence Settings
  export JAVA_OPTIONS="${JAVA_OPTIONS} -Dtangosol.coherence.localhost=192.168.75.33"
  export JAVA_OPTIONS="${JAVA_OPTIONS} -Dtangosol.coherence.wka1=192.168.75.33 -Dtangosol.coherence.wka2=192.168.75.32"
  export JAVA_OPTIONS="${JAVA_OPTIONS} -Dtangosol.coherence.localport=8090"
  export JAVA_OPTIONS="${JAVA_OPTIONS} -Dtangosol.coherence.localport.adjust=true"
fi

if [ "${SERVER_NAME}" = "osb_server1" -o "${SERVER_NAME}" = "osb_server2" ]
then
  echo "Customizing USER_MEM_ARGS for SERVER_NAME ${SERVER_NAME}"
  export USER_MEM_ARGS="-Xms1g -Xmx2g -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:NewSize=1g"
  echo "Customizing JAVA_OPTIONS for SERVER_NAME ${SERVER_NAME}"
  export JAVA_OPTIONS="$JAVA_OPTIONS -Djava.awt.headless=true"
fi

if [ "${SERVER_NAME}" = "owsm_server1" -o "${SERVER_NAME}" = "owsm_server2" ]
then
  echo "Customizing USER_MEM_ARGS for SERVER_NAME ${SERVER_NAME}"
  export USER_MEM_ARGS="-Xms512m -Xmx1g -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:NewSize=512m"
  echo "Customizing JAVA_OPTIONS for SERVER_NAME ${SERVER_NAME}"
  export JAVA_OPTIONS="$JAVA_OPTIONS -Djava.awt.headless=true"
fi

if [ "${SERVER_NAME}" = "ess_server1" -o "${SERVER_NAME}" = "ess_server2" ]
then
  echo "Customizing USER_MEM_ARGS for SERVER_NAME ${SERVER_NAME}"
  export USER_MEM_ARGS="-Xms512m -Xmx1g -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:NewSize=512m"
  echo "Customizing JAVA_OPTIONS for SERVER_NAME ${SERVER_NAME}"
  export JAVA_OPTIONS="$JAVA_OPTIONS -Djava.awt.headless=true"
fi

echo "End setting from UserOverrides.sh"

Tuning Fusion Middleware Control (as OS User oracle)

Reference: MOS Note „How to Enable Discovery Cache To Avoid Long Delay During Login To Fusion Middleware Control (Doc ID 1423893.1)“
On the server host01 login to wlst with weblogic user and connect to domain environment:
[oracle@host01 ~]$ /u01/app/oracle/product/FMW/Oracle_Home/oracle_common/common/bin/wlst.sh
Connect to the AdminServer:
wls:/offline> connect('weblogic','welcome1','t3://192.168.75.32:7001')
Change location to domain custom tree
wls:/base_domain/serverConfig/> domainCustom()
Set variables:
wls:/soa_domain/domainCustom/> myMBean=ObjectName('emoms.props:Location=AdminServer,name=emoms.properties,type=Properties,Application=em')

wls:/soa_domain/domainCustom/> types=['java.lang.String', 'java.lang.String']

wls:/soa_domain/domainCustom/> type=['java.lang.String']
Set property oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_USE_CACHED_RESULTS=true:
wls:/soa_domain/domainCustom/> params=['oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_USE_CACHED_RESULTS', 'true']

wls:/soa_domain/domainCustom/> mbs.invoke(myMBean,'setProperty',params,types)
Set property oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_MAX_CACHE_AGE=7200000:
wls:/soa_domain/domainCustom/> params=['oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_MAX_CACHE_AGE','7200000']

wls:/soa_domain/domainCustom/> mbs.invoke(myMBean,'setProperty',params,types)
Set property oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_MAX_WAIT_TIME=10000:
wls:/soa_domain/domainCustom/> params=['oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_MAX_WAIT_TIME','10000']

wls:/soa_domain/domainCustom/> mbs.invoke(myMBean,'setProperty',params,types)
Invoke getProperty operations to display and confirm parameter values (Values returned by wlst are in red):
Display changes added:
wls:/soa_domain/domainCustom/> param=['oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_USE_CACHED_RESULTS']

wls:/soa_domain/domainCustom/> mbs.invoke(myMBean,'getProperty',param,type)

'true'

wls:/soa_domain/domainCustom/> param=['oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_MAX_CACHE_AGE']

wls:/soa_domain/domainCustom/> mbs.invoke(myMBean,'getProperty',param,type)

'7200000'

wls:/soa_domain/domainCustom/> param=['oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_MAX_WAIT_TIME']

wls:/soa_domain/domainCustom/> mbs.invoke(myMBean,'getProperty',param,type)

'10000'

Tuning the WebLogic Server Start: Avoiding JVM Delays Caused by Random Number Generation

Change the JVM random generation from /dev/random to /dev/urandom. For more Information refer to the Oracle Documentation:
Go to the file java.security and change the parameter securerandom.source:
Server host01 (as OS User oracle):
[oracle@host01 ~]$ vi /u01/app/oracle/product/JAVA/jdk/jre/lib/security/java.security
Old value:
securerandom.source=file:/dev/random
Change to:
securerandom.source=file:/dev/urandom
Repeat the step on the Server host02.example.com.
Restart the Admin and all Managed Servers.

Configure the SOA Purging via Enterprise Manager Fusion Middleware Control

Go to Fusion Middleware Control
Navigate to SOA -> soa-infra:
Then to SOA Infrastructure -> SOA Administration -> Auto Purge:
The Purge Configuration Page appears. You can set the scheduling options, Type of Purge (single or parallel) and another settings: