So, I posted about this error a few weeks ago, and I thought I had it taken 
care of. But, apparently not. (Although I can't ever make the page fail, 
myself.) Here's the scenario.

We have a cfc, customtags and "sandboxed files" area outside the webroot. 
The files need to be served via cfcontent. I wrote a CFC to do that. 
Originally, it was written with return="any" and cf_savecontent to write the 
cfheader or an error message if the file didn't exist.

Next, I tried dumping the cf_savecontent (Dave Watts said it looked 
suspicious) and using return="void" and output="true" and running the 
cfheader/cfcontent within the function.

Currently, I moved the cfheader/cfcontent to a custom tag, but am still 
calling the code via the function. Code looks like this right now:

 <cffunction name="serveDocument" access="public" returntype="void" 
output="true">
  <cfargument name="file" type="string" required="yes">
  <cfargument name="path" required="true" type="string" 
default="#variables.documentpath#">
  <cfset var contenttype = variables.utilities.getMimeType(arguments.file)>
  <cfif checkfile(arguments.file, arguments.path)>
  <cftry>
     <cf_ces_serveDocument file="#arguments.file#" path="#arguments.path#">
  <cfcatch>
   <h1>Error!</h1>
   <p>We're sorry. This document is currently unavailable. Please try again 
later.</p>
   <cfscript>
   variables.errorHandler.sendError(cfcatch);
   </cfscript>
  </cfcatch>
  </cftry>
  <cfelse>
  <h1>Error!</h1>
  <p>The document you are trying to access does not exist. We apologize for 
the inconvenience.</p>
  </cfif>
   </cffunction>

But, I'm still seeing the error - though less frequently than when it was 
called within the function itself.

Short of not using a function at all (and changing a lot of code that uses 
that function), does anyone have any other suggestions? Or, is it just that 
CF can't deal with using cfheader/cfcontent from within a function? Here's 
the stack trace from one of the errors (full paths removed):

Message: The cause of this output exception was that: 
java.net.SocketException: Connection reset.

RootCause:

StackTrace: coldfusion.tagext.OutputException: The cause of this output 
exception was that: java.net.SocketException: Connection reset.
at coldfusion.tagext.net.ContentTag.doStartTag(ContentTag.java:203)
at coldfusion.runtime.CfJspPage._emptyTag(CfJspPage.java:1871)
at cfces_servedocument2ecfm319164752.runPage(/...ces_servedocument.cfm:33)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:147)
at 
coldfusion.filter.CFVariablesScopeFilter.invoke(CFVariablesScopeFilter.java:60)
at coldfusion.tagext.lang.ModuleTag.doStartTag(ModuleTag.java:256)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:1881)
at 
cfcontentserver2ecfc276598372$funcSERVEDOCUMENT.runFunction(/...contentserver.cfc:101)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:338)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:286)
at 
coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:250)
at 
coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:53)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:203)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:359)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:196)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:139)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:1582)
at cfshowdoc2ecfm2059371581.runPage(/.../showdoc.cfm:33)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:147)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:357)
at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:62)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:107)
at 
coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:43)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:80)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:47)
at 
coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:35)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:43)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.CfmServlet.service(CfmServlet.java:105)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:252)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
at 
jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:192)
at 
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)





-- 
Deanna Schneider
UWEX-Cooperative Extension
Interactive Media Developer 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208514
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to