Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Jared Rypka-Hauer / Jared Rypka-Hauer (Jared Rypka-Hauer)
Created: 10/20/2009
Components: Language, CFSCRIPT
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 / 261704
Priority/Frequency: Minor / Some users will encounter
Locale/System: English / Platforms All
Vote Count: 0
Problem:
check out the following code samples. when the onrequeststart() fires the writeDump() call, the previously mentioned error comes up. even if the error is in the right, the error text is horrendous and needs to display something useful to the user.
Method:
[vmannebo 12/11/2009] Short repro case:
component output="false"
{
function onRequestStart(string thePage)
{
writeDump(application);
/*
writelog("----start----");
keys = structkeyarray(application);
for(i=1;i <= arraylen(keys); i++)
{
try
{
writelog(keys[i] & " - " & application[keys[i]]);
}
catch(any e)
{
writelog("ERROR:: " & keys[i] );
}
}
writelog("----end----");
*/
}
}
Application.cfc:component output="false" {this["appConfig"] = expandPath("./appconfig.json.cfm");//this["name"] = "AppCfcTest";// this.datasource ="MavResource";// this.applicationTimeout="";// this.clientManagement="";// this.clientStorage="";// this.customTagPaths={};// this.loginStorage="";// this.mappings={};// this.sessionManagement="";// this.sessionTimeout="";// this.setClientCookies="";// this.setDomainCookies="";// this.scriptProtect="";// this.secureJSON="";// this.secureJSONPrefix="";// this.welcomeFileList="";// this.smtpServer={};// this.timeout="";// this.debugIpAddress="";// this.enableRobustException="";function onApplicationStart() {var i = 1;var elem = 0;if (findNoCase(this.appConfig,"json")) {local.config = deserializeJSON(fileRead(this.appConfig),true);for (local.i in config) {if (isSimpleValue(config[i]) && len(config[i]) GT 0) {this[i] = config[i];} else if (! isSimpleValue(config[i])) {this["mappings"] = config.mappings;this["customTagPaths"] = config.customTagPaths;}}} else if (findNoCase(this.appConfig,"xml")) {local.config = xmlParse(this.appConfig);while (i <= arrayLen(config.xmlRoot.xmlChildren)) {elem = config.xmlRoot.xmlChildren[i];if (NOT structKeyExists(elem.xmlAttributes,"type")) {elem.xmlAttributes["type"] = "string";}switch (elem.xmlAttributes["type"]) {case "string":this[elem.xmlAttributes.name] = elem.xmlAttributes.value; break;case "array":// convert contents to arraybreak;case "struct":// convert contents to structbreak;}writeDump(config.xmlRoot.xmlChildren[i]);i++;}}/*application.inited = true;writeDump(this);// writeDump(application);writeDump(config);abort;*/}function onRequestStart(string thePage) {if (structKeyExists(url,"init")) onApplicationStart();writeDump(application);abort;}function onSessionStart() {}/*function onApplicationEnd(struct applicationScope) {}function onSessionEnd(struct sessionScope, struct appScope) {function onRequest(string thePage) {}function onRequestEnd(string thePage) {}function onMissingTemplate(string thePage) {}function onError(struct exception, string eventName) {writeDump(exception );abort;}*/}appconfig.json.cfm:{"name": "TestAndDevApplication","datasource": "MavResource","applicationTimeout": "","clientManagement": "","clientStorage": "","loginStorage": "","sessionManagement": "","sessionTimeout": "","setClientCookies": "","setDomainCookies": "","scriptProtect": "","secureJSON": "","secureJSONPrefix": "","welcomeFileList": "","smtpServer": {},"timeout": "","debugIpAddress": "","enableRobustException": "","customTagPaths": ["\/Applications\/JRun4\/servers\/cfusion9\/cfusion.ear\/cfusion.war\/CentaurTests\/appcfc\/tags","\/Applications\/JRun4\/servers\/cfusion9\/cfusion.ear\/cfusion.war\/CentaurTests\/shared\/tags"],"mappings": {"/coldspring": "\/Applications\/JRun4\/servers\/cfusion9\/cfusion.ear\/cfusion.war\/CentaurTests\/shared\/frameworks\/ColdSpring","/modelglue": "\/Applications\/JRun4\/servers\/cfusion9\/cfusion.ear\/cfusion.war\/CentaurTests\/shared\/frameworks\/ModelGlue","/FirstComp": "\/Applications\/JRun4\/servers\/cfusion9\/cfusion.ear\/cfusion.war\/CentaurTests\/appcfc\/"}}
Result:
writeDump(application) when the application scope is missing yields the following error:Parameter 1 of function IsDefined, which is now var.coldfusion.jsp.taglibinfo./Applications/JRun4/servers/cfusion9/cfusion.ear/cfusion.war/WEB-INF/exception../.., must be a syntactically valid variable name.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3040328
External Customer Info:
External Company:
External Customer Name: Jared Rypka-Hauer
External Customer Email: 08C411A143BC38A7992016B6
External Test Config: 10/20/2009
Attachments:
Comments: