Tuesday, February 10, 2009

Solution for 500 Internal server Error in R12

Error:
500 Internal Server Error

java.lang.NoClassDefFoundError
at oracle.apps.fnd.sso.AppsLoginRedirect.AppsSetting(AppsLoginRedirect.java:120)
at oracle.apps.fnd.sso.AppsLoginRedirect.init(AppsLoginRedirect.java:161)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
].server.http.HttpApplication.loadServlet(HttpApplication.java:2231)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
].server.http.HttpApplication.findServlet(HttpApplication.java:4617)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
].server.http.HttpApplication.findServlet(HttpApplication.java:4541)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
].server.http.HttpApplication.getRequestDispatcher(HttpApplication.java:2821)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:740)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
].server.http.AJPRequestHandler.run(AJPRequestHandler.java:299)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
].server.http.AJPRequestHandler.run(AJPRequestHandler.java:187)


Solution:

Autoconfig

1) Bring down opmn services.
Path: /tst03/oracle/VIS/inst/apps/VIS_bkpsvr/admin/scripts>./adopmnctl.sh stop apps/apps

2) Verify no process is listening for s_java_object_cache_port value

3) Change s_java_object_cache_port on all the nodes in the context file

Path: /tst03/oracle/VIS/inst/apps/VIS_bkpsvr/appl/admin>vi VIS_bkpsvr.xml

Before:
12348

After:
12349

4) Run autoconfig on apps node.

Path: /tst03/oracle/VIS/inst/apps/VIS_bkpsvr/admin/scripts>./ adautocfg.sh

5) Start opmn services on apps node.

Path: /tst03/oracle/VIS/inst/apps/VIS_bkpsvr/admin/scripts>./adopmnctl.sh start apps/apps

ORA-19595: archivelog already included in backup conversation

If a standby database is brought down and then later
restarted then RMAN backups may fail with:
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/18/2004 10:00:56
ORA-19595: archivelog /ora_logs/archivelogs/2_6512.arc already included in backup conversation

Workaround:
Find the duplicate archivelog names using following query -
select al.recid, al.name from v$archived_log al
where al.status = 'A' and al.standby_dest= 'NO'
minus
select al.recid, al.name from v$archived_log al,
(select max(recid) recid
from v$archived_log
where status = 'A'
group by name) keepal
where al.status = 'A'
and al.standby_dest = 'NO'
and keepal.recid = al.recid;

Then:
RMAN> catalog archivelog '';

This will register the missing archivelogs.

Monday, February 9, 2009

ORA-12557: TNS:protocol adapter not loadable

Problem Description
In my machine I had oracle 10g home , using sqlplus of 10g I could connect to an Oracle database 10g. Now I have installed a new oracle 11g home, but using sqlplus of 11g I could not connect to Oracle database 10g. Below is an example,

With 10.2g sqlplus I can connect to 10g database.
C:\>e:\oracle\product\10.2.0\db_1\bin\BIN\sqlplus.exe maximsg/a@192.168.100.160/tiger

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jan 26 01:54:10 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

With 11g sqlplus I could not connect to oracle database 10g. It returns error message, ORA-12557: TNS:protocol adapter not loadable.
C:\>d:\app\oracle\BIN\sqlplus.exe maximsg/a@192.168.100.160/tiger

SQL*Plus: Release 11.1.0.6.0 - Production on Mon Jan 26 01:55:00 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.

ERROR:
ORA-12557: TNS:protocol adapter not loadable

Cause of the Problem
The problem happens because of two ORACLE_HOME are installed on your system. As after 10g you hav e installed 11g so whenever you write sqlplus by default new 11g binaries are selected and raises ORA-12557. But working with old home 10g works fine.

Simply sqlplus does not work but 10g home location sqlplus (e:\oracle\product\10.2.0\db_1\bin\BIN\sqlplus.exe ) works.

C:\>sqlplus.exe maximsg/a@192.168.100.160/tiger

SQL*Plus: Release 11.1.0.6.0 - Production on Mon Jan 26 22:47:08 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.

ERROR:
ORA-12557: TNS:protocol adapter not loadable

Connecting to old oracle database using new binaries are not supported in oracle and error will return.

Solution of the Problem
Only setting ORACLE_HOME is not sufficient on windows environment. Because the location is taken from windows registry. So either uninstall newer oracle home or explicitly pointing to old oracle binaries will solve the problem.

Here using pointing to old home,
C:\>e:\oracle\product\10.2.0\db_1\bin\BIN\sqlplus.exe maximsg/a@192.168.100.160/tiger

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jan 26 01:54:10 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

Alternatively you can follow below.

Step 01: Remove registry entries of new ORACLE_HOME.
To do this,
i)Type regedit on Run.
ii)Press enter and expand HKEY_LOCAL_MACHINE.
iii)Then expand SOFTWARE and then expand ORACLE tab. There you will see two oracle home. Right click on the one that you want to delete and then select delete. If prompting click yes.

Step 02: Remove any environmental variable.
i)Right click on My computer icon. Then select properties.
ii)System properties window will appear. Click on Advanced tab.
iii)Select environmental variables.
iv)Find the variable/system variable path and ORACLE_HOME. Edit or modify them so that it point to you desired sql*plus.
Usually in the PATH system variable you will get both ORACLE_HOME path. Just remove one path. Of course if you have ORACLE_HOME variable settings first delete the key.

Wednesday, January 14, 2009

The Function Is Not Available Under The Responsibility

Cause

This issue is caused by launching the menu item before the Compile Security has completed.

When a function is added to a menu , a concurrent program 'Compile Security' is submitted which
loads the data in Fnd_Compiled_Menu_Functions table.

Whenever a function is accessed, security code checks Fnd_Compiled_Menu_Functions table to
determine whether that function is accessible under the given security context or not. So if this
function is accessed before the 'Compile Security' program is finished, the function cache gets
loaded with stale data and the reported error message is thrown.

So after modifying the 2 menu definitions associated with 'System Administrator' and 'Application
Developer' make sure that 2 concurrent requests submitted for the above 2 modifications completed
normally and then try to access the functions.

Further once this error occurs, it will be cached which means that even after the menu item has
been flagged as available, it the error will be returned from the cache.

Solution

-- To implement the solution, please execute the following steps::
1) Manually run the 'Compile Security' concurrent program with parameter "YES"
2) Shut down Middle Tier (Apache)
3) Restart Middle tier
4) Test the menu item