Solved

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

Posted on 2014-11-16
4
228 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

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
Recently while working on a project I got a very annoying cfdocument has no body error message. I had never seen this error before. So I checked the code. The code was pretty simple; it was Just showing me the cfdocumnt tag and inside that tag a …
The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now