Installing and Configuring Standalone Web Logic Server Explained

Integrated WebLogic Server (WLS) is a server that is managed by JDeveloper. We can run applications directly from the JDeveloper to test and debug without needing to explicitly package or deploy the application as these tasks are automated. While most of the development testing can be done on Integrated WLS there are some functionality e.g. SOA customizations that require a standalone domain.  Standalone domain is independent from JDeveloper; the instance needs to be manually maintained by the developer and applications need to be manually packaged and deployed to it. For standalone domain the Fusion Applications framework components are installed closely matching the production environment. As such standalone domain allows developer to simulate production environment more closely allowing potential issues to be detected earlier in the development cycle.
This document is intended to describe the process of creating and configuring a standalone WLS domain. This document will only cover Windows environments, steps for Linux and Unix based operating system would be similar, however there would be some differences e.g. on how the file paths are defined.

Pre-requisites

In order to follow the steps in this document you will need to have Fusion Applications JDeveloper environment and Python installed.

Domain Creation Wizard

The Domain Creation Wizard is the tool provided to collect configuration information from the developer and store the information into properties file. The properties file can then be used to create and configure a domain. The main difference between integrated and standalone domain types in the wizard is that integrated domain can be automatically created based on user input while standalone domain must be manually created using the properties file. There are also differences in the information gathered from the user, however details of the input are not covered here rather can be referred from the documentation.

Domain Creation Scripts

The Domain Creation Scripts are responsible for creating, extending and configuring the domain. For integrated domain the script can invoked from the Domain Creation Wizard (based on check-box on the final screen), for the standalone domain the script needs to be manually invoked.  The scripts are located under:

%JDEV_MW_HOME%\ jdeveloper\fadev\bin

Where JDEV_MW_HOME points to the Oracle home directory to which JDeveloper was installed. The structure of the scripts is as follows (indentation indicates the relationships between the scripts):

  • FADevCreateDomain.py - this is the main script to create a standalone domain
    • FADevInstallMwHome.py - this script installs the Middleware (MW) components to be used by a standalone domain.
    • FADevFusionAppsDomain.py - this script creates the Fusion Applications standalone domain.
    • FADevConfigure.py - this script configures the domain, used for both integrated and standalone domains.
      • FADevExtendDefaultDomain.py - extends the default domain with FA relevant templates for integrated domain, not used for standalone domain creation.
      • FADevConfigDomain.py - this script is ran once the domain creation is done to configure the domain e.g. to use LDAP. Used for both integrated and standalone domains.

Domain Creation

The standalone domain creation consists of the following steps;

  1. Obtain access to the install files
  2. Use the Domain Creation Wizard to populate a properties file based on which the standalone domain is created
  3. Execute script from command prompt to install the Middleware (MW) components to be used by a standalone domain.
  4. Execute script from command prompt to install patches for Application Technology Group Product Family (AtgPf)
  5. Execute script from command prompt to create the domain
  6. Start and test the server

Step 1: Obtain Install Files

In order to create the standalone server we need access to the installer files for various components. The installer files are platform specific and can either be obtained from system administrator or downloaded from eDelivery.

Option 1: Download from eDelivery

The installer files can be obtained from eDelivery  by downloading the complete set of Fusion Applications files (about 60 GB):

  1. Navigate and login to eDelivery
  2. On Search screen select "Oracle Fusion Applications" for the "Select a Product Pack" and for example “Microsoft Windows x64 (64-bit)” for "Platform"
  3. On Search results select appropriate release for example "Oracle Fusion Applications 11g Release 4 (11.1.4) Media Pack for Microsoft Windows x64 (64-bit)"
  4. On Download Screen  download all files related for example for Release 4 all 16 files name like: "Oracle Fusion Applications 11g Release 4 (11.1.4.0.0) for Microsoft Windows x64 (64-bit) Part x of 16"
Once downloaded unzip the files into suitable location, this location is the path to be used in the next step as the source for installer files

Option 2: Obtain from System Administrator

Downloading the whole 60+ GB by each developer is not scalable, so best practice is to host the needed files centrally such that developer can access them from a central location. Do note that the installer files are platform specific; if multiple platforms are supported then installer files need to be hosted for each platform. The hosted files needed are a subset of the files for the Fusion Application Release. The subset is defined in the FADevInstallMwHome.py script and consists of the following directories:

  • atgpf –installer files and patches for Application Technology Group Product Family
  • biappsshiphome – installer files and patches for Business Intelligence
  • bishiphome – Additional location for installer files and patches for Business Intelligence if included for  the release
  • odi  – installer files and patches for Data Integrator
  • soa – installer files and patches for Service-Oriented Architectures
  • wc – installer files and patches for Web Center
  • weblogic – installer files and patches for WebLogic Server
  • jdk – installer files for Java

So instead of the whole 60GB, the administrator can provide the content of these directories. Unfortunately the subset is still about 20 GB in size; still considerable less than the whole release.

Step 2: Run Domain Creation Wizard

Details of the flow are covered in the Domain Creation Wizard flow for standalone domain. The key properties to be provided:

  • Installer location: This should point to the location defined in the first step
  • Domain Location: This defines the location to which the standalone domain will be installed. Do note that for new domain the directory is expected not to exist. If it already exists the scripts will indicate this; overwrite / re-creation of the domain is not covered in this document

Running the wizard will produce a properties file and on the final screen you will be presented with references to the relevant files, take note of them e.g.:

C:\Users\jprautia\AppData\Roaming\JDeveloper\system11.1.1.6.39.62.68\o.jdevimpl.rescat2\fusion_apps_wls.properties

C:\Oracle\Middleware\jdeveloper\fadev\bin\FADevCreateDomain.py

Step 3: Install Middleware Components

First we need to install the Middleware (MW) components to be used by a standalone domain. To  run the script first set JAVA_HOME environment variable to point to the directory in which we have 64-bit JDK installed.  In command prompt set variable by executing for example:

set JAVA_HOME=C:\jdk

Also create a staging directory to be used during the installation here we created empty directory “standaloneStage”. Next we run the actual script:

C:\Oracle\Middleware\jdeveloper\fadev\bin\FADevInstallMwHome.py -m C:\standalone -i C:\download\fa -w C:\standaloneStage -v

Where:

  • -m the directory to which to install the standalone, this directory should not exist. If it exists it can be overwritten with additional parameter. Since the file structures in the installed components are very “deep” potentially causing file path length issues the recommendation is to use directory at root level in file system. Also since spaces can cause issues in the installers the recommendation is to not include spaces in the directory name or path.
  • -i the directory that contains the installers
  • -w the directory used for staging
  • -v for verbose output

Step 4: Install Patches for Application Technology Group Product Family  (ATGPF)

ATGPF contains common functionality for Fusion Applications. Before we create the domain we need to apply patches to ensure that ATGPF is up-to-date. To run the script first set ORACLE_HOME environment variable to point to the directory in which we have the AtgPf patches. In command prompt set variable by executing for example::

set ORACLE_HOME= C:\standalone\atgpf

Next we run the opatch script to do the patching:

C:\standalone\atgpf\OPatch\opatch napply C:\download\fa\atgpf\patch -jdk C:\jdk

Where:

  • -jdk location in which we have 64-bit JDK installed

Step 5: Create the Standalone Domain

Lastly we run the script to actually create the standalone domain. Before running the script check that the HOME environment variable is set by issuing command:

echo %HOME%

The variable is checked by the script and you may get error regarding property file if not set. We override the paths used in the domain creation using parameters so the value can be set to anything in our case. If parameters are not used then the value would be used to construct paths to default parameters. Set the variable using for example:

set HOME=C:\Users\jprautia

If you are installing Release 4 you have to implement a workaround described in the troubleshooting section at the end of this document under “Error regarding ‘oracle.appstrace.model’ and ‘oracle.appstrace.webapp’” otherwise domain creation will fail.

If you are installing Release 5 you have to implement a workaround described in the troubleshooting section at the end of this document under “oracle.clickhistory_template_11.1.1.jar” otherwise domain creation will fail.

Finally run the script to create the standalone domain.

