• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CFDOCUMENT "An exception occurred document processing.The cause of this exception was that: java.lang.NullPointerExcepti

Explorer ,
Apr 13, 2006 Apr 13, 2006

Copy link to clipboard

Copied

Hi,
we are using cfdocument to create pdfs and it works fine 99%. Its just that for one document we are getting this error. Also if we view html for this error document it shows fine... its only when we try to view the pdf we get error. I have highlighted the error line below.... what it does is that it gets the verbiage by running query get_letter..... I searched the exception log from CF Admin but it doesnt give any extra info... I have pasted the contents of the log after the code....Let me know if someone has seen this before...

<cfdocument format="pdf" unit="in"
margintop=".75" marginleft=".75" marginright=".75" marginbottom=".75"
filename="#path#\#doc_id#.pdf" overwrite="yes">
<cfoutput>#get_letter.letter_verbiage#</cfoutput>
</cfdocument>

"Error","jrpp-24","04/13/06","09:28:57","XYZ","An exception occurred when performing document processing.The cause of this exception was that:

java.lang.NullPointerException. The specific sequence of files included or processed is: C:\Inetpub\wwwroot\XYX\XYX.cfm "
coldfusion.tagext.lang.DocumentTagException: An exception occurred when performing document processing.
at coldfusion.tagext.lang.DocumentTag.doAfterBody(DocumentTag.java:1113)
at cfO_View_Correspondence2ecfm1406404098.runPage(C:\Inetpub\wwwroot\XYX\XYX.cfm:50)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:343)
at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:210)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:51)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:50)
at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:52)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.CfmServlet.service(CfmServlet.java:105)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:257)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:204)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:457)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
TOPICS
Advanced techniques

Views

2.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 21, 2006 Apr 21, 2006

Copy link to clipboard

Copied

Hi,

Just saw this also myself. Restarting CF server seemed to resolve the problem. Maybe the runtime code gets corrupted?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 23, 2006 Apr 23, 2006

Copy link to clipboard

Copied

What do you get when you do this instead

<cfset verbiage = get_letter.letter_verbiage>
<cfdocument format="pdf" unit="in"
margintop=".75" marginleft=".75" marginright=".75" marginbottom=".75"
filename="#path#\#doc_id#.pdf" overwrite="yes">
<cfoutput>#verbiage#</cfoutput>
</cfdocument>


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 03, 2006 May 03, 2006

Copy link to clipboard

Copied

Hey there everyone... I'm having a similar problem as AjasHadi on 8/23/2005.
ColdFusion Server Enterprise 7,0,0,91690

(Rebooting is not an option on this server)

The page is a larger page formatted much like an invoice or balance sheet. If I abort before the last </cfoutput> the page renders in PDF just fine. If the last cfoutput tags are removed the page errors on the cfoutput tags prior to the just removed tags.
[ I have also tried recreating the page... just in case it was a problem with a pointer in to the file. ]

Any ideas?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 03, 2006 May 03, 2006

Copy link to clipboard

Copied

Okay I have it fixed now. (Although does not make much sense to me)
For anyone else out there...

The problem seemed to be with the document footer. When the footer was taken away the page rendered fine. (header was left in place)

Since it was the footer I thought may be it might be a problem with the margins. Thus, I ADDED space to the bottom margin the page rendered fine.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 04, 2006 May 04, 2006

Copy link to clipboard

Copied

This seems quite weird. Were you creating footer without any content in it? can you post a code snippet with which I can replicate this?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 04, 2006 May 04, 2006

Copy link to clipboard

Copied

Sure. This problem came to me as a trouble ticket to resolve. As always "20/20 in the hindsight" this is an easily solvable problem. The issue is that the page seems to error if you specify the marginbottom attribute to be 0. If you leave the attribute out the page works fine, however in this case the bottom margin was desired to be as small as possible so it was set to zero by the original developer. Atleast it was an interesting issue...

<cfscript>
// of course these vars would be passed via a form but for this example...
form.lname = 'Frank'; form.fname='Mark'; form.userid='1000';
</cfscript>

<cfdocument format="PDF" pagetype="letter" margintop="1" marginbottom="1" marginright="0.75" marginleft="0.75" orientation="portrait" backgroundvisible="yes" overwrite="no" fontembed="yes">

<cfdocumentitem type="header">
<span style="font: 8pt 'Times New Roman', Times, serif;">
<cfoutput>#form.LNAME#, #form.FNAME#</cfoutput>
<span style="padding-left: 20px;"><cfoutput>(#form.userid#)</cfoutput></span>
<span style="float:right;"><cfoutput>#cfdocument.currentpagenumber# of #cfdocument.totalpagecount#</cfoutput></span>
</span>
</cfdocumentitem>

<cfdocumentitem type="footer">
<span style="font: 8pt 'Times New Roman', Times, serif;">
<cfoutput>#form.LNAME#, #form.FNAME#</cfoutput>
<span style="padding-left: 20px;"><cfoutput>(#form.userid#)</cfoutput></span>
<span style="float:right;"><cfoutput>#cfdocument.currentpagenumber# of #cfdocument.totalpagecount#</cfoutput></span>
</span>
</cfdocumentitem>
<cfoutput>
<table><tr><td>216 lines represent the lines of document display code</td></tr><cfset counter = 1>
<cfloop index="a" from="1" to="216" step="1">
<tr><td>row number #counter#</td></tr><cfset counter = counter + 1>
</cfloop>
</table>
</cfoutput>
</cfdocument>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 05, 2006 May 05, 2006

Copy link to clipboard

Copied

Not sure who marks these... but this issue was resolved. Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 23, 2006 May 23, 2006

Copy link to clipboard

Copied

LATEST
Interesting... we had something very similar happen to us. If the footer was empty (no text), then it would cause a "An exception occurred when performing document processing" error. Here is the basic code inside our CFDOCUMENT:

<cfdocumentsection>
<cfdocumentitem type="header"><cfoutput>#strStatement.header#</cfoutput></cfdocumentitem>
<cfdocumentitem type="footer"><cfoutput>#strStatement.footer#</cfoutput></cfdocumentitem>
<cfoutput>#strStatement.body#</cfoutput>
</cfdocumentsection>

If strStatement.footer did not contain any text, it errored out. If we put text there, it works. So the solution for us was to always return text--an empty div, for example. This smells like a bug.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation