Solved

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

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
recordcount is coming as undefined in query 4 65
Setting Up Local Lan Web Server 1 64
Detailed steps to upload 6 51
Standalone trial or freeware to do SSL scan 4 30
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Sometimes databases have MILLIONS of records and we need a way to quickly query that table to return the results me need. Sure you could use CFQUERY but it takes too long when there are millions of records. That is why SOLR was invented. Please …
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…

792 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