Purchase Order's PDF generation errors.




How to Diagnose and Resolve the ‘System failed to generate the PDF’ or 'PDF Document Generation Failure' errors in Procurement (Doc ID 1520871.1)

APPLIES TO:

Oracle iProcurement - Version 12.0.0 to 12.1.3 [Release 12 to 12.1]
Oracle Purchasing - Version 11.5.10 to 12.1.3 [Release 11.5 to 12.1]
Information in this document applies to any platform.

PURPOSE

The objective of this document is to provide best practices for preventing and resolving the for ‘System failed to generate the PDF document’ error in Procurement.  This document is applicable for release 11.5 and above.
System failed to generate the PDF document errors can occur from  various navigation paths in the Purchasing responsibility:
  • From Reports>Run choosing the ‘PO Output for Communication’.  From Print there are two manual report choices: PO Output for Communication and PO Output for Communication: FAX
  • After entering a Purchase Order and choosing the Approve button under Transmission Methods, Print, Fax or E-Mail can be chosen.  This can also be setup to automatically default from the Supplier Setup.
  • From the Purchase Order Summary form choosing Tools>Communicate where Print , FAX or Email can be chosen. 
  • From the Buyer Work Center, open a Purchase Order in the Orders tab and choose the action View PDF.
Errors like the following may be encountered (not all are mentioned here) and can be seen from various sources; such as the wfstat.sql, the PO Output for Communication log file, View Output, on approval and via the notifications:
  • PDF Document Generation Failure - Standard Purchase Order XX
  • The system could not generate and/or communicate at least one of the documents to the supplier or the approver. Please contact the system administrator.
  • java.lang.NoClassDefFoundError
  • PO_REQAPPROVAL_INIT1.EMAIL_DOC_YES_NO ORA-0140
Regardless of the navigation use these best practices to avoid and resolve ‘System failed to generate the PDF document’ issues.

TROUBLESHOOTING STEPS

check Step 1. Check Setup

A. Check Profile options

Check the profile options 'ICX: Numeric characters' and 'XDO: Numeric characters'.
A possible reason for problems to occur is that one of the following profile options is not set:
  • ICX: Numeric characters
  • XDO: Numeric characters
a. From the System Administrator responsibility navigate to Profile > System
b. In the Profile field enter 'ICX: Numeric characters'
c. At the Responsibility or Application level set the value to '10.000,00' or '10,000.00'
profile
The system profile 'ICX: Numeric Characters' can impact other products so set the profile at the responsibility or application level.
d. Repeat the steps for profile option 'XDO: Numeric characters'
e. Save the changes and retest the issue
lightbulb2Did you Know?    This one setup step will prevent the errors reported in the following notes:
Document ID Title/Symptoms
Note 1067529.1‘PO Output For Communication Errs For Pre-Upgrade POs Java.Lang.Exception: PDF: null’
Note 1084372.1‘PO Output For Communication Completes With Error In R12.1.2’
genDoc() : Exceptionjava.lang.Exception: Error while generating PDF :null java.lang.Exception: Error while generating PDF :null
Note 1480164.1‘PO Output For Communication Fails getNumberFormatCharacters 001 Final numberFormat :: null' and PoPrintingUtil.getBlobPDF(input,input) - Error while generating the PDFjava.lang.NullPointerException

B. Check Archive On

Another possible cause is that Archive On is not set for the document type Standard Purchase Order. This can be determined by running the following query:
SELECT archive_external_revision_code archive_on, org_id
FROM po_document_types_all
WHERE document_type_code = 'PO'
AND document_subtype = 'STANDARD';

If the query indicates that Archive On is not set, take the following steps to correct this:
  1. Navigate to Setup > Purchasing > Document Types
  2. For Document Type 'Purchase Order Standard' click on Update
  3. Set Archive On to Approve and save the changes

C.  Check the Layout Template

If you are using a custom template or receive the error 'The system could not generate the PDF for viewing this document. There is no layout template specified for this document type' is received:
1. Navigate from the Purchasing responsibility for the Operating Unit in which you are creating the Purchase Order (PO) to the document  types form (Navigation: Setup>Purchasing>Document Types).
2. Null out the field 'Document Layout' and save the form.  You will receive the error 'Please enter a value for this required field.'
3. Then proceed to add the value 'Standard Purchase Order Stylesheet' which is the seeded template from the List of Values, as shown here:
stylesheet
If the issue is occurring on other document types the following seeded templates should be populated:
Blanket Purchase Agreement:  PA_BLANKET_XSLFO - Blanket Agreement Stylesheet
Contract Purchase Agreement: PA_CONTRACT_XSLFO - Contract Agreement Stylesheet
Release Blanket: RELEASE_BLANKET_XSLFO - Blanket Release Stylesheet
4. Save the changes and retest.

target Step 2. Targeted Critical Patching

A. Critical Patching

Apply the Rollup (RUP) patches noted here. 
ReleasePatchNote Reference
12.1.3Apply the current rollup as indicated in Note 1468883.1Document 1468883.1
12.1.1 or 12.1.2Implement the Oracle E-Business Suite release update pack Patch 9239090 or apply R12.PRC_PF.B.delta.3 Patch 9249354.Document 1468883.1
11.5.10.2Apply PRC 11.5.10.2 Rollup Patch 12 Patch: 8791241Document 222339.1
Drill down on the link here for the statements that can be run in SQL*Plus to determine your family pack and rollup patch code levels for Procurement.
Additional Critical Patching
Confirm the following files are on or higher then the versions listed in the table below.
Click here for the strings command to obtain your current file versions.
If the versions are lower, then apply the recommended patches.
File NameFile VersionRecommended Patch
For Release 12.1.X:
CpContext.class
Run.class
120.13.12010000.5
120.3.12010000.2
Patch 13355383:R12.FND.B
For Release 12.0.X 
PoGenerateDocumentCP.class
PoGenerateDocument.class
PoPrintingUtil.class
POXVCOMB.pls
120.9.12000000.11
120.15.12000000.11
120.1.12000000.7
120.49.12000000.28
Patch 8781255:R12.PRC_PF.A
CpContext.class
Run.class
120.9.12000000.6
120.3.12000000.2
Patch 13482674:R12.FND.A
For Release 11i  
PoGenerateDocumentCP.class PoGenerateDocument.class115.8.11510.2
115.18.11510.2
Patch 11.5.10.2
PoPrintingUtil.class115.4.11510.8Patch 13789075
POXVCOMB.pls115.69.11510.75Patch 13563709
CpContext.class
Run.class
115.29
115.9
Patch 11i.ATG_PF.H.delta.7

lightbulb2   Did you Know?    Applying the patches above will prevent the issues listed here below, and the one off patches included in these reference notes would not be necessary.
Doc IDTitle/Symptoms
11.5.10.2 :   Fixes included in 11.5.10.2 Rollup Patch 12 Patch 8791241
Note 315033.1‘System Failed To Generate The PDF Document When Nav From Req Summary To Po Summary’.  When navigating from Requisition Summary to PO summary , unable  to view  PO document from  PO summary - special menu, error displays instead
Note 331313.1‘11.5.10: PO Output For Communication Does Not Generate PDF Attachment With Email’.  There is not a pdf attachment but there is an html attachment that reads "System failed to generate the PDF document."
Note 372757.1‘Supplier Chooses PDF Document.html Link in Purchase Order Notification and Receives System Failed to Generate PDF'.  Log file shows java.lang.NoClassDefFoundError
Note 454479.1'PO Output For Communication Fails for Specific Buyers.’  Issue occurs in View Document and log file shows "ORA-19202: Error occurred in XML processing ORA-01422: exact fetch returns more than requested number of rows ORA-06512: at ""APPS.PO_COMMUNICATION_PVT"", line 4723" In MODULE po.plsql.PO_COMMUNICATION_PVT.POXMLGEN
Note 753881.1‘PO Approval Fails at PO_COMMUNICATION_PVT.GENERATE_PDF_SUPP With ORA-1403’. ExceptionORA-01403: no data found
Note 791084.1‘System Could Not Generate The PDF For Viewing This Document. There is no Layout Template Specified for this Document Type.’
Note 837170.1‘POXPOPDF: PO PDF Generated In Wrong Language When PO Is Approved Through Email’.  On opening the pdf the System failed to generate the PDF document is received.
Note 862726.1‘POXPOPDF: PO Output for Communication Errors: Po.Communicate.Pogeneratedocumentcpjava.Lang.Illegalargumentexcep’. This occurs on running the report and the log file contains:
PoPrintingUtil.getBlobPDF(input,input) - Error while generating the
PDForacle.apps.xdo.XDOException: java.io.BufferedReader cannot be cast to java.io.InputStream
genDoc() : Exceptionjava.lang.Exception: Error while generating PDF :java.io.BufferedReader cannot
be cast to java.io.InputStream
java.lang.Exception: Error while generating PDF :java.io.BufferedReader cannot be cast to
java.io.InputStream
Note 1056167.1‘Unable to Get the PO as Attachment When PO Communicate Option is Used - System Failed to Generate the PDF Document. Error message 3835 at EMAIL_PO_PDF_S’.  Error message is displayed in Supplier email rather than PDF.
Note 1401210.1‘Document Attached to PO Acceptance Notification Is Showing Error System Failed To Generate The PDF Document'.
R12.1.3:  Fixes included in current 12.1.3 rollup
Note 889904.1‘POXPOPDF:PO Output For Communication fails with ORA-00936 Missing Expression Error for Blanket Releases’. The following error message can also be seen in FND_LOG_MESSAGES.
Module: po.plsql.PO_COMMUNICATION_PVT.POXMLGEN 
Message Text: ORA-19202: Error occurred in XML processing 
ORA-00936: missing expression
Note 1078546.1‘System Fails To Generate PDF Document After Clicking PDF Document On Supplier Notification When Different Languages Are Used’. The PDF document attached to PO acceptance notification shows the error.
Note 1287488.1‘PO Email From Tools>Communicate At Same Time of Approval Corrupts PDF File Transmits As .HTML & System Failed to Generate PDF’. This occurs when PO is submitted for approval and user sends from Tools>Communicate immediately after.
Note 1320817.1‘R12: PO Output For Communication Program Generates Exception java.lang.ArrayIndexOutOfBoundsException When Printing Purchase Release’.
Note 1350075.1‘PO_PDF_ERROR Supplier Notifications Error With System Failed To Generate Pdf Document For Email To Supplier'.  Also Invalid Document.htm Attached Rather Than .pdf’
Note 1474136.1‘Planned PO Erred With: POAPPRV PO_REQAPPROVAL_INIT1.EMAIL_DOC_YES_NO ORA-01403’.  This occurs on the email notification.
Note 1474340.1‘When Supplier Language is Different Than Buyer's Language the PDF That Is Generated On Email to Supplier Can Be in Error’.  The emails are received successfully by the Supplier but when the "PDF Document.html" link is chosen to view the details of the Purchase Order a ‘System failed to generate the PDF document.
Note 1238303.1Viewing Purchase Order using the Buyer Work Center errs with:
\n\ Problem: The system could not generate the PDF document.
\n\ Reason: The system detected an error in the following code/object.
\n\ Code: XML
\n\ Object: PO
\n\ Action: Please contact the system  admin..

B. Optional Patching

Consider these optional patches to be applied on top of the critical patches listed above:
ReleaseSymptomsPatch FixNote Reference
11.5.10.2When Approving a PO the email notification shows "System failed to generate the PDF document. Please contact your system administrator".

In addition if the PO output for Communication is submitted manually for the same PO, the PDF is generated without errors
Patch 8983924Note 1093045.1
11.5.10.2The 'PO Output for Communication' POXPOPDF fails with getNumberFormatCharacters 001 Final numberFormat ::nullPatch 9278155Note 1222073.1
12.0.X onlyViewing Purchase Order using the Buyer Work Center errs with:
\n\ Problem: The system could not generate the PDF document.
\n\ Reason: The system detected an error in the following code/object.
\n\ Code: XML
\n\ Object: PO
\n\ Action: Please contact the system  admin..
12.0.X: Patch 11057944Note 1238303.1
12.1.XPO Output for Communication from Reports fails and shows the following in the log file:
Executing the query for header id
java.lang.NullPointerException
rolling back the complete program
Patch 13355383:R12.FND.BNote 1383832.1
12.1.XPreview Contract in Contract fails in error.Patch 12897701:R12.OKC.BNote 1353630.1

bullhorn Step 3. Additional Troubleshooting Steps

A. Obtain and Review the log file

The PO Output for Communication process will generate a log file which can be used as an aid in troubleshooting.

1. Obtain the 'PO Output for Communication' request to see if the process has completed and view the log file:

Navigation: From Purchasing, Choose View>Requests from the Toolbar.
Enable 'Specific Requests' and in the 'Name' field enter 'PO Output for Communication' or 'PO Output for Communication: FAX', press the Find button.

Confirm the process has Phase: Completed with no Error in the Status field.

Troubleshoot 1

There are cases where multiple 'PO Output for Communication' processes will be spawned. Be sure to review all the output logs and ignore the output that is blank.
2. Choose the 'View Log' button and review the entire log file.

The m_TemplateCodes below shows the standard Stylesheet PO_STANDARD_XSLFO is being used. If a custom style sheet is shown, then retest by setting the standard stylesheet as shown in Step 1, 'C.  Check the Layout Template' section above.

Look for errors in the log file such as the PDFjava.lang.NullPointerException shown here:

Troubleshoot 2

If the error message is too generic such as  java.lang.NullPointerException only, consider the following:
  • If this issue occurs when the 'PO Output for Communication' is run manually from Reports>Run or can be replicated when run manually, rerun the process setting the Parameter Test='Debug' for additional error messaging in the log file.
  • Obtain the debug and trace as shown below in the section 'C. Obtain the Trace file'.
Once a more detailed error message is obtained navigate back to the guided resolution Note 1377764.1 'eBS : 'PO Output for Communication' Process Search Helper (Guided Resolution)' and choose the symptom 'Additional error messaging is known'. Or search on the specific error message in MyOracleSupport.

B. Track the email request from Tools>Communicate

After checking the email check box on the Tools > Communicate UI, a note displays: 'Your email request has been submitted'. The following can be used to track this request as this workflow process is not associated to the purchase order.

There is not a user friendly form to view the workflows when emails are sent from the Tools > Communication form. However, the workflow can be displayed from the workflow monitor screen, as follows:
Navigation:
1. Go to the Workflow Status Monitor.
2. In the 'Workflow Type' field select 'PO Approval'.
3. Use the po_header_id and % in the 'Item Key' field. For example 47243%.
To obtain the po_header_id for the purchase order the following sql can be run:
SELECT po_header_id
FROM po_headers_all
WHERE segment1 = '&po_number';
4. Use the 'Workflow Started' field to further narrow down the search for a specific range of dates. 

C. Obtain the Trace file

1. If the issue occurs when the PO Output for Communication is manually submitted from Reports>Run, use 'Method C - Enable database trace from the concurrent program definition' from Note 1063574.1 'How To Diagnose Generation Problems When Running 'PO Output for Communication' Report'

2. If the issue occurs with the following replication steps:
  • Email generated automatically after submitting Approve from the Purchase Order form
  • From Tools>Communicate or Inquire>View Document
Use 'Method B - Enabling database trace from the Core application' from Note 1063574.1 'How To Diagnose Generation Problems When Running 'PO Output for Communication' Report'.
Once a more detailed error message is obtained navigate back to the guided resolution Note 1377764.1 'eBS : 'PO Output for Communication' Process Search Helper (Guided Resolution)' and choose the symptom 'Additional error messaging is known'. Or search on the specific error message in MyOracleSupport.

3. Obtaining the fnd debug at the same time of capturing the trace can provide additional valuable error messaging.  Following are the steps to capture the debug:

For Release 11i:

a. Set the profile 'Concurrent:Debug Flags' to 'TCTM1' at the site level.
Navigation: From System Administrator, System>Profile
This will cause transactions to make debug entries in the FND_CONCURRENT_DEBUG_INFO

b. Truncate the table FND_CONCURRENT_DEBUG_INFO.

c. Reproduce the issue.

d. After reproducing the issue, run this sql and export results to an excel sheet with table column headings and review the output.

select * from FND_CONCURRENT_DEBUG_INFO;

For Release 12:

a. Navigation: From System Administrator, System>Profile, set the following profile values:

FND: Debug Log Enabled = YES
FND: Debug Log Filename = NULL
FND: Debug Log Level = STATEMENT
FND: Debug Log Module = %
PO: Set Debug Workflow ON to Yes

b. Run the following sql to collect the max log sequence just before replicating the issue.

select max(log_sequence) from fnd_log_messages

c. Reproduce the issue.

d. After reproducing the issue, run this sql and export results to an excel sheet with table column headings and review the output.

select * from fnd_log_messages
where log_sequence > &log_seq_noted_above
order by log_sequence;

As the fnd debug output can be large it is recommend to first search the contents on 'Exception' for errors then additionally browse the entire output for any obvious errors.

questionmark Step 4. Still Have Questions?

Join our growing Oracle Procurement Community and learn from your peers and Oracle on how to address your unique issues in Procurement.
You can access the main Oracle Communities page at http://communities.oracle.com (If you are enrolled, the Procurement community will be listed on your left. If you're not already enrolled in the Procurement community, you can do so by clicking on the link Edit Subscriptions).
OR
From "My Oracle Support" as follows:
    Log into My Oracle Support.
    Click on the 'Community' link at the top of the page.
    Click in 'Find a Community' field and enter Procurement.
    Double click on Procurement in the list.
    Click on the 'Create a Community Post' button and submit your question.

23 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Usually I do not read post on blogs, but I would like to say that this write-up very forced me to try and do it! Your writing style has been surprised me. Great work admin.Keep update more blog.
    Java Training in Chennai

    ReplyDelete
  3. You’ve written a really great article here. Your writing style makes this material easy to understand.. I agree with some of the many points you have made. Thank you for this is real thought-provoking content
    Click here:
    angularjs training in marathahalli
    Click here:
    angularjs training in bangalore

    ReplyDelete
  4. Your story is truly inspirational and I have learned a lot from your blog. Much appreciated.
    Click here:
    Microsoft azure training in velarchery
    Click here:
    Microsoft azure training in sollinganallur

    ReplyDelete
  5. Thanks Admin for sharing such a useful post, I hope it’s useful to many individuals for developing their skill to get good career.
    java training in annanagar | java training in chennai

    java training in chennai | java training in electronic city

    ReplyDelete
  6. Some us know all relating to the compelling medium you present powerful steps on this blog and therefore strongly encourage contribution from other ones on this subject while our own child is truly discovering a great deal. Have fun with the remaining portion of the year.

    Data Science training in rajaji nagar | Data Science with Python training in chenni
    Data Science training in electronic city | Data Science training in USA
    Data science training in pune | Data science training in kalyan nagar

    ReplyDelete




  7. Thanks For Sharing Your information Please keep updating us The Information Shared Is Very valuable Time Just Went On redaing The article Python Online Training Data Science Online Training Aws Online Training Hadoop Online Training

    ReplyDelete
  8. This is beyond doubt a blog significant to follow. You’ve dig up a great deal to say about this topic, and so much awareness. I believe that you recognize how to construct people pay attention to what you have to pronounce, particularly with a concern that’s so vital. I am pleased to suggest this blog.
    Microsoft Azure online training
    Selenium online training
    Java online training
    Python online training
    uipath online training

    ReplyDelete
  9. Good Post. I like your blog. Thanks for Sharing
    Oracle Training in Delhi

    ReplyDelete
  10. Hi Sridevi,

    Want to know how the PDF will get generated when we click on View Document in Inquire tab irrespective of status whether the PO is in Incomplete/Approved....etc;
    To be precise, want to know which package is called and what are the parameters being passed. Also in which table the pdf filenames are stored?

    ReplyDelete
  11. Thanks for all your valuable comments...Brief information's about Java are really useful...Keep sharing with us
    Java training in chennai | Java training in annanagar | Java training in omr | Java training in porur | Java training in tambaram | Java training in velachery

    ReplyDelete
  12. Wonderful article, very useful and well explanation. Your post is extremely incredible. I feel really happy to have seen your webpage and look forward to so many more entertaining times reading here. Thanks once more for all the details.
    Java Training in Chennai

    Java Training in Velachery

    Java Training in Tambaram

    Java Training in Porur

    Java Training in OMR

    Java Training in Annanagar

    ReplyDelete
  13. This article gives the light in which we can observe the reality. This is very nice one and gives indepth information. Thanks for this nice article. Purchase order management best practices

    ReplyDelete
  14. Really I enjoy your site with effective and useful information. It is included very nice post with a lot of our resources.thanks for share. i enjoy this post. Purchase order best practices

    ReplyDelete
  15. This is very educational content and written well for a change. It's nice to see that some people still understand how to write a quality post.! Purchase order

    ReplyDelete
  16. 360 Degree Image Editing Service Are you looking at the ghost mannequin effect service? We provide the invisible man7/11/21 23:36

    requisition Excel Fusion
    Use Simplified Loader Purchase Requisition template provides user-friendly Excel sheets to load Purchase Requisitions to Oracle Fusion. Use Simplified Loader sheets for data migration or BAU. Replace the complex FBDI process with a one-click upload using Simplified Loader. - <a

    href="https://simplifiedloader.com/Catalogue/oracle_fusion_purchase_requisition_excelhttps://simplifiedloader.com/Catalogue/oracle_fusion_purchase_requisition_excell</a

    ReplyDelete
  17. This comment has been removed by the author.

    ReplyDelete
  18. thanks for sharing your information i also appreciate this content also get more information about Credit Card Terminal For Small Business

    ReplyDelete