Title:
[ANeff] Bug for: restInitApplication("absolute path",..) null pointer in Application.cfc pseudo-constructor
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)
Created: 10/14/2012
Components: REST Services
Versions: 10.0
Failure Type: Incorrect w/Workaround
Found In Build/Fixed In Build: Final /
Priority/Frequency: Minor / Very few users will encounter
Locale/System: English / Win All
Vote Count: 0
restInitApplication("full absolute path",..) w/in Application.cfc's pseudo-constructor throws null pointer
Repro:
C:\inetpub\wwwroot\Application.cfc
----------------------------------
component {
THIS.name = "TestRest";
THIS.restSettings.skipCFCWithError = true;
restInitApplication("C:\inetpub\wwwroot", "RestTest");
//function onRequestStart() {restInitApplication("C:\inetpub\wwwroot", "RestTest"); return true;}
}
1) Create C:\inetpub\wwwroot\Application.cfc as per above
2) Browse to http://localhost and see exception (attached) and REST app is not registered in CF Admin
3) Comment out this line: restInitApplication("C:\inetpub\wwwroot", "RestTest");
4) Uncomment this line: function onRequestStart() {restInitApplication("C:\inetpub\wwwroot", "RestTest"); return true;}}
5) Browse to http://localhost and then see REST app is registered in CF Admin
RestInitApplication("full absolute path",..) should also work in the pseudo-constructor, or a better exception should be thrown. (ex: "RestInitApplication() is not allowed within Application.cfc's initialization code."). I only found this issue b/c I was testing REST. Most users will not run RestInitApplication() in Application.cfc's pseudo-constructor. Thus, I am fine w/ the current behavior - but the exception message should be helpful (not null pointer).
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3346117
External Customer Info:
External Company:
External Customer Name: itisdesign
External Customer Email:
Attachments:
- October 15, 2012 00:00:00: 1_20121014_RestInitApplicationThrowsNullPointer_Exception.txt
Comments: