Title:
[ANeff] Bug for: Clear Template Cache breaks restInitApplication()+mapping in onApplicationStart() until CFC is re-saved
| View in TrackerStatus/Resolution/Reason: Closed/Withdrawn/Duplicate
Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)
Created: 11/27/2014
Components: REST Services
Versions: 11.0
Failure Type:
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Major / Some users will encounter
Locale/System: ALL / Platforms All
Vote Count: 0
Duplicate ID: CF-3850183
Clear Template Cache breaks restInitApplication()+mapping in onApplicationStart() until CFC is re-saved. (Not same as #3850183)
Repro:
Application.cfc
---------------------
component {
THIS.name = "MyApp";
THIS.mappings['/mymapping'] = expandPath("./");
public void function onApplicationStart() {
restInitApplication(expandPath("/mymapping"), "foo", {useHOST=true});
}
public boolean function onRequestStart() {
if(structKeyExists(URL, "reinit")) {
applicationStop();
location(url="index.cfm");
}
return true;
}
}
R.cfc
--------
component restpath="{a}" {remote string function abc() httpmethod="GET" {return "b";}}
1) go to http://www.domain.com/?reinit
2) go to http://www.domain.com/rest/foo/bar
3) see "b"
4) in CF Admin, Clear Template Cache
5) go to http://www.domain.com/rest/foo/bar and see error "HTTP Error 500.0 - The CFC [..Path to CFC..]\R.cfc is modified and the application is not refreshed."
6) repeat #1
7) see error "An error occurred while resolving the CFC: [..Path to CFC..]/R.cfc. Ensure that there are no compilation errors with the REST-enabled CFC."
8) repeat #2
9) see error "HTTP Error 500.0 - Application foo could not be found."
10) in CF Admin, click the Refresh icon for the REST service
11) see error
----------------------
Unable to refresh REST service.
An error occurred while resolving the CFC: [..Path to CFC..]\R.cfc. Ensure that there are no compilation errors with the REST-enabled CFC.
Could not find the ColdFusion component or interface [..Path to CFC..].R.
Ensure that the name is correct and that the component or interface exists.
----------------------
12) In R.cfc, add a space, then delete the space, then re-save
13) repeat #10
14) repeat #2
15) see error
----------------------
<STRUCT ID="1">
<ENTRY NAME="Message" TYPE="STRING">Nested REST service can not be registered.</ENTRY>
</STRUCT>
----------------------
16) repeat #1
17) repeat #2
18) see "b"
Restarting CF also resolves the issue. Hopefully the resolution for #3850183 also resolves this issue.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3858959
External Customer Info:
External Company:
External Customer Name: itisdesign
External Customer Email:
Attachments:
Comments: