R12 10g iAS Techstack Directory Structure Changes

  • Why the New File Structure?
  • File System Changes
  • JAVA_TOP Restructured
  • Environment Variables
  • Instance Top
  • AD Scripts
  • Config Files
  • SSL Certificates
  • Various Log Files
  • XML Configuration Files
  • opmn.xml
  • server.xml
  • orion-application.xml
  • orion-web.xml
  • appsweb.cfg
  • ODL – Oracle Diagnostic Logging
  • OPMN – Oracle Process Manager and Notification server
  • OPMN – Log Files
  • Apache Log Files (Text)
  • Apache Log Files (ODL)
  • OC4J Log files (Text)
  • OC4J Log files (ODL)
  • Apache Config Files
  • Form Server Config Files
  • MT Oracle Home Config Files
  • How To Make Configuration Changes

 Why the New File Structure?


The need to separate Oracle Apps into three parts
  • Data
  • Code
  • Config
In many cases, configuration changes more frequently than code and data. So keeping it separately would result in easy maintenance
Also, in a shared file system, MUTEX files, related to Apache, cause access related problems as IAS_ORACLE_HOME is mounted on NFS.
With the new file structure, this issue is also resolved as all the configuration files can be stored on the local server instead of NFS.

File System Changes


A general overview of the Middle-tier and DB directory structure
FILESYSTEM CHANGES  
APPMGR  
 
OLD  
NEW  
APPL_TOP   $HOME/appl $HOME/apps/apps_st/appl
COMMON_TOP   $HOME/comn $HOME/apps/apps_st/comn
ORACLE_HOME   $HOME/ora/8.0.6 $HOME/apps/tech_st/10.1.2
IAS_ORACLE_HOME   $HOME/ora/iAS $HOME/apps/tech_st/10.1.3 
ORACLE  
 
OLD  
NEW  
ORACLE_HOME   $HOME/db/10.2.0        $HOME/db/tech_st/10.2.0
ORADATA   $HOME/data $HOME/db/apps_st/data
INSTANCE TOP  
 
OLD  
NEW  
INST_TOP   N/A $HOME/inst/apps/
Notice that in the new R12 directory structure, the above dir locations do not contain the $TWO_TASK.

JAVA_TOP Restructured


11i:
  • $JAVA_TOP = $COMMON_TOP/java
    • Class
    • Archives
R12:
  • $JAVA_TOP = $COMMON_TOP/java/classes
    • Classes
  • $AF_JLIB = $COMMON_TOP/java/lib
  • Archives

Environment Variables


Changes in the env file naming convenstion and environment variables.
 
OLD  
Env Source File  APPSORA.env
Context File (MT) $APPL_TOP/admin/$TWO_TASK.xml
OA_HTML $COMMON_TOP/html
JAVA_TOP, OA_JAVA $COMMON_TOP/java
AF_JLIB N/A
JAVA_BASE N/A
FND_SECURE $FND_TOP/secure//
ADMIN_SCRIPTS_HOME $COMMON_TOP/admin/scripts//
LOG_HOME $APPL_TOP/admin//logs/
FORMS_WEB_CONFIG_FILE N/A
 
NEW  
Env Source File  APPS.env This file executes the following env files
$ORA_CONFIG_HOME/10.1.2/$TWO_TASK.env
$APPL_CONFIG_HOME/$TWO_TASK.env
Context File (MT) $APPL_CONFIG_HOME/admin/$TWO_TASK.xml
OA_HTML $COMMON_TOP/webapps/oacore/html
JAVA_TOP, OA_JAVA $COMMON_TOP/java/classes
AF_JLIB $COMMON_TOP/java/lib
JAVA_BASE $COMMON_TOP/java/
FND_SECURE $INST_TOP/apps/fnd/12.0.0/secure/
ADMIN_SCRIPTS_HOME $INST_TOP/admin/scripts/
LOG_HOME $INST_TOP/logs
FORMS_WEB_CONFIG_FILE $INST_TOP/ora/10.1.2/forms/server/appsweb.cfg

Instance Top


Instance top contains all the config files, log files, ssl certificates, document root etc.   This is a new directory introduced in R12TS.    Addition of this directory makes the middle-tier more organised, since data is kept seperate from config/log files.   Another advantage is that, multiple instances can easily share the same middle tier / DB.   To create a new instance that shares an existing middle-tier, just create a new instance_top with proper config files and nfs mount the middle tier in the server.
R12







adpatch requires a few files created by adconfig to be present on the $APPL_TOP.    Hence, the node where patches are applied to the env (INSTANCE-3), $APPL_CONFIG_HOME is set to $APPL_TOP.  So, in this node,  when adconfig is run, the config files for this env are generated on the central appltop (and not its instance top)
For all other shared instances (1, 2, 4), $APPL_CONFIG_HOME should be set to their respective instance tops so that the config files are generated/read from $INST_TOP/appl which enables you to easily have custom config files for each env.
INSTANCE TOP – STRUCTURE  
$INST_TOP: /inst/apps// 
/admin
 
    /scripts
ADMIN_SCRIPTS_HOME: Find all AD scripts here
/appl
APPL_CONFIG_HOME. For standalone envs, this is set to $APPL_TOP
    /fnd/12.0.0/secure
FND_SECURE: dbc files here
    /admin
All Env Config files here
/certs
SSL Certificates go here
/logs
LOG_HOME:  Central log file location.  All log files are placed here (except adconfig)
/ora
ORA_CONFIG_HOME
    /10.1.2
‘C’ Oracle home config, Contains tnsnames and forms listener servlet config files
    /10.1.3
Apache & OC4J config home,   Apache, OC4J and opmn This is the ‘Java’ oracle home configuration for OPMN, Apache and OC4J
/pids
Apache/Forms server PID files here
/portal
Apache’s DocumentRoot folder

AD Scripts


All the AD Scripts for managing the middle-tier services are moved to instance top
AD SCRIPTS  
$ADMIN_SCRIPTS_HOME:  $INST_TOP/admin/scripts 
adautocfg.sh  run autoconfig
adstpall.sh  stop all services
adstrtal.sh  start all services
adapcctl.sh  start/stop/status Apache only
adformsctl.sh  start/stop/status OC4J Forms
adoacorectl.sh  start/stop/status OC4J oacore
adopmnctl.sh  start/stop/status opmn
adalnctl.sh  start/stop RPC listeners (FNDFS/FNDSM)
adcmctl.sh  start/stop Concurrent Manager
gsmstart.sh  start/stop FNDSM
jtffmctl.sh  start/stop Fulfillment Server
adpreclone.pl  Cloning preparation script
adoafmctl.sh  Xbuild6+ introduces adoafmctl.sh to start/stop/status OC4J oafm (webservice, mapviewer) ascontrol to come later
adexecsql.pl  Execute sql scripts that update the profiles in an AutoConfig run
java.sh  Call java executable with additional args, (used by opmn, Conc. Mgr)



Config Files


For standalone instances, $APPL_CONFIG_HOME is set to $APPL_TOP.
In that case, the config files will be in the usual location ($APPL_TOP/admin).
A small set of files created by autoconfig, that are used by adpatch, are still requried to be in APPL_TOP (Context variable s_appl_config_home).
Hence, in a multinode environment,   $APPL_CONFIG_HOME should be set to $APPL_TOP in the node where adpatch will be run.

CONFIGURATION FILES  
$APPL_CONFIG_HOME/admin 
topfile.txt  product top info
adjareas.txt  adjareas.txt
adjborg.txt  adjborg.txt
adjborg2.txt   adjborg2.txt
adovars.env  adovars.env
adconfig.txt  AD tools related parameters
context file  Context file .xml


SSL Certificates


While configuring wallet,  SSL certificates to be placed under $INST_TOP/certs
certs is the default directory for SSL or any other certificate files used by this instance. 
To use a centrally staged certificate, change  the appropriate context file and run autoconfig
SSL CERTIFICATES 
$INST_TOP/certs
/Apache/ewallet.p12
 
/opmn/cwallet.sso
 
/opmn/ewallet.p12
 
certs is the default directory for SSL or any other certificate files used by this instance.   To use a centrally staged certificate, change
the appropriate context file and run autoconfig
 

Various Log Files


All Log file locations have changed.    They are now placed under the Instance top

LOG FILES
Location of various log files
AD Script log files (adapcctl.sh,…) $INST_TOP/logs/appl/admin/log
CM Log Files ($APPLCSF/$APPLLOG) $INST_TOP/logs/appl/conc/log
AD tools log files (adpatch, …) $APPL_CONFIG_HOME/admin/$TWO_TASK/log
OPMN Log Files (Text & ODL) $ORA_CONFIG_HOME/10.1.3/opmn/logs (Techstack team is trying to get this moved to
$INST_TOP/logs/10.1.3/opmn)
Apache Log Files (Text & ODL) $INST_TOP/logs/10.1.3/Apache/
OC4J Log Files (Text) $INST_TOP/logs/10.1.3/j2ee/oacore/
OC4J Log Files (ODL) $INST_TOP/logs/10.1.3/j2ee/oacore/log/oacore_default_group_1/oc4j


XML Configuration Files


  • opmn.xml
  • server.xml
  • orion-application.xml
  • orion-web.xml

opmn.xml


  • Used by Oracle Process Manager and Notification Server (OPMN)
  • Contains details of all the OC4J instances deployed on the server
  • Location of the log files for OPMN
  • Various ports used by OPMN
  • File Location:  $ORA_CONFIG_HOME/10.1.3/opmn/conf/

server.xml

  • •Used by OC4J
  • •Contains details of all the Applications deployed under that OC4J instance
  • •Details like name of the application, where it is deployed, shared libraries if any….
  • •Path for the j2ee-logging configuration file, RMI configuration file, JMS configuration file….
  • •Location:  $ORA_CONFIG_HOME/10.1.3/j2ee/oacore/config/

orion-application.xml


  • Used by application instance
  • Contains details of all the web-modules deployed under that Application
  • Also includes library path where it should look for the java code
  • Location: $ORA_CONFIG_HOME/10.1.3/j2ee/oacore/applications-deployment/oacore

orion-web.xml


  • Used by web module
  • Contains details of all servlet aliases and the mapping to servlet classes
  • Location: $ORA_CONFIG_HOME/10.1.3/j2ee/oacore/applications-deployment/oacore/html/

appsweb.cfg


  • Forms Socket mode is not present in R12, only Servlet mode is available
    • appsweb.cfg
    • default.env (replacement of formservlet.ini in 11i)
  • Location: $ORA_CONFIG_HOME/10.1.2/forms/server
  • appsweb.cfg file’s location is also set in the env variable $FORMS_WEB_CONFIG_FILE

ODL – Oracle Diagnostic Logging


Oracle offers a new method for reporting diagnostic messages.
This new method, Oracle Diagnostic Logging (ODL), presents a common format for diagnostic messages and log files, and a mechanism for correlating all diagnostic messages from various components across Oracle Database.
Using ODL, each component logs messages to its own private local repository. A tool called LogLoader collects messages from each repository and loads them into a common repository where messages can be viewed as a single log stream, or analyzed in different ways.
For more info, check this link

OPMN – Oracle Process Manager and Notification server

OPMN or the Oracle Process Manager and Notification Server is used to manage the following Application server Components
  • HTTP Server and OC4J
  • Oracle Notification Server (ONS)
    • Responsible for communications among the components.
  • Process Manager (PM)
    • Responsible for start, stop, restart and death detection
  • Location:
    • $ORA_CONFIG_HOME/10.1.3/opmn/bin/opmnctl status  (do not use this directly to start services)

OPMN – Log Files

Log files generated by OPMN are of two types:
  • Plain text
  • Oracle Diagnostic Logging (ODL)
Only generates plain text log files.
  • opmn.log
  • opmn.dbg
These log files are mentioned in opmn.xml. There are different levels and components for which to get detailed log.
Components:
  • internal
  • ons
  • pm
Levels:
  • none, fatal, error, warn, notify (Plain text)
  • debug1, debug2, debug3, debug4 (Plain text)
Location:
  • $ORA_CONFIG_HOME/10.1.3/opmn/logs

Apache Log Files (Text)

Apache Log files are defined in :
  • $ORA_CONFIG_HOME/10.1.3/Apache/Apache/conf/httpd.conf
Below are the directives used to define log level and locations
  • LogLevel (emerg, alert, crit, error, warn, notice, info, debug)
  • ErrorLog
  • CustomLog
Location:
  • $INST_TOP/logs/10.1.3/Apache/

Apache Log Files (ODL)

To enable ODL logging for Apache, need to add the following directives in
  • $ORA_CONFIG_HOME/10.1.3/Apache/Apache/conf/httpd.conf
    • OraLogMode (oracle, odl, apache)
    • OraLogSeverity (INTERNAL_ERROR, ERROR, WARNING, NOTIFICATION, TRACE)
    • Specify message level: 1-32 (1 most severe, 32 least)

OC4J Log files (Text)

OC4J Log files are defined in
  • $ORA_CONFIG_HOME/10.1.3/j2ee/oacore/application-deployment/oacore/orion-application.xml
Location:
  • $INST_TOP/logs/10.1.3/j2ee/oacore/

OC4J Log files (ODL)


Logging configuration:
  • s_config_home/ora/10.1.3/j2ee/oacore/config/j2ee-logging.xml
Log Levels:
  • ERROR:1
  • WARNING:1
  • NOTIFICATION:1
  • NOTIFICATION:16
  • TRACE:1
Location:
  • $INST_TOP/logs/10.1.3/j2ee/oacore/log/oacore_default_group_1/oc4j


Apache Config Files


$ORA_CONFIG_HOME/10.1.3/Apache/Apache/conf/
httpd.conf
This is a server configuration file which typically contains directives that affect how the server runs, such as user and group IDs it should use, and location of other files.
apps.conf
Contains alias to html,media,temp etc (E-biz settings)
dms.conf
Oracle iAS DMS configuration file.  This config file enables you to monitor performance of site components with Oracle’s Dynamic Monitoring Service (DMS).
mod_oc4j.conf
OC4J Apache module config file.   Usually a stub.
oracle_apache.conf
Oracle Specific HTTP server configuration file.   Used for including other config files
security.conf
Used for loading security modules
$ORA_CONFIG_HOME/10.1.3/config/
ias.properties
iAS related properties in this file, like Apache home locaiton, version, server etc.
$ORA_CONFIG_HOME/10.1.3/javacache/admin/
javacache.xml
Javacache xml config files for oacore apps
$ORA_CONFIG_HOME/10.1.3/j2ee/forms/config/
j2ee-logging.xml
Logging configuration file for OC4J
application.xml
Global Application configuration file for forms application
jms.xml
JMS Configuration file for forms application
oc4j-connectors.xml
Connector Configuration file for forms application
oc4j.properties
OC4J properties file.   Various parameters like log filenames etc are specified here.
rmi.xml
RMI Configuration file for forms application.  RMI stands for Remote Method Invocation.   (The Java RMI system allows an object running in one Java Virtual Machine to invoke methods on an object running in another VM)
server.xml
Various directory locations are specified in this file
system-application.xml
This is the global application config file that is the parent for all other applications on the server.  This file imports and loads various web modules

$ORA_CONFIG_HOME/10.1.3/j2ee/oacore/application-deployments/oacore/oa_servlets/
$ORA_CONFIG_HOME/10.1.3/j2ee/oacore/application-deployments/oacore/html/
orion-web.xml
Replacement for zone.properties.   The same file is located in both the above oa_servlets and html directories
$ORA_CONFIG_HOME/10.1.3/j2ee/oacore/application-deployments/oacore/
orion-application.xml
Used for applications level configuration.  Used for specifying applications.log file location, OC4J connector context file etc.
$ORA_CONFIG_HOME/10.1.3/network/$TWO_TASK
tnsnames.ora
Apache’s tnsnames.ora file.

Form Server Config Files


$ORA_CONFIG_HOME/10.1.2/forms/server
appsweb.cfg ($FORMS_WEB_CONFIG_FILE)
appsweb.cfg moved to this location.  Contains info on serverName, serverPort etc
default.env
Contains most of the env variables (classpath, product tops, oracle home etc)


MT Oracle Home Config Files


$ORA_CONFIG_HOME/10.1.2/network/admin
tnsnames.ora
Contains tns entries for fndsm, db etc

listener.ora
Middle-tier Oracle home listener.ora file


How To Make Configuration Changes


It is highly recommended that configuration changes should be done in the context file and then run adconfig.  Manually changing configuration files will most likely get lost once you run AutoConfig. Also making changes to the wrong file may cause problems. The context file should be the place to make changes. These wont get lost once you run AutoConfig and the customization variables should apply the changes to the correct place.
The most commonly used customization variable in your environments would probably be s_oacore_prepend_classpath.
This variable can be used to preprend custom directories, jar or  zip files to the oacore classpath.
To add a single directory is easy. Set s_oacore_prepend_classpath to /home/myname/myclassesdir. If you want multiple entries then is is a little more complicated. The format is:
CDATA means character data.  CDATA is the text that will NOT be parsed by a parser.
Tags inside the text will NOT be treated as markup and entities will not be expanded.  Hence the text inside the inner nested sqare brackets ([]) will not be treated as XML by the parser
For more info on XML DTD, read this tutorial

The orion_application.xml template file contains:
So the format for multiple entries has to take into consideration what already is in the template
e.g.: it already has the start and end tags. So the first entry in the variable starts with just the directory/file name and ends with a closing tag, and the last entry in the list omits the end tag. The others, if there are any, are complete format. 
(To get a clear picture, replace the red part in the above library tag with the red part in CDATA and you will see that it forms 3 properly structured tags)
Other customizations you may require are:
s_oacore_prepend_ld_lib_path
s_oacore_append_classpath
s_oacore_jvm_start_options
s_adovar_classpath
s_adovar_afclasspath
s_adovar_ldlib
For jsp development you may need to change setting for:
s_jsp_cache_dir
s_jsp_dbg_mode (default is false)
s_jsp_main_mode (default is justrun, you may need recompile)
The $AD_TOP/admin/template/adctxinf.tmp file contains descriptions of the context variables. This file is used to show the context variable descriptions when editing the context file via OAM.