Oracle Fusion Middleware & Application Server

Wednesday, September 26, 2018

Java 11 General Availability

Right on time as scheduled Java 11 has become General Availability. This is the first Java Release under the new license with the so called Long Term Support (LTS).

The latest Java SE 11 (LTS) can be found under https://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html


But before using this release in productive environments, just make sure that you really meet the new license or consult your Oracle Sales ;-)

Friday, July 6, 2018

Documentation for Oracle Enterprise Manager 13c Release 3 (13.3.0.0) available

Since a few days the latest Release of Oracle Enterprise Manager 13c Release 3 (13.3.0.0) is available for download (see my blogpost "Oracle Enterprise Manager 13c Release 3 (13.3.0.0) available" ) but the corresponding documentation was not yet available.

But now Oracle also uploaded the documentation for Oracle Enterprise Manager 13c Release 3 (13.3.0.0), which can be found under https://docs.oracle.com/cd/cloud-control-13.3/index.html


Under the section "What's New" you can find all new features of the latest Enterprise Manager 13c Release 3 (13.3.0.0).
Some highlights are:

  • Customization of the Enterprise Manager Login Page
  • Fusion Middleware Section:
    • MSI Startup and Shutdown possibilities for WebLogic Managed Servers while the AdminServer is unavailable
    • Now you can start the Admin Server of a WebLogic Server Domain through the Node Manager

The full list of the New Features can be found under https://docs.oracle.com/cd/cloud-control-13.3/EMCON/GUID-503991BC-D1CD-46EC-8373-8423B2D43437.htm#EMCON-GUID-503991BC-D1CD-46EC-8373-8423B2D43437


Wednesday, July 4, 2018

Oracle Enterprise Manager 13c Release 3 (13.3.0.0) available

The lastest Release of Oracle Enterprise Manager 13c Release 3 (13.3.0.0) is available for download under Oracle Technology Network: https://www.oracle.com/technetwork/oem/enterprise-manager/downloads/index.html



The Oracle Enterprise Manager 13c Release 3 (13.3.0.0) is available for following Operating Systems:

  • Linux x86-64 (64-bit)
  • Windows x86-64 (64-bit)
  • Solaris Operating System (SPARC)
  • Solaris Operating System (x86-64)
  • IBM AIX on POWER Systems (64-bit)
  • HP-UX Itanium (64-bit)
Unfortunately the Documentation for Oracle Enterprise Manager 13c Release 3 (13.3.0.0) is currently not yet uploaded under https://docs.oracle.com/en/enterprise-manager/ . I hope it will be uploaded within the next days.


Friday, June 29, 2018

Oracle Forms 12.2.1.3.0 and FRM- 93552 on Windows

I recently had a project for installing and configure Oracle Forms & Reports 12.2.1.3.0 on a Windows 2016 Server. While the installation and configuration of Oracle Forms & Reports 12.2.1.3.0 went really smooth, I was hitting directly after using the Oracle provided Test Forms under http://:/forms/frmservlet the FRM-93552 error.

The official Oracle Documentation states that you have to install the Microsoft Visual C++ Redistributable 2012 (VC++ 11.0), but with this Version you will hit the FRM-93552 error message while calling your Forms.

You will need to install the Microsoft Visual C++ Redistributable 2010 (VC++ 10.0), which you can find under following link https://www.microsoft.com/en-us/download/details.aspx?id=14632



Just install the above mentioned version of the Microsoft Visual C++ Redistributable 2010, you can have multiple version of the Microsoft Visual C++ Redistributable package at the same time on your server.

After the installation of the Microsoft Visual C++ Redistributable 2010 simple stop and start your Managed Server for Oracle Forms and the problem with the FRM-93552 error is gone.


Wednesday, May 23, 2018

Oracle Reports 12c and DESTYPE=blobdestination

Last week a colleague of mine contacted me to support him for a problem to configure and use Oracle Reports 12c (12.2.1.2.0 and 12.2.1.3.0) with DESTYPE=blobdestination, which means instead of displaying a rendered Report like PDF or XLS or HTML in the Browser to store the generated Report in a LOB into an underlying table in an Oracle Database.

At first you will need to download the BLOBDestination11g.jar (even when its compiled for Oracle Reports 11g, you can use it with Oracle Reports 12c) from My Oracle Support Note 11514155.1 https://support.oracle.com/epmos/faces/DocContentDisplay?id=1151455.1

Transfer the BLOBDestination11g.jar to your Server hosting your Oracle Forms & Reports 12c (e.g. /tmp) and copy it as BLOBDestination.jar to $ORACLE_HOME/reports/jlib

# Copy BLOBDestination11g.jar to $ORACLE_HOME/reports/jlib
cd /tmp
cp BLOBDestination11g.jar $ORACLE_HOME/reports/jlib/BLOBDestination.jar

As next we need to create a table which should receive our generated Reports PDF document.

# connect to your application schema and create following table
sqlplus test/Oracle12c@frrepo
SQL> create table executed_reports ( 
 ID            NUMBER NOT NULL
,CREATED_DATE TIMESTAMP DEFAULT SYSDATE
,CREATED_BY   VARCHAR2(20) DEFAULT USER
,REPORT_DOC   BLOB
,FILE_NAME    VARCHAR2(255));

The next part is depending if you are using an Oracle Reports In-Process Server or a Standalone Server.

Configuration for an In-Process Server

Connect to your Server which is hosting your Oracle Forms & Reports 12c environment and navigate to your $DOMAIN_HOME. There you will have to modify your eventually already existing setUserOverrides.sh or create a new setUserOverrides.sh in $DOMAIN_HOME/bin and modify the rwserver.conf configuration file for your In-Process Server

# add following block or 
# create a new setUserOverrides.sh with following block
# and align the Name of the Managed Server for Reports
# and align the ORACLE_HOME_PATH to your ORACLE_HOME

if [ "${SERVER_NAME}" = "<Name_ManagedServer_Reports>" ]; then
   export POST_CLASSPATH=<ORACLE_HOME_PATH>/reports/jlib/BLOBDestination.jar:$POST_CLASSPATH
fi

# e.g.

if [ "${SERVER_NAME}" = "MS_REPORTS" ]; then
   export POST_CLASSPATH=/u00/app/oracle/product/fmw-fr-12.2.1.2.0/reports/jlib/BLOBDestination.jar:$POST_CLASSPATH
fi

Then you will have to modify the rwserver.conf for your In-Process Server and add a new destination type. The rwserver.conf you can find under $DOMAIN_HOME/config/fmwconfig/components/<Name_ManagedServer_Reports>/applications/reports_12.2.1/configuration

# find the line with 
# <destination destype="WebDav" class="oracle.reports.plugin.destination.webdav.DesWebDAV"/>
# and add following line with the new destination type=BLOBDestination

<destination destype="WebDav" class="oracle.reports.plugin.destination.webdav.DesWebDAV"/>
<destination destype="BLOBDestination" class="oracle.reports.plugin.destination.blob.BLOBDestination"/>

Now restart your Managed Server for Reports and you are ready.

To test, just execute a Reports Call directly in your Browser:

http://<Your_Server>:<Port_of_ManagedServer_Reports>/reports/rwservlet?report=<Your_Test_Report>.rdf&userid=<App_User>/<Password>@<TNS_ALIAS>&DESTYPE=blobdestination&DESFORMAT=PDF&DESNAME=http://<App_User>:<Pasword>@<Your_Server>:<Listener_Port>/<ORACLE_SID>/<target_table>/<BLOB_Column>/<ID_Column>/<ID_Value>/<FileName_Column>

e.g.:

http://forms12:9002/reports/rwservlet?report=test.rdf&userid=test/Oracle12c@frrepo&DESTYPE=blobdestination&DESFORMAT=PDF&DESNAME=http://test:Oracle12c@forms12:1521/FRREPO/executed_reports/report_doc/ID/1/file_name

After that you will see in your target table for the Reports a row with your generated Reports PDF Document.

Configuration for a Standalone Reports Server

Connect to your Server which is hosting your Oracle Forms & Reports 12c environment and navigate to your $DOMAIN_HOME/reports/bin. There you will have to modify the reports.sh and modify the rwserver.conf configuration file for your In-Process Server

# Search for REPORTS_CLASSPATH in reports.sh
# and add the BLOBDestination.jar

REPORTS_CLASSPATH=${ORACLE_HOME}/reports/jlib/BLOBDestination.jar:${ORACLE_HOME}/reports/jlib/rwbuilder.jar:${ORACLE_HOME}/reports/jlib/rwrun.jar:${ORACLE_HOME}/jlib/zrclient.jar; export REPORTS_CLASSPATH

Then you will have to modify the rwserver.conf for your Standalone Reports Server and add a new destination type. The rwserver.conf you can find under $DOMAIN_HOME/config/fmwconfig/components/ReportsServerComponent/<Reports_Server_Name>

# find the line with 
# <destination destype="WebDav" class="oracle.reports.plugin.destination.webdav.DesWebDAV"/>
# and add following line with the new destination type=BLOBDestination

<destination destype="WebDav" class="oracle.reports.plugin.destination.webdav.DesWebDAV"/>
<destination destype="BLOBDestination" class="oracle.reports.plugin.destination.blob.BLOBDestination"/>

After that restart your Standalone Reports Server and thats all.

To test, just execute a Reports Call directly in your Browser:

http://<Your_Server>:<Port_of_ManagedServer_Reports>/reports/rwservlet?report=<Your_Test_Report>.rdf&userid=<App_User>/<Password>@<TNS_ALIAS>&DESTYPE=blobdestination&DESFORMAT=PDF&DESNAME=http://<App_User>:<Pasword>@<Your_Server>:<Listener_Port>/<ORACLE_SID>/<target_table>/<BLOB_Column>/<ID_Column>/<ID_Value>/<FileName_Column>

e.g.:

http://forms12:9002/reports/rwservlet?report=test.rdf&userid=test/Oracle12c@frrepo&DESTYPE=blobdestination&DESFORMAT=PDF&DESNAME=http://test:Oracle12c@forms12:1521/FRREPO/executed_reports/report_doc/ID/1/file_name

After that you will see in your target table for the Reports a row with your generated Reports PDF Document.


Wednesday, May 9, 2018

Tracking applied Patches in WebLogic Server outfile

With a small trick you can track your applied patches in your Oracle Software Home on your Oracle WebLogic Server in the outfile.

Simply add -Dweblogic.log.DisplayPatchInfo=true to your already existing setUserOverrides.sh or create a new setUserOverrides.sh in your $DOMAIN_HOME/bin directory.

 # Display applied patches in WebLogic Server outfile
JAVA_OPTIONS="$JAVA_OPTIONS -Dweblogic.log.DisplayPatchInfo=true "

After that just restart your WebLogic Server and you will find in the outfile of your WebLogic Server following entries:

 # Snippet from outfile
<May 9, 2018 9:15:30 AM CEST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 12.2.1.3.0 Thu Aug 17 13:39:49 PDT 2017 1882952
OPatch Patches:
27342434;21933966;Thu Apr 26 16:14:03 CEST 2018;WLS PATCH SET UPDATE 12.2.1.3.180417
26355633;21447583;Thu Aug 31 14:26:20 CEST 2017;One-off
26287183;21447582;Thu Aug 31 14:26:10 CEST 2017;One-off
26261906;21344506;Thu Aug 31 14:25:53 CEST 2017;One-off
26051289;21455037;Thu Aug 31 14:25:48 CEST 2017;One-off>

The provided data in the outfile is in following format:

  1. Patch Number
  2. Unique Patch ID
  3. On which date and time the Patch was applied
  4. Patch description
To crosscheck just run an opatch lsinventory in order to validate the provided data in your outfile:

 cd $ORACLE_HOME/OPatch
