Wednesday, December 4, 2013

xml publisher namespace prefix 'ref' used but not declared


Actual Error when you open OPP LOG File using Link(http://rajesh-for-u.blogspot.in/2013/12/one-or-more-post-processing-actions.html)
We can see below error when you search with request id.


java.lang.reflect.InvocationTargetException
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at oracle.apps.xdo.common.xml.XSLT10gR1.invokeNewXSLStylesheet(XSLT10gR1.java:558)
     at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:228)
     at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:177)
     at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1044)
     at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:997)
     at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:212)
     at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1657)
     at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:967)
     at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5888)
     at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3438)
     at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3527)
     at oracle.apps.xdo.oa.cp.JCP4XMLPublisher.runProgram(JCP4XMLPublisher.java:683)
     at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
Caused by: oracle.xdo.parser.v2.XPathException: Namespace prefix 'ref' used but not declared.
     at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:782)
     at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:564)
     ... 17 more




I have seen this intermittently... sometimes when you doubleclick on a form field it will open a 'BI Publisher' field properties text box which allows you to insert/change xml syntax for field. But, doing so will put a <?ref: 0000xx?> in the actual form field help text box.
This will work on BI publisher desktop but will give you the ref namespace error on server.
You will have to check each form field in your template to make sure that there is no ref: element in any of the form fields.

while desiging the template using 11.1.1.3 or 11.1.1.5 desktop plugin make sure your start designing the template by saving it with backward compatability.

I have faced this problm.what i have done is uninstalled the BI publisher 11.1.1.5 and put the correct tags and run.Thats it...   :)

One or more post-processing actions failed. Consult the OPP service log for details.

The Concurrent Request ends with Phase 'Completed' and Status 'Warning' which indicates that the Output Post Processor (OPP) failed to generate an output file.


In such cases the request log file shows a generic error message indicating the the post-processing action has failed.

...
+------------- 1) PUBLISH -------------+
Beginning post-processing of request 3181343 on node FINAPPS at 25-OCT-2011 11:41:30.
Post-processing of request 3181343 failed at 25-OCT-2011 11:41:31 with the error message:
One or more post-processing actions failed. Consult the OPP service log for details.
+--------------------------------------+
...


The actual error returned by the XML Publisher Core engine is captured in the OPP log file.
One of the easiest way to obtain the OPP log file is to run the below script from the database by providing request_id.

SELECT fcpp.concurrent_request_id req_id, fcp.node_name, fcp.logfile_name
  FROM fnd_conc_pp_actions fcpp, fnd_concurrent_processes fcp
 WHERE fcpp.processor_id = fcp.concurrent_process_id
   AND fcpp.action_type = 6
   AND fcpp.concurrent_request_id = &request_id;


Output of the script contains logfile location just like below
/u01/app/inst/apps/NZAPPS/logs/appl/conc/log/FNDOPP10981694.txt

Developer/Administrator/DBA has to go to that location and take the OPP logfile

Alternate Method:


Getting OPP Log from the application itself
a. System Administrator > Concurrent > Manager > Administer
b. Search for 'Output Post Processor'
c. Click the 'Processes' button
d. Click the Manager Log button. This will open the 'OPP'
e. Same File have your request id so search for request id.




For my issue i have edited the template with BI publisher and uploaded in instance i got the same error.
after i uninstalled BI publisher and edited the same template with same code(tag) and uploaded in the instance.then problem solved.

when open it in normally that tag is appearing as <?ref...?> something like this...this is the mail problem of this issue.

BI Publisher: Handling NULL XML Value

1. XML tag value present in the XML data, and it has a value which is not NULL
for ex:
<PO_NUMBER>123</PO_NUMBER>

Suppose you want to give some condition to check not null similar to the one we give in PL/SQL as,
IF value IS NOT NULL THEN
---
---
END IF;
BI Publisher syntax for this is,

<?if:XML_TAG_NAME!=?>
--
--
<?end if?>

    2. XML tag value present in the XML data, but it does not have a value which is NULL.
    for ex: 
    <PO_NUMBER></PO_NUMBER>
    (OR)
    <PO_NUMBER/>

    Now you want to give some condition to check null similar to the one we give in PL/SQL as,
    IF value is NULL THEN
    --
    --
    END IF;
    BI Publisher syntax for this is,
    <?if:XML_TAG_NAME and XML_TAG_NAME="?> 
    --
    --
    <?end if?>

    3. XML tag is not present in the XML data, and therefore there is no value.
    Now you want to give a condition to check the existence of the tag in the XML data. Here is the BI Publisher syntax for this,
    <?if:not(XML_TAG_NAME)?> 
    --
    --
    <?end if?> - See more at: http://flexfields.blogspot.in/2011/04/bi-publisher-handling-null-xml-value.html#sthash.jzeSFQcJ.dpuf

    and

    <?if: count(ABC) !=''?>logic here<?end if?>   OR <?if:ABC!=''?>Field<?end if?> 

    BI Publisher Desktop error ( when preview template)

    The problem is: 
    open MS Word 
    Log on successfully to Oracle BI in the MS Word with the desktop add-in 
    Successfully access to the Answer's request results and get the field to rtf template. 
    Pressing preview 
    Error is shown as below: 
    Error No: 53 
    Desc: File not found 
    Please confirm that 
    1) Java runtime version is 1.3 or later is installed correctly 
    2) The Java executable is accessible through the Windows Path or the Java Home directory is entered in the Preview tab of the options dialog 
    User then download JRE 1.5 to test again, but the problem is still here. 
    Strangely, this problem only happened in some users' desktop / notebooks. 



    solution
    --------------
    Tools-->Options-->preview tab-->check correct path for JRE should be selected.