Tuesday, 31 July 2012

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


After changing the IP address in Oracle Apps 11i and we dont need to run the autoconfig we got the following error message:

JSP Error:
--------------------------------------------------------------------------------
Request URI:/OA_HTML/AppsLocalLogin.jsp

Exception:
java.lang.NoClassDefFoundError: oracle.apps.fnd.profiles.Profiles (initialization failure)



To solve the issue we modified the file
$IAS_ORACLE_HOME/Apache/Jserv/etc/jserv.properties

and commented the following line the restart the Apache server:
#wrapper.bin.parameters=-DLONG_RUNNING_JVM=true

Friday, 6 July 2012

Oracle: How to check for DB links

Execute this command as sysdba
SQL> select owner||’,'||db_link||’,'||username||’,'||host||’,'||created from dba_db_links;

After that you can check the status of DB links to know which DB links are working/not working
SQL>Select sysdate from dual@< DB_LINK> ;

Thursday, 5 July 2012

cmclean.sql

REM
REM FILENAME
REM   cmclean.sql
REM DESCRIPTION
REM   Clean out the concurrent manager tables
REM NOTES
REM   Usage: sqlplus @cmclean
REM  
REM
REM   $Id: cmclean.sql,v 1.4 2001/04/07 15:55:07 pferguso Exp $
REM           
REM
REM +======================================================================+


set verify off;
set head off;
set timing off
set pagesize 1000

column manager format a20 heading 'Manager short name'
column pid heading 'Process id'
column pscode format a12 heading 'Status code'
column ccode format a12 heading 'Control code'
column request heading 'Request ID'
column pcode format a6 heading 'Phase'
column scode format a6 heading 'Status'


WHENEVER SQLERROR EXIT ROLLBACK;

DOCUMENT

   WARNING : Do not run this script without explicit instructions
             from Oracle Support


   *** Make sure that the managers are shut down     ***
   *** before running this script                    ***
              
   *** If the concurrent managers are NOT shut down, ***
   *** exit this script now !!                       ***

#

accept answer prompt 'If you wish to continue type the word ''dual'': '

set feed off
select null from &answer;
set feed on


REM     Update process status codes to TERMINATED

prompt
prompt  ------------------------------------------------------------------------

prompt  -- Updating invalid process status codes in FND_CONCURRENT_PROCESSES
set feedback off
set head on
break on manager

SELECT  concurrent_queue_name manager,
        concurrent_process_id pid,
        process_status_code pscode
FROM    fnd_concurrent_queues fcq, fnd_concurrent_processes fcp
WHERE   process_status_code not in ('K', 'S')
AND     fcq.concurrent_queue_id = fcp.concurrent_queue_id
AND     fcq.application_id = fcp.queue_application_id;

set head off
set feedback on
UPDATE  fnd_concurrent_processes
SET     process_status_code = 'K'
WHERE   process_status_code not in ('K', 'S');



REM     Set all managers to 0 processes

prompt
prompt  ------------------------------------------------------------------------

prompt  -- Updating running processes in FND_CONCURRENT_QUEUES
prompt  -- Setting running_processes = 0 and max_processes = 0 for all managers

UPDATE  fnd_concurrent_queues
SET     running_processes = 0, max_processes = 0;




REM     Reset control codes

prompt
prompt  ------------------------------------------------------------------------

prompt  -- Updating invalid control_codes in FND_CONCURRENT_QUEUES
set feedback off
set head on
SELECT  concurrent_queue_name manager,
        control_code ccode
FROM    fnd_concurrent_queues
WHERE   control_code not in ('E', 'R', 'X')
AND     control_code IS NOT NULL;

set feedback on
set head off
UPDATE  fnd_concurrent_queues
SET     control_code = NULL
WHERE   control_code not in ('E', 'R', 'X')
AND     control_code IS NOT NULL;

REM     Also null out target_node for all managers
UPDATE  fnd_concurrent_queues
SET     target_node = null;


REM     Set all 'Terminating' requests to Completed/Error
REM     Also set Running requests to completed, since the managers are down

prompt
prompt  ------------------------------------------------------------------------

prompt  -- Updating any Running or Terminating requests to Completed/Error
set feedback off
set head on
SELECT  request_id request,
        phase_code pcode,
        status_code scode
FROM    fnd_concurrent_requests
WHERE   status_code = 'T' OR phase_code = 'R'
ORDER BY request_id;
       
set feedback on
set head off
UPDATE  fnd_concurrent_requests
SET     phase_code = 'C', status_code = 'E'
WHERE   status_code ='T' OR phase_code = 'R';





REM     Set all Runalone flags to 'N'
REM     This has to be done differently for Release 10

prompt
prompt  ------------------------------------------------------------------------

prompt  -- Updating any Runalone flags to 'N'
prompt
set serveroutput on
set feedback off
declare
        c         pls_integer := dbms_sql.open_cursor;
        upd_rows  pls_integer;
        vers      varchar2(50);
        tbl       varchar2(50);
        col       varchar2(50);
        statement varchar2(255);
begin

        select substr(release_name, 1, 2)
        into   vers
        from fnd_product_groups;

        if vers >= 11 then
           tbl := 'fnd_conflicts_domain';
           col := 'runalone_flag';
        else
           tbl := 'fnd_concurrent_conflict_sets';
           col := 'run_alone_flag';
        end if;


        statement := 'update ' || tbl || ' set ' || col || '=''N'' where ' || col || ' = ''Y''';
        dbms_sql.parse(c, statement, dbms_sql.native);
        upd_rows := dbms_sql.execute(c);
        dbms_sql.close_cursor(c);
        dbms_output.put_line('Updated ' || upd_rows || ' rows of ' || col || ' in ' || tbl || ' to ''N''');
end;
/



prompt

prompt  ------------------------------------------------------------------------

prompt  Updates complete.
prompt  Type commit now to commit these updates, or rollback to cancel.
prompt  ------------------------------------------------------------------------

prompt

set feedback on

REM  <= Last REM statment -----------------------------------------------------

Cloning Issues you maybe face

1.  While running adpreclone on EBS , APPS user locked continiously.
Soultion – Follow metalink Note Id – ID 420001.1
2.  PDF output problem in Instance. No PDF output produced after cloning .
Solution – Follow metalink Note Id ID 981163.1
3.  Got this in alert.log WARNING: Oracle executable binary mismatch detected.
Solution – Follow the metal…ink Note ID – 369260.1.
4.  After cloning, forms will not launch.
Performed the below Steps:
EXEC FND_CONC_CLONE.SETUP_CLEAN;
commit;
Run the cmclean.sql scripts
Run Autoconfig on all nodes.(DB+CM+WEB Nodes)
5.  After cloning Purge Concurrent Request and/or Manager Data request status alway is running , it is not completing.
As per Metalink ID 1016766.102 ( OS Files are Purged from Wrong Instance when Running Purge Concurrent Requests),It is because of
FNDCPPUR is trying to delete files it can’t access because they are belonging to the original environment.
 The following table and columns still contain PATH referencing the original environment :
 FND_CONCURRENT_REQUESTS.LOGFILE_NAME
 FND_CONCURRENT_REQUESTS.OUTFILE_NAME
 Perform the below Steps:
 a) Stop the concurrent managers.
 b) Start a SQL*Plus session as APPLSYS.
 c) Issue the following commands:
 TRUNCATE TABLE fnd_concurrent_requests;
 TRUNCATE TABLE fnd_concurrent_processes;
 UPDATE fnd_concurrent_queues
 SET running_processes = 0,
 max_processes = 0;
 COMMIT;
 d) Exit the SQL*Plus session.
 e) Restart the concurrent managers.
6.  While running adcfgclone.pl getting the Inventory problem , so enter the correct entry in /etc/oraInst.loc location.
 7.  After starting the services , the listener will not coming up because of missing listener.ora file in $TNS_ADMIN location.
 Solution:
Then Stop the APPS Services ./adstpall.sh apps/
run the Autoconfig . ./adautocfg.sh
Then start the APPS Services ./adstrtal.sh apps/

Monday, 2 July 2012

unix ftp mput without prompt

start up your ftp session with the -i option
ex. ftp -i servername

Number of Visitors