./opatch lsinventory | grep applied

Patch  27342434     : applied on Thu Apr 26 16:14:03 CEST 2018
Patch  26355633     : applied on Thu Aug 31 14:26:20 CEST 2017
Patch  26287183     : applied on Thu Aug 31 14:26:10 CEST 2017
Patch  26261906     : applied on Thu Aug 31 14:25:53 CEST 2017
Patch  26051289     : applied on Thu Aug 31 14:25:48 CEST 2017

As you can see, the provided patch data in the outfile of your WebLogic Server is exactly the same as in the opatch utility.


Wednesday, March 21, 2018

Oracle SOA Suite 12c - Purge

Many people struggle with the configuration and execution of the SOA Purge functionality under Oracle SOA Suite 12c.

Oracle provided with SOA Suite 12c a nice web interface for enabling, and scheduling the AutoPurge functionality within the Enterprise Manager Fusion Middleware Control 12c.

But in case you just enable, schedule and define your retention time for the AutoPurge within this web interface nothing will be happen :-( You have to modify in addition some MBeans in order to enable and execute your AutoPurge Schedules correctly.

Simply login to your Enterprise Manager Fusion Middleware Control 12c (usually http://servername:/em), open the Target Navigation, navigate to "SOA/soa-infra" (in case you got a clustered environment, simply pick one of the available soa-infra, changes will be valid for all cluster members):


Under your soa-infra open the menu "SOA Infrastructure / SOA Administration / Auto Purge"


In the Auto Purge option you will have to define multiple sections.

  • Pick your "Auto Purge Job":
    • SOA Flow Purge Job 1
    • SOA Flow Purge Job 2
    • SOA In-Memory Flow Purge Job
    • Integration Workload Statistics Purge Job
    • Health Check Purge Job
  • Activate the "Enable" button
  • Define your "Job Schedule"
  • Set your "Retain Data"
  • Hit the Apply Button
  • Finally click the Link "More Auto Purge Configuration Properties...": this will bring you to the System MBean Browser to set the necessary options, so that your Auto Purge Job will really do something :-)


In the System MBean Browser you will be pointed directly to the Application Defined MBeans: AutoPurgeJobConfig:purge.
There you will find the Attribute "PurgeJobDetails", simply click it


Under the Attribute PurgeJobDetails you will see under the Key following Structure:

  • PurgeJobDetails
    • DELETE_INSTANCES_AUTO_JOB1
    • DELETE_INSTANCES_AUTO_JOB2
    • DELETE_INMEMORY_JOB1
    • DELETE_AWR_JOB1
    • DELETE_HC_JOB1
Open the DELETE_INSTANCES_AUTO_JOB1


Below the DELETE_INSTANCES_AUTO_JOB1 you will need to align the Key / Element pairs:

  • maxCreationPeriodDays, default value is -1, which means it's DISABLED !!!
  • minCreationPeriodDays, default value is -1, which means it's DISABLED !!!
  • purgePartitionedComponent, default is false, which means you don't have Partitions in your Metadata Repository tables


In my case, I have defined a retentionPeriod of 7 (under the Auto Purge Option, it's called Retain Data), so I have to set my maxCreationPeriodDays to retentionPeriod + 1 = 8 and my minCreationPeriodDays I define with 250. In case your SOA Metadata Repository was created with the profile LARGE in the Repository Creation Utility (rcu), you will have Partitions in several Metadata Repository tables, so you will need to align the value for purgePartitionedComponent from false to true.


Finally go up to the top of the current page and hit the button "Apply" to save your changes.


Now your Auto Purge Job will really purge data in your SOA Metadata Repository. Either wait to the next scheduled execution or execute the Auto Purge Job manually.


In order to check the executions of your Auto Purge Jobs, you can easily query the table SOA_PURGE_HISTORY under your SOAINFRA schema. Under the columns START_TIME and END_TIME you will see the start and end time of the Purge Job, under the column T you can see if your Job execution was single or parallel loop, under the column THREAD you will find the number of parallel threads and under the column S you will find the status of your Job execution, C = Completed, R = Running

 select * from SOA_PURGE_HISTORY order by 1;
    JOB_NO START_TIME                     END_TIME                       T     THREAD S
---------- ------------------------------ ------------------------------ - ---------- -
       442 14-MAR-18 12.00.03.227904 AM   14-MAR-18 12.00.03.677408 AM   S          0 C
       462 15-MAR-18 12.00.00.795402 AM   15-MAR-18 12.00.01.217016 AM   S          0 C
       482 16-MAR-18 12.00.03.573783 AM   16-MAR-18 12.00.04.036468 AM   S          0 C
       483 17-MAR-18 12.00.02.378165 AM   17-MAR-18 12.00.02.863812 AM   S          0 C
       503 18-MAR-18 12.00.02.381384 AM   18-MAR-18 12.00.02.862942 AM   S          0 C
       523 19-MAR-18 12.00.01.608355 AM   19-MAR-18 12.00.02.016223 AM   S          0 C
       524 20-MAR-18 12.00.03.018806 AM   20-MAR-18 12.00.03.347581 AM   S          0 C
       543 21-MAR-18 12.00.02.885658 AM   21-MAR-18 12.00.03.341806 AM   S          0 C
       544 21-MAR-18 01.12.56.213402 PM   21-MAR-18 01.12.58.535938 PM   S          0 C

Enjoy your SOA Purging :-)


Wednesday, March 14, 2018

Oracle 18c - SQLPlus cute Features

As I got my fingers on the latest Oracle 18c Release, I had the chance to test some cute new features within SQLPlus, which are really helpful.

SET LINESIZE WINDOW:

The new option WINDOW for SET LINESIZE automatically adjust your linesize to your current window size.

As you can see in the below screenshot, the first select was executed without the linesize option, so you will have the usual line break in your result set. Afterwards I execute "SET LINESIZE WINDOW", re-executed the select statement and you can see that the linesize is automatically adjusted to my current window size.


SET FEEDBACK ON SQL_ID:

This new option SQL_ID for SET FEEDBACK ON is my personal favorite. This option will provide you on the end of your executed SQL Statement the SQL_ID.

sqlplus test_new/Oracle18c@pdb01
SQL> set feedback on sql_id
SQL> select * from cat;

TABLE_NAME                     TABLE_TYPE
------------------------------ -----------
T1                             TABLE
V1                             VIEW

2 rows selected.

SQL_ID: adcm6b60qf64q

Enjoy the new 18c Features :-)

Friday, March 9, 2018

Oracle 18c - ALTER USER RENAME

2 years ago, I have published an article series about the undocumented feature "ALTER USER RENAME":

As I was getting access to an Oracle 18c Database, I was trying directly, if the ALTER USER RENAME still works => IT'S STILL WORKING :-)

Let's create a test user with one table and one view.
sqlplus sys/<password>@pdb01 as sysdba

SQL> select banner from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production

SQL> create user test identified by "Oracle18c" default tablespace users quota unlimited on users;

User created.

SQL> grant connect, resource, create table, create view to test;

Grant succeeded.

SQL> connect test/Oracle18c@pdb01

SQL> create table t1 (id number, col1 varchar2(20));

Table created.

SQL> insert into t1 values (1,'Test 1');

1 row created.
    
SQL> insert into t1 values (2, 'Test 2');

1 row created.

SQL> commit;

Commit complete.

SQL&gt create view v1 as select * from t1;


Now let's rename the above created user TEST to TEST_NEW
sqlplus sys/<password>@pdb01 as sysdba

SQL> alter session set "_enable_rename_user"=true;

Session altered.

SQL> alter system enable restricted session;

System altered.

SQL> alter user test rename to test_new identified by "Oracle18c";

User altered.

SQL> alter system disable restricted session;

System altered.

Now let's try to connect with the renamed user TEST_NEW
sqlplus test_new/Oracle18c@pdb01 as sysdba

