Oracle 8i | Oracle 9i | Oracle 10g | Oracle 11g | Oracle 12c | Miscellaneous | PL/SQL | SQL | Oracle RAC | Oracle Apps | Linux

Oracle Forms and Reports Services 11gR2 Configuration Notes

This article is a collection of useful notes on a variety of topics related to configuration of Oracle Forms and Reports Services 11gR2.

Related articles.

Installation

This site contains a number of articles describing the installation of WebLogic Server 11g and Oracle Forms and Reports Services 11gR2 on Linux and Windows. You can find them here.

Configuration Utility

If you choose a software-only installation, you can initiate the configuration steps using the following command.

$FR_HOME/bin/config.sh

This is also useful if your configuration phase fails and you want to rerun it after making the necessary changes to fix the issues.

Environment Variable Settings

The basic WebLogic environment variable settings are described in the installation guides, but the following list accounts for most of the scenarios you are likely to come across on the server, including forms compilation from the command line. Remember to adjust the FORMS_PATH and TWO_TASK variables as required.

# Middleware
export MW_HOME=/u01/app/oracle/middleware
export WLS_HOME=$MW_HOME/wlserver_10.3
export WL_HOME=$WLS_HOME
export ORACLE_HOME=$MW_HOME/Oracle_FRHome1
export ORACLE_INSTANCE=$MW_HOME/asinst_1
export FR_HOME=$ORACLE_HOME
export FR_INST=$ORACLE_INSTANCE
export DOMAIN_HOME=$MW_HOME/user_projects/domains/ClassicDomain
export JAVA_HOME=$MW_HOME/jrockit-jdk1.6.0_37-R28.2.5-4.1.0

# Forms compilation
export PATH=.:$FR_HOME/bin:$FR_HOME/forms/mesg:$PATH
export LD_LIBRARY_PATH=$FR_HOME/jdk/jre/lib/amd64/native_threads:$FR_HOME/jdk/jre/lib/amd64:$FR_HOME/lib:$FR_HOME/jdk/jre/lib/amd64/server
export FORMS_BUILDER_CLASSPATH=$FR_HOME/jlib/
export FORMS_PATH=[*** add the path to your forms ***]
export REPORTS_PATH=[*** add the path to your reports here ***]
export TWO_TASK=ORCL
export TNS_ADMIN=$FR_HOME/network/admin
export TERM=vt220
export ORACLE_TERM=$TERM

# Reports server: Adjust as required to allow forms to get the reports server name
# using "tool_env.getvar('REPORTS_SERVER_NAME', v_rep_server);"
export REPORTS_SERVER_NAME=rep_wls_reports_ol6-forms_asinst_1

I tend to use FR_HOME and FR_INST in place of ORACLE_HOME and ORACLE_INSTANCE as I think they are more descriptive. It's worth setting both as many documents don't follow my preference.

A number of the sections below assume these environment variables have been set.

Configuration Files

Many of the 11gR2 Forms and Reports Services configuration files are the same as those in AS10g, but their locations differ. It is often easier to find things by searching below the $MW_HOME, as shown below.

$ find $MW_HOME -name formsweb.cfg

The files I tend to visit the most are listed below.

formsweb.cfg: Definitions of individual configurations.
$DOMAIN_HOME/config/fmwconfig/servers/WLS_FORMS/applications/formsapp_11.1.2/config/formsweb.cfg

default.env: Runtime environment parameter definitions.
$DOMAIN_HOME/config/fmwconfig/servers/WLS_FORMS/applications/formsapp_11.1.2/config/default.env

tnsnames.ora:
$FR_HOME/network/admin/tnsnames.ora
$FR_INST/config/tnsnames.ora

dads.conf: Database Access Descriptor (DAD) defintions.
$FR_INST/config/OHS/ohs1/mod_plsql/dads.conf

fmrweb.res: Key definition file for webforms.
$FR_INST/config/FormsComponent/forms/admin/resource/US/fmrweb.res

I usually make one of the "tnsnames.ora" files a symbolic link to the other, so I don't accidentally get them out of sync.

A fuller list of configuration files can be seen here.

A couple of the important files are described below.

formsweb.cfg

The "formsweb.conf" file is one of the most important configuration files as it allows you to define multiple configurations, or environments, within a single software installation. You can see a copy of the default "formsweb.cfg" file here.

