Thursday, May 16, 2013

Portal 11G: wwv_context.sync() job broken

WWW_context is a package in the XXX_Portal schema. This www_contex.sync() job is created when Portal is installed. This particular job is used to sync the content users creates so that content management component can get it.

How to fix it when this job is broken?
Refer to Oracle doc:   Note [ID 1346255.1]
https://support.oracle.com/epmos/faces/ui/km/SearchDocDisplay.jspx?_afrLoop=468237572974133&_afrWindowMode=0&_adf.ctrl-state=100zpvdb9u_21

First find the job # of the broken job by execute the following in the database:

select * from dba_jobs;
select job, broken, what from dba_jobs;

Applies to:

Portal - Version: 10.1.2.2 and later   [Release: 10gR2 and later ]
Information in this document applies to any platform.

Symptoms



Search does not show result for new content added.

Cause

The Portal's  job synchronization  was not working properly.

Try  to run manually the job  from sqlplus got error:


16:37:54 SQL> exec dbms_job.run(181);
BEGIN dbms_job.run(181); END;
*
ERROR at line 1:
ORA-12011: execution of 1 jobs failed
ORA-06512: at "SYS.DBMS_IJOB", line 406
ORA-06512: at "SYS.DBMS_JOB", line 275
ORA-06512: at line 1



Solution



1.- Remove the job fro the queue.

Login as Portal from sqlplus


execute dbms_job.remove(181);


To check the jobid use the following query

select * from dba_jobs order by 1;
Then check for the job sync jobid

2.- Delete the job reference from Portal

Login as Portal from sqlplus and execute:


exec WWPRE_API_NAME.DELETE_NAME(p_path => 'oracle.portal.search',
p_name => 'text_sync_jobid');
commit;


3.- Recreate the job: Login as Portal user from sqlplus  and run:




cd E:\oracle\portal\portal_home\portal\admin\plsql\wws
set TNS_ADMIN=e:\oracle\portal\portal_instance\config
sqlplus xxx_portal@portal
@textjsub.sql START 16-05-13 60


$ORACLE_HOME/portal/admin/plsql/wws/textjsub.sql START DD-MM-YY 60


Replace : DD-MM-YY for the current day.
This job will run every 60

No comments:

Post a Comment