SQL> select * from t1;

 ID COL1
---------- --------------------
  1 Test 1
  2 Test 2

SQL> select * from v1;

 ID COL1
---------- --------------------
  1 Test 1
  2 Test 2
So even with Oracle18c the undocumented feature ALTER USER RENAME is still working :-)

Wednesday, December 13, 2017

Oracle Traffic Director 12.2.1.3.0 in Docker

As I am currently working a lot with Docker and I already managed to place Oracle Forms & Reports into Docker, my next goal was to use the Oracle Traffic Director as well in Docker.

Based on my blog post "How to install and configure Oracle Traffic Director 12c - fully unattended" http://dirknachbar.blogspot.ch/2017/09/how-to-install-and-configure-oracle.html, I have converted and aligned my scripts to be used in a Docker Image.

The Oracle Traffic Director Image is based on my already published OracleJDK and OracleFMWInfrastrcure Images (https://github.com/DirkNachbar/Docker).

Just get a copy of my complete GitHub Repository (Download all required software binaries from Oracle) and you can start with building at first the OracleJDK Image:

cd OracleJava/java-8
./buildDockerImage.sh

After that, just create on top of the OracleJDK Image the Oracle Fusion Middleware WebLogic Infrastructure:

cd OracleFMWInfrastructure/dockerfiles
./buildDockerImage.sh -v 12.2.1.3

Finally you can create Oracle Traffic Director Image, based on my instructions in GitHub https://github.com/DirkNachbar/Docker/tree/master/OracleOTD/dockerfiles and after the successful build of the OTD Image, you can execute the docker-compose file as described in the GitHub https://github.com/DirkNachbar/Docker/tree/master/OracleOTD/samples

Enjoy Oracle Traffic Director in Docker ;-)

Thursday, December 7, 2017

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


Tuesday, December 5, 2017

Oracle Forms & Reports 12.2.1.3.0 with FADS in Docker

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

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

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





Friday, December 1, 2017

Oracle Forms & Reports 12.2.1.3.0 in Docker

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

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

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



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

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

Thursday, November 30, 2017

Oracle Forms & Reports 12.2.1.2.0 in Docker

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


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

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

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

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

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


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

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


Tuesday, November 7, 2017

AdminServer under WebLogic 12.2.1.2.0 consumes more than defined -Xmx

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

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

Check the current defined -Xmx size

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

Now valid with the top command the current RES size

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

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

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

The next step is to take a heap dump with jmap

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

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

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


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


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

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



Tuesday, October 24, 2017

Manually rotate WebLogic Server Logfiles

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

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

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

domain.properties

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

rotatelogs.py

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

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

servers_list=''
configfile=''

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

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

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

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

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

connectAdmin()

domainRuntime()

servers=servers_list.split(":")

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

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

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

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

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

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

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

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

Happy rotating of WebLogic Server Logfiles . . .

Thursday, October 12, 2017

Changing Logfiles Permission of WebLogic and Node Manager Logfiles to 644

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

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

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

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

umask 027


mypwd="$(pwd)"
. . .

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

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

umask 022


mypwd="$(pwd)"
. . .

# Snippet from $DOMAIN_HOME/bin/startWebLogic.sh

. . .
umask 027


mypwd="$(pwd)"
. . .

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

. . .
umask 022


mypwd="$(pwd)"
. . .

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

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



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


Tuesday, October 10, 2017

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

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

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

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

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

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

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

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


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



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



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

Happy ODC Appreciation Day to everyone :-)

Friday, September 29, 2017

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

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

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

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

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

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

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

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

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

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

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


Example:

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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


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

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


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

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

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


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

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

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

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

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

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

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

OPatch succeeded.

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

. . .
. . .

Interim patches (9) :

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

. . .
. . .

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

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

Wednesday, September 20, 2017

Decrypt any encrypted password in your WebLogic Server Domain

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

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

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

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

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

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

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

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

Happy decrypting :-)