I'm currently experiencing a very weird issue with CFDOCUMENT.
One of my clients is running a large CF infrastructure. For
various reasons, it was decided to upgrade the different
systems (local developer machines, dev sever, staging and
producation) from CF 7 (or CF 7.0.1 - there was no consistency)
to CF 7.0.2 (note: we're talking about CF running as a J2EE
instance on a full-blown Jrun 4) with hotfix hf702-62335.jar
installed (to fix a few CFDOCUMENT issues in the original
CF 7.0.2). HTTP server is IIS 6, all server machines run
on W2k3 server, the developer machines Win XP.
The upgrade went totally smooth in all environment except
(guess what) production. Since installing the update to
7.0.2, CFDOCUMENT just doesn't work at all on production.
Even simple stuff such as:
<CFDOCUMENT format="pdf">
<p>hello world</p>
</CFDOCUMENT>
doesn't not work anymore.
The behaviour I'm seeing here is that the pages just time
out with CF's default timeout value (6000 secs here) and
never executes. It also doesn't make a difference if we
try to write the pdf to the file system, I've experimented
with the fontembed property as well as with creating a
FlashPaper document.
The Application.cfm of this app uses CFError to email me
the error struct, and what I basically get from there is:
Diagnostics:
The document has no pages. null <br>The error occurred on line 1.
StackTrace:
ExceptionConverter: java.io.IOException: The document has no pages.
at com.lowagie.text.pdf.PdfPages.writePageTree(Unknown Source) at
com.lowagie.text.pdf.PdfWriter.close(Unknown Source) at
com.lowagie.text.pdf.PdfDocument.close(Unknown Source) at
com.lowagie.text.Document.close(Unknown Source) at
coldfusion.tagext.lang.DocumentTag.doAfterBody(DocumentTag.java:1225)
at cftest2ecfm126104682.runPage(D:\Inetpub\wwwroot\Intranet\blabla\testkai\test.cfm:1)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152) at
coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:349) at
coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at
coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:225)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:51)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:86) at
coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:69) 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.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:115) at
coldfusion.CfmServlet.service(CfmServlet.java:107) 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:541) at
jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:204) at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:426) at
jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
The stack trace apparently points to the issue that the pdf content
never gets written into a temporary file or stream to the browser.
Removing the hotfix totally or replacing it with the cumulative hotfix
for 7.0.2 doesn't make a difference.
Have done some investigations and looking at reports of people
having reported similar issues before, those were either
related to a very clear issue (watermark file missing, using
images in their CFDocument) or way pre CF 7.0.2. I'm running a
bit out of ideas on this one now ;)
Anyone able to provide a good suggestion what else to look into? I'm
wondering if it could be some sort of an access rights issue. Does
CFDocument write anything into a temporary file somewhere during the
creation of a pdf to be delivered directly to the browser?
Cheers
Kai
thx, had tried that before, didn't make any difference.
Cheers
Kai
The document has no pages. CFDOCUMENT
Regards
Dale Fraser
http://dalefraser.blogspot.com
-----Original Message-----
From: cfau...@googlegroups.com [mailto:cfau...@googlegroups.com] On Behalf
Of Kai
@AJ: FlashPaper doesn't work either, we've rebooted the machine as
well as have cleared the template
cache before each single test, deleted class files in the cfclasses
folder etc.
Cheers
Kai
Cheers
Gareth.
Debug is enabled on some of the developer machines and the dev
server.
Not on staging or production, and the issue just occurs on production.
Cheers
Kai
Try a real html page cutup into chunks and wrapped in cfsavecontent.
_________________________________________________________________
Advertisement: Your Future Starts Here. Dream it? Then be it! Find it at
www.seek.com.au
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fninemsn%2Eseek%2Ecom%2Eau%2F%3Ftracking%3Dsk%3Ahet%3Ask%3Anine%3A0%3Ahot%3Atext&_t=764565661&_r=june07_endtext_future&_m=EXT
I really don't think that this is an issue of the way CFDocument is
used here. I'm currently investigating in the directions of wrongly or
to tightly set permissions on the production environment and also
looking into potential issues that could have made the update fail/go
wrong.
Does anyone know if CFDocument writes into a temp folder while being
executed? Maybe somewhere hidden in WEB-INF...?
Cheers
Kai
http://www.jmpj.net/jason/index.cfm?mode=entry&entry=24C18D4D-CF1D-76B8-A3B8293A87D7D440
I know you mentioned that you saw this error report, but I'm guessing
that maybe it's still required even though you're in production mode.
This is slightly off topic, but cfdocument seems a little
finicky/buggy to me. In particular I've had big problems with
formatting Chinese characters and also in testing our CRM app under
scorpio, i noticed some strange behaviour. A var scoped CFC instance
created outside a cfdocument tag just disappeared when trying to
reference it inside the cfdocument tag. It threw a variable not found
exception.
Also the formatting has change quite a bit in Scorpio, but i think
it's for the better. It seems to be more consistent in appearance.
However, it means we'll need to adjust all the formatting for our doc
generators when it comes time to upgrade.
-jason
--
Jason Sheedy
www.bytespring.com
www.jmpj.net
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------