We help IT Professionals succeed at work.
Get Started

cffile write error

931 Views
Last Modified: 2013-12-05
I am trying to write a simple file issue.  See the attached code.  The problem is that sometimes it will allow me, sometimes it won't.

When it doesn't I get the following:

***************************************************************************************************************************************
***************************************************************************************************************************************


The following information is meant for the website developer for debugging purposes.  

Error Occurred While Processing Request  
An error occurred when performing a file operation write on file \\myserver\D\Intranet\TechFolder\Test\NewExcel.xls.  
The cause of this exception was: java.io.FileNotFoundException: \\myserver\D\Intranet\TechFolder\Test\NewExcel.xls (Access is denied).  
 
The error occurred in D:\Intranet\TechSupport\TestFileWriting.cfm: line 9
 
7 :             </tr>
8 :             </table>
9 : " addnewline="Yes">
10 :             

 

--------------------------------------------------------------------------------
 
Resources:
Check the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.

 
Browser   Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Remote Address   192.168.10.70
Referrer    
Date/Time   27-Jan-09 11:00 AM
 
Stack Trace (click to expand)  
at cfTestFileWriting2ecfm367057022.runPage(D:\Intranet\ TechFolder\TestFileWriting.cfm:9) at cfTestFileWriting2ecfm367057022.runPage(D:\Intranet\ TechFolder\TestFileWriting.cfm:9)


java.io.FileNotFoundException: \\myserver\D\Intranet\TechFolder\Test\NewExcel.xls (Access is denied)
      at java.io.FileOutputStream.open(Native Method)
      at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
      at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
      at coldfusion.tagext.io.FileTag.createNewFile(FileTag.java:1103)
      at coldfusion.tagext.io.FileTag.write(FileTag.java:356)
      at coldfusion.tagext.io.FileTag.doStartTag(FileTag.java:291)
      at coldfusion.runtime.CfJspPage._emptyTag(CfJspPage.java:1915)
      at cfTestFileWriting2ecfm367057022.runPage(D:\Intranet\TechSupport\TestFileWriting.cfm:9)
      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.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$DownstreamMetrics.invokeRunnable(ThreadPool.java:318)
      at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:426)
      at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:264)
      at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

 
***************************************************************************************************************************************
***************************************************************************************************************************************
 
I don't see how it can be a permissions issue.  Nothing changes from erring to working as it pertains to users or as it pertains to roles.

We have recently changed from a Windows Server 2000 to Windows Server 2003.

As stated THIS DOES WORK... when it wants to.  But it doesn't work.  No anomalies can be found.

Thanks!!
<cffile action="write" file="\\myserver\D\Intranet\TechFolder\Test\NewExcel.xls" output="
		<table>
		<tr>
			<td  colspan='2'>Item One</td>
			<td  colspan='2'>Item Two</td>
			<td  colspan='2'>Item Three</td>
		</tr>
		</table>
" addnewline="Yes">

Open in new window

Comment
Watch Question
Commented:
This problem has been solved!
Unlock 3 Answers and 31 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE