This content has been marked as final. Show 4 replies
Update... The error displayed above was what was sent to the screen. I actually caught the exception using onError() in my Application.cfc and emailed it to me.
This is what I get:
java.security.AccessControlException: access denied (java.io.FilePermission C:\Coldfusion8\wwwroot\WEB-INF\cfclasses\cfindex2ecfm789153611.class read)
What does it mean?
could we see the code?
To recreate the error I've stripped my code down to the bare min and threw in a test folder with a new application name. There are 5 files.
The first time I run /test/redirect.cfm it works fine. If I update /test/pub/target.cfm, and browse to /test/redirect.cfm, I don't see the changes (CF didn't recompile /test/pub/target.cfm?).
If I update /test/redirect.cfm (maybe throw in a comment) and browse to it, it will throw the fileAccess error. If I browse to the /test/pub/target.cfm file, the page displays properly and now I can browse to /test/redirect.cfm again without error.
Now if I update /test/pub/target.cfm and browse to /text/redirect.cfm, I also get the error. Before I just wasn't getting the updated target page, but now it errors.
So that's how I recreated the error. Here's the real problem... After I get the redirect working (by running the target page manually) it will end up breaking again after an unknown amount of time (I usually find out it's broken the next morning).
P.S. - I've noticed the first time I get the error it ends in "write":
access denied (java.io.FilePermission C:\Coldfusion8\wwwroot\WEB-INF\cfclasses\cftarget2ecfm168784208.class write)
Subsequent errors end in "read":
access denied (java.io.FilePermission C:\Coldfusion8\wwwroot\WEB-INF\cfclasses\cftarget2ecfm168784208.class read)
The hosting company was able to resolve my issue. Turned out to be a permissions problem. Here's their response...
It was a permissions problem with the SandBox Security in ColdFusion. Basically ColdFusion needed to be able to write to certain directories and files, but didn't have access. Once I gave it access everything appeared to work correctly. The permissions were a little bit outside of the standard permissions, which is why it was not working initially.
From a previous message they mentioned the ColdFusion template cache folder:
I have added read, write, and delete access for C:\Coldfusion8\wwwroot\WEB-INF\cfclasses\ which should get rid of the errors you were seeing.