tracker issue : CF-3178676

select a category, or use search below
(searches all categories and all time range)
Title:

cfspreadsheet with ram://

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Cameron Jacobs / Cameron Jacobs (Cameron.Jacobs)

Created: 04/30/2012

Components: General Server

Versions: 10.0

Failure Type: Non Functioning

Found In Build/Fixed In Build: Public Beta / 283424

Priority/Frequency: Major / Some users will encounter

Locale/System: English / Linux Ubuntu 10.10

Vote Count: 2

Duplicate ID:	CF-3042909

Problem Description:
cfspreadsheet action="write" is unable to write to the ram drive.
I have tried this with the following code sets:

First:
<cfspreadsheet action="write" filename="ram://test.xlsx" query="resultQuery"/>

2 Errors are received (refreshing the same page shows 1 error or the other with no code changes):
1) An exception occurred while using action=write. java.io.FileNotFoundException: ram:///test.xlsx
2) An exception occurred while using action=write. java.lang.ClassCastException: coldfusion.vfs.VFileOutputStream cannot be cast to java.io.FileOutputStream

Second:
<cfspreadsheet action="write" filename="ram://test.xlsx" query="resultQuery" overwrite="true"/>

Error:
An exception occurred while using action=write. java.io.FileNotFoundException: ram:///test.xlsx

Third:
<cfscript>
	sheet = spreadsheetNew("SUMs SpreadSheet");
	spreadsheetAddRows(sheet, resultQuery);
</cfscript>
<cfspreadsheet action="write" filename="ram://test.xlsx" name="sheet" overwrite="true"/> 

Error:
An exception occurred while using action=write. coldfusion.excel.ExcelProcessException: An exception occurred while using action=write.

CFspreadsheet seems to work perfectly when writing to a file on disk, but does not seem to work when writing to the ram drive.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3178676

External Customer Info:
External Company:  
External Customer Name: Cameron.Jacobs
External Customer Email:  
External Test Config: My Hardware and Environment details:

2 different environments

Environment 1:

ColdFusion 10 x64

Ubuntu 11.10 x86_64

Apache 2.2



Environment 2:

ColdFusion 10 x64

Fedora 16 x86_64

Apache 2.2

Attachments:

Comments:

Doesn't really impact productivity, it's only a nice to have.
Vote by External U.
19593 | June 01, 2012 08:34:14 AM GMT
Reproducible: Use this code to reproduce it. <cfset data = SpreadsheetNew("sample") > <cfspreadsheet action="write" filename="#expandpath('./')#/spreadsheet.xlsx" name="data" overwrite="true" > <cfspreadsheet action="write" filename="ram:///spreadsheet.xlsx" name="data" > Description: using cfspreadsheet tag user is not able to write in virtual filesystem(ram://file.txt), which we introduced in CF9, but it works in physical filepath. As the virtual filesystem path works for cfinclude and cffile like tags, it should work for cfspreadsheet too. Error Stack: java.io.FileNotFoundException: ram:\spreadsheet.xlsx (The filename, directory name, or volume label syntax is incorrect) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:194) at java.io.FileOutputStream.<init>(FileOutputStream.java:84) at coldfusion.excel.Excel.writeExcel(Excel.java:4837) at coldfusion.tagext.lang.SpreadSheetTag.writeToExcel(SpreadSheetTag.java:237) at coldfusion.tagext.lang.SpreadSheetTag.doStartTag(SpreadSheetTag.java:157) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2791) at cfCF-31786762ecfm1871097208.runPage(C:\ColdFusion10\cfusion\wwwroot\milan\bugs\CF-3178676\CF-3178676.cfm:4) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:239) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:444) at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at coldfusion.filter.IpFilter.invoke(IpFilter.java:64) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:443) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:112) at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:30) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94) at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:79) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62) at coldfusion.CfmServlet.service(CfmServlet.java:204) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:414) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)
Comment by Milan C.
19588 | July 31, 2012 07:11:19 AM GMT
produce the same error when writing to amazon s3 bucket.
Vote by External U.
19594 | March 21, 2013 12:53:11 PM GMT
fix verified in build 284908. test case: \\depot\ColdFusion\qa\cf\regression\coretests\coldfusion\tags\extensibility\msoffice\poi_v39\Bugs\bug7_CF-3042909
Comment by Piyush K.
19589 | May 24, 2013 07:08:34 AM GMT
Hi Milan and Piyush This ticket was only fixed for the name="" attribute, but not fixed for the query="" attribute. Verified in CF11 Final and CF11 Update 3. Please see #CF-3925916. Thanks!, -Aaron
Comment by External U.
19590 | January 29, 2015 03:38:07 AM GMT
Also verified bug still exists for query="" attribute in CF10 Update 15.
Comment by External U.
19591 | January 29, 2015 03:42:58 AM GMT
This is still not fixed for QUERY attribute in CF11 version 11,0,10,300066
Comment by External U.
19592 | October 04, 2016 09:16:46 AM GMT