Search Blog Post

Thursday, February 27, 2014

Oracle Apps 11i and R12 Context/Environment Files/Variables

INST_TOP is newly introduced in R12. Following figures show the snapshot of file structures both in R11i and R12.



 
Important File Locations

File Oracle Apps 11i Oracle Apps R12
Environment Source file APPSORA.env APPS<SID>_<hostname>.env
Context File (Middle tier) $APPL_TOP/admin/$TWO_TASK.xml $INST_TOP/appl/admin/$TWO_TASK_<hostname>.xml
tnsnames.ora (OH) $ORACLE_HOME/network/admin/<CONTEXT> $INST_TOP/ora/10.1.2/network/admin
listener.ora $ORACLE_HOME/network/admin/<CONTEXT>$INST_TOP/ora/10.1.2/network/admin
appsweb.cfg $OA_HTML/bin $INST_TOP/ora/10.1.2/forms/server
tnsnames.ora (Apache) $IAS_ORACLE_HOME/network/admin/<CONTEXT> $INST_TOP/ora/10.1.3/network/admin
jsev.properties $IAS_ORACLE_HOME/Apache/Jserv/etc $INST_TOP/ora/10.1.3/opmn/conf/opmn.xml
httpd.conf $IAS_ORACLE_HOME/Apache/Apache/conf$ORA_CONFIG_HOME/10.1.3/Apache/Apache/conf
apps.conf $IAS_ORACLE_HOME/Apache/Apache/conf $ORA_CONFIG_HOME/10.1.3/Apache/Apache/conf
formservlet.ini $IAS_ORACLE_HOME/Apache/Jserv/etc $ORACLE_HOME/forms/server/default.env
topfile.txt $APPL_TOP/admin $APPL_CONFIG_HOME/admin
adovars.env $APPL_TOP/admin $APPL_CONFIG_HOME/admin
adjborg2.txt$APPL_TOP/admin$APPL_CONFIG_HOME/admin
SSL Certificates$COMMON_TOP/admin/certs$INST_TOP/certs
AD scripts logs$COMMON_TOP/admin/log/<SID_hostname> $LOG_HOME/appl/admin/log
Concurrent Request logs$APPLCSF $APPLCSF
Apache logs$IAS_ORACLE_HOME/Apache/Apache/logs$LOG_HOME/ora/10.1.3/Apache
Jserv logs$IAS_ORACLE_HOME/Apache/Jserv/logs $LOG_HOME/ora/10.1.3/j2ee
javacache.log$COMMON_TOP/rgf/<SID_hostname> $LOG_HOME/appl/rgf


Environmental variables
Variable Oracle Apps 11i Oracle Apps R12
APPL_TOP$HOME/<SID>appl $HOME/apps/apps_st/appl
COMMON_TOP $HOME/<SID>comn $HOME/apps/apps_st/comn
ORACLE_HOME (applmgr) $HOME/<SID>ora/8.0.6 $HOME/apps/tech_st/10.1.2
IAS_ORACLE_HOME $HOME/<SID>ora/iAS $HOME/apps/tech_st/10.1.3
ORACLE_HOME (oracle) $HOME/<SID>db/10.2.0 $HOME/db/tech_st/10.2.0
ORADATA $HOME/<SID>data $HOME/db/apps_st/data
JAVA_TOP, OA_JAVA $COMMON_TOP/java $COMMON_TOP/java/classes
OA_HTML $COMMON_TOP/html $COMMON_TOP/webapps/oacore/html
FND_SECURE $FND_TOP/secure/<SID> $INST_TOP/appl/fnd/12.0.0/secure
ADMIN_SCRIPTS_HOME $COMMON_TOP/admin/scripts/<SID> $INST_TOP/admin/scripts
LOG_HOME - $INST_TOP/logs
FORMS_WEB_CONFIG_FILE- $INST_TOP/ora/10.1.2/forms/server/appsweb.cfg
AF_JLIB - $COMMON_TOP/java/lib
JAVA_BASE - $COMMON_TOP/java
INST_TOP - $HOME/inst/apps/<CONTEXT>
ORA_CONFIG_HOME - $INST_TOP/ora
APPLCSF $COMMON_TOP/admin $LOG_HOME/appl/conc

Visit this link for more info about file systems in Oracle Apps.

java.lang.NoClassDefFoundError: Could not initialize class oracle.apps.fnd.profiles.Profiles

Problem:
While trying to login to Oracle Application front-end for one of EBS test environment we started getting below JSP error:

Request URI:/OA_HTML/AppsLocalLogin.jsp
Exception:
java.lang.NoClassDefFoundError: Could not initialize class oracle.apps.fnd.profiles.Profiles

To fix the issue, I did the following steps :
  •    Stop Apache (./adapcctl.sh stop)
  •    Clear the Server cache
                    I.     cd $COMMON_TOP
                   II.     mv _pages _pages_27Feb
                   III.    mkdir _pages
 
  •   Start the apache (./adapcctl.sh start)   
Now after bouncing Apache, when I look at the status of apache:
/adapcctl.sh status
adapcctl.sh version 115.54
Apache Web Server Listener is not running.
Apache Web Server Listener (PLSQL) :httpd ( pid 8519 ) is running.
adapcctl.sh: exiting with status 0

It shows apache listener is not running and the apache log file confirmed the same thing.

tail -f $COMMON_TOP/admin/log/adapcctl.txt

ISSUE : Apache listener not running
=============================================

Sometimes there is a problem in Apache Server where although the status shown is not running, I checked for any orphan Apache / Jserv processes and found few httpd processes still running even after stopping Apache.

$ ./adapcctl.sh stop
adapcctl.sh version 115.55
Apache Web Server Listener is not running.
Apache Web Server Listener (PLSQL) is not running.
adapcctl.sh: exiting with status 0

$ ps -ef | grep Apache | wc -l
27

$ kill -9 `ps -ef | grep Apache | grep applprod | grep -v grep | awk '{print $2}'`

$ ps -ef | grep Apache | wc -l
1

$ ./adapcctl.sh start
adapcctl.sh version 115.55
Apache Web Server Listener is not running.
Starting Apache Web Server Listener (dedicated HTTP in SSL mode) ...
Apache Web Server Listener (PLSQL) is not running.
Starting Apache Web Server Listener (dedicated PLSQL) ...
adapcctl.sh: exiting with status 0

Now, when I was able to get the login screen for Oracle Applications and JSP error issue got resolved.

References:
Could not initialize class oracle.apps.fnd.profiles.Profiles (Doc ID 461872.1)
Child 25494 returned a Fatal error...Apache is exiting! (Doc ID 163458.1)
11i: Apache server will not start. adapcctl.sh runs w/o error but nothing starts [ID 115914.1]
11i: adapcctl.sh will not start up Apache processes. No error given [ID 114919.1]

Thursday, February 20, 2014

The system has not been taken off maintenance mode completely.Please contact your system adminstration.

The system has not been taken off maintenance mode completely.Please contact your system adminstration.
Maintenance_mode
Cause: After patch application, Maintenance mode is not disabled.
In my case, I encountered this error while accessing oracle E-business suite, I started the applications before disabling Maintenance mode which is incorrect.


