Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 264
  • Last Modified:

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

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
WestCoast_BC
Asked:
WestCoast_BC
  • 2
  • 2
1 Solution
 
_agx_Commented:
(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
 
WestCoast_BCAuthor Commented:
I solved this by doing the following:

I set useFileMappedBuffer to false in my <jetty>/etc/webdefault.xml file.
0
 
_agx_Commented:
Ah, so it is a MappedByteBuffer issue. Good to know.  Thanks for posting the answer!
0
 
WestCoast_BCAuthor Commented:
This solved my problem
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now