C:\Oracle\Middleware\jdeveloper\fadev\bin\FADevCreateDomain.py -m C:\standalone -p C:\Users\jprautia\AppData\Roaming\JDeveloper\system11.1.1.6.39.62.68\o.jdevimpl.rescat2\fusion_apps_wls.properties -i C:\download\fa -w C:\standaloneStage -v

Where:

  • -m the directory to which to install the standalone
  • -p location of the property file (created in step 2 by the domain creation wizard)
  • -i the directory that contains the installers
  • -w the directory used for staging
  • -v for verbose output

Step 6: Start and test the server

To test start the server run command from:

C:\standalone\fusion_domain\bin\startWebLogic.cmd

Once started it can be accessed e.g.:

http://<host>:7011/console

Troubleshooting

Generally if something goes wrong the exception shown in the prompt will point us to the issue and to the script that is failing. Additional information on the issue can be found in the detailed logs that are written to the working directory passed to the scripts with the “-w” parameter.

Troubleshooting the issue is matter of evaluating the logs and related code in the “.py” script for the cause.  Following are some common issues that you may encounter:

Error regarding property file

The domain creation may fail in FADevCreateDomain.py related to the properties file such as:

Creating domain for Fusion Applications Development ...
 ... checkWorkingDir
 ... checkPropFile
 Traceback (most recent call last):
 File "C:\Oracle\Middleware\jdeveloper\fadev\bin\FADevCreateDomain.py", line 546, in <module>
 checkPropFile()
 File "C:\Oracle\Middleware\jdeveloper\fadev\bin\FADevCreateDomain.py", line 146, in checkPropFile
 defaultPropFile= os.path.join(os.getenv('HOME'),'fusion_apps_wls.properties')
 File "C:\Python27\Lib\ntpath.py", line 96, in join
 assert len(path) > 0
 TypeError: object of type 'NoneType' has no len()

This is generally caused by the HOME variable not being set. Check that the environment variable is set by issuing command:

echo %HOME%

Set the variable using for example:

   set HOME=C:\Users\jprautia

In rare cases there could also be issue with python installation. This is tracked in bug 16555695 and caused by installation issue with the Python. The suggested fix is to uninstall and re-install Python.

Error regarding ‘oracle.appstrace.model’ and ‘oracle.appstrace.webapp’

The in Release 4 the domain creation may fail with:

File “C:\Oracle\Middleware\jdeveloper\fadev\bin\FADevFusionAppsDomain.py”, line 1754, in targetSharedLibraries
KeyError: oracle.appstrace.model

There synch issue between the domain creation scripts and templates used. This can be fixed by adding the entries tagged with “WORKAROUND” in the FADevFusionAppsDomain.py:

'oracle.appltest.diagfwk.executor':14,   # ess-soa-adf
'oracle.appstrace.model':2,              # WORKAROUND
'oracle.appstrace.webapp':2,             # WORKAROUND

'oracle.bi.adf.model.slib':15,           # ess-soa-adf-admin

oracle.clickhistory_template_11.1.1.jar

In release 5 the the domain creation may fail with:

com.oracle.cie.domain.script.jython.WLSTException: com.oracle.cie.domain.script.jython.WLSTException: com.oracle.cie.domain.script.ScriptException: unable to parse "template-info.xml" from template jar "c:\standalone\oracle_common\common\templates\applications\oracle.clickhistory_template_11.1.1.jar

Check whether the file exists, if not copy it from the “JDEV_HOME” to the standalone home i.e.

C:\Oracle>copy \oracle\Middleware\oracle_common\common\templates\applications\oracle.clickhistory_template_11.1.1.jar \standalone\oracle_common\common\templates\applications

Summary

Standalone WLS Domain provides way to simulate the production environment allowing developers to potential issues to be detected earlier in the development cycle. Standalone domain can also be shared by various developers e.g. for collaborative development effort.

References

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Follow us on twitter Fusion Applications Extensibility, Customizations and Integration forum Fusion Applications Dev Relations YouTube Channel
This blog offers news, tips and information for developers building extensions, customizations and integrations for Oracle Fusion Applications.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
4
5
6
8
11
12
13
15
16
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today