tracker issue : CF-3035890

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

Bug 72767:I wished to test the virtual file system ram:///

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/

Reporter/Name(from Bugbase): A. Bakia / Alfred Bakia (A. Bakia)

Created: 08/21/2008

Components: File Management, VFS-RAM

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 /

Priority/Frequency: Normal / Unknown

Locale/System: English / Win All

Vote Count: 1


I wished to test the virtual file system ram:///. I used self-contained CFML code, which I stored as the file vfs_test.cfm. When I run it I get ram:///a/b/dynamic.cfm. That is, Coldfusion apparently fails to find the file that is supposed to be in memory.

I found a workaround. The code works when I uncomment the line <cfdirectory action="create" directory="ram:///a/b/" />. For some reason, it continues to work even after I comment this line back again.


1) Save the following code as the file vfs_test.cfm:

<!--- Self-contained code: displays a list of names when run as a cfm page --->
<cfsavecontent variable="cfml">
manager = createObject("java", "java.sql.DriverManager");
driver =createObject("java", "java.lang.Class").forName("org.apache.derby.jdbc.EmbeddedDriver");
connection = manager.getConnection("jdbc:derby:C:\ColdFusionCentaur\db\bookclub;create=false");
	statement      = connection.createStatement();
    resultSet      = statement.executeQuery("SELECT * FROM authors");
	while ( ) {
      author = resultSet.getString("firstname") & " " & resultSet.getString("lastname");
      writeoutput(author & "<br>");

<!--- Seems to work only after I uncomment this line --->
<!--- <cfdirectory action="create" directory="ram:///a/b/" />  --->

<!--- Write the CFM data to an in-memory file --->
<cffile action="write" output="#cfml#" file="ram:///a/b/dynamic.cfm" /> 

<!--- cfinclude the file; the mapping vfs -> ram:///a/b/ is registered in the Administrator --->
<cfinclude template="/vfs/dynamic.cfm"> 

2) Create the mapping vfs -> ram:///a/b/ in the Coldfusion administrator;

3) Restart Coldfusion Centaur;

4) Run the page vfs_test.cfm. (This results in

5) Uncomment the line <cfdirectory action="create" directory="ram:///a/b/" /> and run the page again. It should now work.

6) It continues to work even after you comment out the line in step 5 once again.  


An error occurred when performing a file operation write on file ram:///a/b/dynamic.cfm.  
The cause of this exception was: ram:///a/b/dynamic.cfm.  
The error occurred in C:\ColdFusionCentaur\wwwroot\website\vfs_test.cfm: line 20
18 : 
19 : <!--- Write the CFM data to an in-memory file --->
20 : <cffile action="write" output="#cfml#" file="ram:///a/b/dynamic.cfm" /> 
21 : 

Stack Trace  
at cfvfs_test2ecfm883902832.runPage(C:\ColdFusionCentaur\wwwroot\website\vfs_test.cfm:20) at cfvfs_test2ecfm883902832.runPage(C:\ColdFusionCentaur\wwwroot\website\vfs_test.cfm:20) ram:///a/b/dynamic.cfm
	at coldfusion.vfs.VFSFileFactory.fetchOutputStream(
	at coldfusion.vfs.VFSFileFactory.getOutputStream(
	at cfvfs_test2ecfm883902832.runPage(C:\ColdFusionCentaur\wwwroot\website\vfs_test.cfm:20)
	at coldfusion.runtime.CfJspPage.invoke(
	at coldfusion.tagext.lang.IncludeTag.doStartTag(
	at coldfusion.filter.CfincludeFilter.invoke(
	at coldfusion.filter.ApplicationFilter.invoke(
	at coldfusion.filter.RequestMonitorFilter.invoke(
	at coldfusion.filter.MonitoringFilter.invoke(
	at coldfusion.filter.PathFilter.invoke(
	at coldfusion.filter.ExceptionFilter.invoke(
	at coldfusion.filter.BrowserDebugFilter.invoke(
	at coldfusion.filter.ClientScopePersistenceFilter.invoke(
	at coldfusion.filter.BrowserFilter.invoke(
	at coldfusion.filter.NoCacheFilter.invoke(
	at coldfusion.filter.GlobalsFilter.invoke(
	at coldfusion.filter.DatasourceFilter.invoke(
	at coldfusion.filter.CachingFilter.invoke(
	at coldfusion.CfmServlet.service(
	at coldfusion.bootstrap.BootstrapServlet.service(
	at jrun.servlet.FilterChain.doFilter(
	at coldfusion.monitor.event.MonitoringServletFilter.doFilter(
	at coldfusion.bootstrap.BootstrapFilter.doFilter(
	at jrun.servlet.FilterChain.doFilter(
	at jrun.servlet.FilterChain.service(
	at jrun.servlet.ServletInvoker.invoke(
	at jrun.servlet.JRunInvokerChain.invokeNext(
	at jrun.servlet.JRunRequestDispatcher.invoke(
	at jrun.servlet.ServletEngineService.dispatch(
	at jrun.servlet.http.WebService.invokeRunnable(
	at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(
	at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(
	at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(

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

Watson Bug ID:	3035890

External Customer Info:
External Company:  
External Customer Name: Alfred Bakia
External Customer Email: 4E2913DC4455DE13992016B6
External Test Config: 08/21/2008



I withdraw this submission. Therefore not a bug. Apparently, one has to first create the virtual directory ram:///a/b/ in memory before creating the file. It is so by design ( feedback from forum).
Vote by External U.
24790 | November 10, 2011 10:40:46 AM GMT