Solved

Using Railo trying to save to a file but I get the error that it is locked

Posted on 2014-11-16
4
237 Views
Last Modified: 2014-11-23
I have some code that updates a CSS file that my app is using . Using Coldfusion as my server I am able to write to the file. I also need by site to work with Railo but when I try to do the same thing I get the error:

C:\Railo\ver_421\webapps\ROOT\css\dynamic_styles.css (The requested operation cannot be performed on a file with a user-mapped section open)

I am writing to the file by doing the following:
<cffile action="write" file="#StylePath#dynamic_styles.css" output="#StyleText#" >
0
Comment
Question by:WestCoast_BC
  • 2
  • 2
4 Comments
 
LVL 52

Expert Comment

by:_agx_
ID: 40446479
(no points... I don't have a definitive answer)

A quick search suggests it *might* be a java bug on windows. I'd suggest asking on the Railo list. The guys that wrote it would know if it's a java issue and if there's a work around.
0
 

Accepted Solution

by:
WestCoast_BC earned 0 total points
ID: 40451682
I solved this by doing the following:

I set useFileMappedBuffer to false in my <jetty>/etc/webdefault.xml file.
0
 
LVL 52

Expert Comment

by:_agx_
ID: 40453340
Ah, so it is a MappedByteBuffer issue. Good to know.  Thanks for posting the answer!
0
 

Author Closing Comment

by:WestCoast_BC
ID: 40460456
This solved my problem
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CFGRID Custom Functionality Series -  Part 1 Hi Guys, I was once asked how it is possible to to add a hyperlink in the cfgrid and open the window to show the data. Now this is quite simple, I have to use the EXT JS library for this and I achiev…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question