Typically, each separate environment will have it's own section in the "formsweb.conf" file, where environment-specific settings are placed. You only need to specify a value in a Named Configuration if it differs from that in the default configuration. For example, a named configuration might be simple, like the following.

[myapp]
form=MyDefaultForm.fmx
pageTitle=My Application Title
width=1024
height=768
separateFrame=true
imageBase=codebase
archive=frmall.jar,my_icons.jar
envFile=/path/to/myapp.env

Note. The "archive" entry includes the "my_icons.jar", which assumes you have placed you icons in this JAR file and the JAR file is placed in the "$FR_HOME/forms/java" directory.

A very useful entry is the "envFile" parameter, that can associate an environment file with a named configuration. This allows each named configuration run with a unique set of environment variables, including the FORMS_PATH variable amongst others. Any custom environment files should be derived from the "default.env" file, described below.

Changes to this file to not require a restart of any components. The changes can be done directly to the file, or through Enterprise Manager.

default.env

The "default.env" file defines the forms runtime parameters for a specific environment. All custom environment files should be derived from this file. You can see and example of the "default.env" file here.

Environment variables specified in an ".env" file override existing environment settings. If an environment variable is not defined in the ".env" files, the value from the session that started the server process will be used.

Changes to these ".env" files do not require a restart of any components. The changes can be done directly to the file, or through Enterprise Manager.

Compiling Forms

Forms, menus and libraries are compiled using the frmcmp.sh or frmcmp_batch.sh scripts. You can find these in the "$FR_INST/bin/" directory. Running the command without any parameters displays the usage information. Some examples of the basic syntax are shown below.

$ export DISPLAY=mypc:0.0
$ $FR_INST/bin/frmcmp.sh module=myform.fmb module_type=form userid=scott/tiger

$ $FR_INST/bin/frmcmp_batch.sh myform.fmb scott/tiger module_type=form batch=yes output_file=myform.fmx compile_all=special

Remember, frmcmp.sh requires and X Server, so you will need to SSH tunnel (ssh -X oracle@server) or set your DISPLAY environment variable (export DISPLAY=mypc:0.0).

You can easily script the compilation of all your forms-related objects, as shown by the following script.

#!/bin/bash

export FORMS_PATH=/path/to/my/forms
#export TWO_TASK=ORCL

export DB_USER=scott
export DB_PASSWD=tiger
export DB_SERVICE=ORCL

# Libraries
for FILE in `ls $FORMS_PATH/*.pll`; do
  OUTPUT=${FILE/pll/plx}
  echo "$FILE -> $OUTPUT"
  $FR_INST/bin/frmcmp_batch.sh $FILE $DB_USER/$DB_PASSWD@$SERVICE \
    module_type=library batch=yes output_file=$OUTPUT compile_all=special
done

# Menus
for FILE in `ls $FORMS_PATH/*.mmb`; do
  OUTPUT=${FILE/mmb/mmx}
  echo "$FILE -> $OUTPUT"
  $FR_INST/bin/frmcmp_batch.sh $FILE $DB_USER/$DB_PASSWD@$SERVICE \
    module_type=menu batch=yes output_file=$OUTPUT compile_all=special
done

# Forms
for FILE in `ls $FORMS_PATH/*.fmb`; do
  OUTPUT=${FILE/fmb/fmx}
  echo "$FILE -> $OUTPUT"
  $FR_INST/bin/frmcmp_batch.sh $FILE $DB_USER/$DB_PASSWD@$SERVICE \
    module_type=form batch=yes output_file=$OUTPUT compile_all=special
done

Compiling Forms From a Non-Oracle User

In Forms 11g using SUDO is the recommended way to compile forms as a non-Oracle user.

As the root user, edit the "/etc/sudoers" file with the following entry (as a single line).

myuser ALL=(oracle) NOPASSWD: /u01/app/oracle/middleware/asinst_1/bin/frmcmp.sh,
   NOPASSWD: /u01/app/oracle/middleware/asinst_1/bin/frmcmp_batch.sh

You can now run the compile commands from the user "myuser" by using the "sudo -u oracle" prefix. All environment variables discussed above must be set for this to work. An example is shown below.

$ sudo -u oracle $FR_INST/bin/frmcmp_batch.sh myform.fmb scott/tiger@orcl \
    module_type=form batch=yes output_file=myform.fmx compile_all=special

Note. The TWO_TASK environment variable does not work correctly using this method, so you should use the "username/password@service" method for database authentication.

Forms Builder

If you have set the environment variables described above, using the X Server based Forms builder should be as simple as issuing the frmbld command.

$ export DISPLAY=mypc:0.0
$ frmbld &

OR

$ $FR_INST/bin/frmbld.sh &

Compiling Reports

Reports are compiled using the rwconverter.sh script. You can find this in the "$FR_INST/config/reports/bin/" directory. Running the command without any parameters displays the GUI screen. An example of the command line syntax is shown below.

$ $FR_INST/config/reports/bin/rwconverter.sh userid=scott/tiger batch=yes \
    source=myreport.rdf stype=rdffile dtype=repfile overwrite=yes compile_all=yes

Reports Builder

If you have set the environment variables described above, using the X Server based Reports builder should be as simple as runing the rwbuilder.sh command.

$ export DISPLAY=mypc:0.0
$ $FR_INST/config/reports/bin/rwbuilder.sh &

Webutil Configuration

Additional configuration is possible by editing the "$FR_INST/config/FormsComponent/forms/server/webutil.cfg" file.

Jar File Security Warning Hangs

Unsigned or self-signed jar files cause a browser security warning dialog to appear.

On some clients the behavior of this dialog is rather erratic, sometimes hanging and preventing you from taking the appropriate action. This seems to relate to two MOS notes.

The solution is to alter the order of the Jar files set by the "archive" and/or "WebUtilArchive" entries in the "formsweb.cfg" file. In the case of the "jacob.far" file, if you have it listed in the "archive" parameter, you will probably need to make the following change.

#Before
archive=frmall.jar,jacob.jar

#After
archive=jacob.jar,frmall.jar

If you have instead listed it in the "WebUtilArchive" parameter, you will probably need to make the following change.

#Before
WebUtilArchive=frmwebutil.jar,jacob.jar

#after
WebUtilArchive=jacob.jar,frmwebutil.jar

You should not need to restart any services for this to take effect.

Sign JAR Files

Edit the "$FR_INST/bin/sign_webutil.sh" file, setting the following entries.

DN_CN="My Name"
DN_OU="My Department"
DN_O="My Company"
DN_C=GB
KEYSTORE_PASSWORD=password1
JAR_KEY_PASSWORD=password1

Issue to the following command to sign the specified JAR file. In this case it is the jacob.jar file.

$ $FR_INST/bin/sign_webutil.sh $FR_HOME/forms/java/jacob.jar

If you attempt to re-sign a JAR file that is already signed, it will contain multiple signatures in the "META-INF" directory, which will probably result in the following error.

sun.security.validator.ValidatorException: PKIX path validation failed: 
  java.security.cert.CertPathValidatorException: signature check failed

To fix this, unpack the JAR, remove the signatures from the "META-INF" directory and re-pack the JAR. The following example shows how this can be done for the "jacob.jar" file.

mkdir $FR_HOME/forms/java/temp
cd $FR_HOME/forms/java/temp

export MYJAR=jacob.jar
unzip ../$MYJAR
rm -f META-INF/*.SF META-INF/*.DSA  META-INF/*.MF
# You may need to remove more, so visually check.
$JAVA_HOME/bin/jar -cvf $MYJAR *
mv $MYJAR ..
rm -Rf *

cd ..
rmdir $FR_HOME/forms/java/temp

REP-52262: Diagnostic output is disabled.

Reports 11.1.2.1 turns off the diagnostics output by default. If you need to turn it on, do the following.

Edit the "$DOMAIN_HOME/config/fmwconfig/servers/WLS_REPORTS/applications/reports_11.1.2/configuration/rwservlet.properties" file as follows.

# From
<inprocess>yes</inprocess>

# To
<inprocess>yes</inprocess>

<webcommandaccess>L2</webcommandaccess>

Restart WLS_REPORTS server.

Once you have finished testing, you will probably want to remove the new entry and restart the WLS_REPORTS server.

For more information see:

Hope this helps. Regards Tim...

Back to the Top.