Solution :
1) Login to applmgr user
2) Stop apache
3) Run adadmin
4) use option 5 to disable maintenance mode
AD Administration Main Menu
————————————————–
1.    Generate Applications Files menu
2.    Maintain Applications Files menu
3.    Compile/Reload Applications Database Entities menu
4.    Maintain Applications Database Entities menu
5.    Change Maintenance Mode
6.    Exit AD Administration
Enter your choice [6] : 5
Please select an option:
1.    Enable Maintenance Mode
2.    Disable Maintenance Mode
3.    Return to Main Menu
Enter your choice [3] : 2
sqlplus -s &un_apps/***** @/apps/vision/apps/apps_st/appl/ad/12.0.0/patch/115/sql/adsetmmd.sql DISABLE
Successfully disabled Maintenance Mode.
5) Restart Apache.

We can even  enable or disable maintenance mode without using adadmin, 
ENABLE maintenance mode:
sqlplus -s apps/apps @$AD_TOP/patch/115/sql/adsetmmd.sql ENABLE
DISABLE maintenance mode:
sqlplus -s apps/apps @$AD_TOP/patch/115/sql/adsetmmd.sql DISABLE

 Check the current status of Maintenance Mode:
select fnd_profile.value(‘APPS_MAINTENANCE_MODE’) from dual;
MAINT     =  MAINTENANCE MODE is ENABLED
NORMAL =  MAINTENANCE MODE is DISABLED


LOGIN PAGE appears blank in Oracle Applications R12

Issue:
When logging onto E-Business Suite front end page, the login page appears blank and nothing loads; – Unable to access login Page in Oracle APPS R12

Temporary Fix:
1. Shutdown the application services
2. Compile the jsp’s manually using the below command
perl $FND_TOP/patch/115/bin/ojspCompile.pl –compile –flush -p 2
3. Restart the application services
4. Retest the issue.


Permanent Fix:
1. Set the parameter “s_jsp_main_mode” in XML file from “just run” to “recompile”
<jsp_debug_parameters oa_var=”s_jsp_main_mode”>justrun</jsp_debug_parameters>
change it to  <jsp_debug_parameters oa_var=”s_jsp_main_mode”>recompile</jsp_debug_parameters>

2. Execute autoconfig to apply the change done in XML File. Autoconfig will update file $INST_TOP/ora/10.1.3/j2ee/oacore/application-deployments/oacore/html/orion-web.xml

3. Re-start the applications and test the issue.

Note: However it is not recommended to change the default value of parameter s_jsp_main_mode (i.e. just run) as it may lead to performance issue.

Cause:
Issue is caused by missing class files on the OA_HTML directory.

References:
Note: Oracle E-Business Suite R12 – Login Page showing a blank page Occuring Intermittently [ID 1491845.1]

FRM-92095: Oracle JInitiator version too low.


CAUSE: 
 Latest version of Java installed and forms version is not compatible with currently installed JAVA
JRE_ERROR

SOLUTION:
1. Check the version of java installed in your system
2. If you already have latest version of JAVA, Please go and uninstall(via Control Panel > Add/Remove Software)
3. Download the latest version of 1.6 (like 1.6.0_25 to 1.6.0_29) and install.
4. Then try open the application again with same browser.
OR you can perform below steps:
Click on start –> Control Panel
control_pannel
Click on programs
programs
Click on Java
java
Click on Java Tab as seen below
java_tab
Click on View
view
After clicking on View we see Runtime Parameters
We need to set -Djava.vendor=”Sun Microsystems Inc.” under Runtime Parameters

runtime_parameter
Click ok and click Apply.
Give a try if it resolves the problem !!

Wednesday, February 12, 2014

ORA-00221: Error On Write To Control File

Problem Description:
Recently I was unable to connect to em12c console and after looking at the status of oms, I came to know that my database instance has crashed.

./emctl status oms
Oracle Enterprise Manager Cloud Control 12c Release 2
Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
WebTier is Up
Oracle Management Server is not functioning because of the following reason:
Failed to connect to repository database. OMS will be automatically restarted once it identifies that database and listener are up.



I logged in and verified the alert log which had below I/O errors on the controlfile. I was afraid afraid as my control files were not multiplexed but I do have a valid backup of my controlfile.

Errors in file /u01/app/oracle/diag/rdbms/trcoem/TRCOEM/trace/TRCOEM_lgwr_25655.trc:
ORA-00345: redo log write error block 39818 count 15
ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/TRCOEM/redo01.log'
ORA-27072: File I/O error
Linux-x86_64 Error: 5: Input/output error
Additional information: 4
Additional information: 39818
Additional information: -1
Tue Jan 28 11:34:57 2014
Errors in file /u01/app/oracle/diag/rdbms/trcoem/TRCOEM/trace/TRCOEM_ckpt_25659.trc:
ORA-00206: error in writing (block 3, # blocks 1) of control file
ORA-00202: control file: '/u01/app/oracle/oradata/TRCOEM/control01.ctl'
ORA-27072: File I/O error
Linux-x86_64 Error: 5: Input/output error
Additional information: 4
Additional information: 3
Additional information: -1
Errors in file /u01/app/oracle/diag/rdbms/trcoem/TRCOEM/trace/TRCOEM_ckpt_25659.trc:
ORA-00221: error on write to control file
ORA-00206: error in writing (block 3, # blocks 1) of control file
ORA-00202: control file: '/u01/app/oracle/oradata/TRCOEM/control01.ctl'
ORA-27072: File I/O error
Linux-x86_64 Error: 5: Input/output error
Additional information: 4
Additional information: 3
Additional information: -1
Tue Jan 28 11:34:57 2014
CKPT (ospid: 25659): terminating the instance due to error 221


Cause:
It can be a issue with filesystem, verify it and make sure the filesystems are mounted in read-write mode, not in read-only mode. Oracle has to be able to write to the files as well as read them.

Also, check the syslog for any I/O errors.
Syslog does not show any I/O errors.

Solution:
I followed the below steps to fix the issue.
1] Shutdown the database
2] Restore the control01.dbf from the backup location.
3] Mount the database
4] Recover database until cancel
5] Alter database open resetlogs.

Also, took a complete RMAN cold backup of the database and multiplexed control file.