application.cfc problems
I am new to application.cfc and I am running into problems trying to use the onError function. I think I have narrowed it down to a cfabort in my onRequestStart function. I use it to log in users to the web site. If they don't have a session.UserName defined then I kick them to a login page and abort the rest of the processing. Can I put an abort in the application.cfc? cffunction name=onRequestStart cfparam name=session.UserName default= !--- process login --- cfif IsDefined(Form.UserLoggingIn) cfinclude template=act_login.cfm /cfif !--- if not logged in then goto Login Form --- cfif session.UserName eq cfinclude template=dsp_login.cfm cfabort / /cfif /cffunction cffunction name=onError cfargument name=Exception required=true/ cfargument type=String name=EventName required=true/ cfmail to=[EMAIL PROTECTED] from=[EMAIL PROTECTED] subject=Error type=html cfdump var=#arguments.exception# /cfmail /cffunction ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267135 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: application.cfc problems
I am new to application.cfc and I am running into problems trying to use the onError function. I think I have narrowed it down to a cfabort in my onRequestStart function. Read this: http://ray.camdenfamily.com/index.cfm?mode=entryentry=ED9D4058-E661-02E9-E70A41706CD89724 That might solve your problem. Will ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267146 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
application.cfc problems fixed now i hit my real error
Thanks Will, that did solve one of my problems. But now I am running into my original problem that I was trying to figure out by simplifying my onError function. On one of my pages when the user is adding a new record I do a pop up window so they can enter the new records information. When they hit submit the page submits to an action page that run this javascript to refresh the parent window and closes the pop up window. script language=javascript opener.location.reload(); self.close(); /script When the parent window refreshes the onError function in the application.cfc fires and I get an email with this dump: http://chadgray.info/misc/cferror.jpg Now see how it is staring to display the data on the page then errors. It does not always stop at this location. Next time I add a new record it will stop further down the page or higher up. Now on this page that errors I am using some XML that is stored in a session variable to decide if I show the column of data or not. table cellspacing=0 cellpadding=0 class=elementList tr thnbsp;/th cfif session.prefs.preferences.elementView.JID.XMLAttributes.view thJID/th/cfif cfif session.prefs.preferences.elementView.SKU.XMLAttributes.view thSKU/th/cfif ... etc... I think the cfifs on my session XML is what is causing the crash. In the stack trace there is mentioning of XML. I don't know why though If I hit refresh the page works fine. It only does it when I do my add new record as I described above. If I take the onError function out of my Application.cfc then I never hit the error. The page works fine. Is there any way to submit this to Adobe so they can tell me if this is a bug in CF or my programming skills or lack there of. :) ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267157 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
WAS application.cfc problems NOW xml problems
Well I have narrowed it down some more. I took out the onError function so the standard CF errors would be displayed. After a few tries I finally got the error to occur. So it is not an application.cfc problem, but an XML parsing problem. Here is the error: http://chadgray.info/misc/cfError2.jpg It is like a performance problem. If I hit the pages hard and really press the server the more often I run into this error. The error does not always occur in the same place on the page. The XML data that the CF server is saying is null really is there and here it is: ?xml version=1.0 encoding=UTF-8? preferences elementView JID view=false/ history view=false/ SKU view=false/ ElementDescription view=true/ ElementType view=true/ page view=true/ TypeOfShot view=true/ SimpleORAdvanced view=false/ Props view=false/ OutlineType view=false/ notes view=false/ careyNotes view=false/ Round view=false/ ElementStatus view=true/ ElementStatusDate view=false/ /elementView pageView PageName view=true/ JID view=true/ Round view=true/ history view=false/ PageStatus view=true/ PageStatusDate view=true/ Notes view=true/ careyNotes view=true/ /pageView /preferences I setup a test site and stripped my programming WAY down... no CSS only display data and use the XML. I cannot get the error to occur. Should I not store my XML as a session variable? Is there a better way of parsing the XML then this: cfif session.prefs.preferences.elementView.ElementStatus.XMLAttributes.view EQ true Chad -Original Message- From: Chad Gray [mailto:[EMAIL PROTECTED] Sent: Monday, January 22, 2007 12:11 PM To: CF-Talk Subject: application.cfc problems fixed now i hit my real error Thanks Will, that did solve one of my problems. But now I am running into my original problem that I was trying to figure out by simplifying my onError function. On one of my pages when the user is adding a new record I do a pop up window so they can enter the new records information. When they hit submit the page submits to an action page that run this javascript to refresh the parent window and closes the pop up window. script language=javascript opener.location.reload(); self.close(); /script When the parent window refreshes the onError function in the application.cfc fires and I get an email with this dump: http://chadgray.info/misc/cferror.jpg Now see how it is staring to display the data on the page then errors. It does not always stop at this location. Next time I add a new record it will stop further down the page or higher up. Now on this page that errors I am using some XML that is stored in a session variable to decide if I show the column of data or not. table cellspacing=0 cellpadding=0 class=elementList tr thnbsp;/th cfif session.prefs.preferences.elementView.JID.XMLAttributes.view thJID/th/cfif cfif session.prefs.preferences.elementView.SKU.XMLAttributes.view thSKU/th/cfif etc... I think the cfifs on my session XML is what is causing the crash. In the stack trace there is mentioning of XML. I don't know why though If I hit refresh the page works fine. It only does it when I do my add new record as I described above. If I take the onError function out of my Application.cfc then I never hit the error. The page works fine. Is there any way to submit this to Adobe so they can tell me if this is a bug in CF or my programming skills or lack there of. :) ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267210 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: WAS application.cfc problems NOW xml problems
I just refreshed the page lots of times and I get the error to occur. If I refresh the page once every 5 seconds I don't get the error. The data is not changing... all I am doing is refreshing the page and my XML commands are dying a miserable death. I even tried this on my stripped down code version and if I refresh the page fast enough it crashes also. Here are the three errors I have seen so far I used cfdump var=#arguments.exception#. http://chadgray.info/misc/cferror.htm -Original Message- From: Chad Gray [mailto:[EMAIL PROTECTED] Sent: Monday, January 22, 2007 4:17 PM To: CF-Talk Subject: WAS application.cfc problems NOW xml problems Well I have narrowed it down some more. I took out the onError function so the standard CF errors would be displayed. After a few tries I finally got the error to occur. So it is not an application.cfc problem, but an XML parsing problem. Here is the error: http://chadgray.info/misc/cfError2.jpg It is like a performance problem. If I hit the pages hard and really press the server the more often I run into this error. The error does not always occur in the same place on the page. The XML data that the CF server is saying is null really is there and here it is: ?xml version=1.0 encoding=UTF-8? preferences elementView JID view=false/ history view=false/ SKU view=false/ ElementDescription view=true/ ElementType view=true/ page view=true/ TypeOfShot view=true/ SimpleORAdvanced view=false/ Props view=false/ OutlineType view=false/ notes view=false/ careyNotes view=false/ Round view=false/ ElementStatus view=true/ ElementStatusDate view=false/ /elementView pageView PageName view=true/ JID view=true/ Round view=true/ history view=false/ PageStatus view=true/ PageStatusDate view=true/ Notes view=true/ careyNotes view=true/ /pageView /preferences I setup a test site and stripped my programming WAY down... no CSS only display data and use the XML. I cannot get the error to occur. Should I not store my XML as a session variable? Is there a better way of parsing the XML then this: cfif session.prefs.preferences.elementView.ElementStatus.XMLAttributes.view EQ true Chad -Original Message- From: Chad Gray [mailto:[EMAIL PROTECTED] Sent: Monday, January 22, 2007 12:11 PM To: CF-Talk Subject: application.cfc problems fixed now i hit my real error Thanks Will, that did solve one of my problems. But now I am running into my original problem that I was trying to figure out by simplifying my onError function. On one of my pages when the user is adding a new record I do a pop up window so they can enter the new records information. When they hit submit the page submits to an action page that run this javascript to refresh the parent window and closes the pop up window. script language=javascript opener.location.reload(); self.close(); /script When the parent window refreshes the onError function in the application.cfc fires and I get an email with this dump: http://chadgray.info/misc/cferror.jpg Now see how it is staring to display the data on the page then errors. It does not always stop at this location. Next time I add a new record it will stop further down the page or higher up. Now on this page that errors I am using some XML that is stored in a session variable to decide if I show the column of data or not. table cellspacing=0 cellpadding=0 class=elementList tr thnbsp;/th cfif session.prefs.preferences.elementView.JID.XMLAttributes.view thJID/th/cfif cfif session.prefs.preferences.elementView.SKU.XMLAttributes.view thSKU/th/cfif . etc... I think the cfifs on my session XML is what is causing the crash. In the stack trace there is mentioning of XML. I don't know why though If I hit refresh the page works fine. It only does it when I do my add new record as I described above. If I take the onError function out of my Application.cfc then I never hit the error. The page works fine. Is there any way to submit this to Adobe so they can tell me if this is a bug in CF or my programming skills or lack there of. :) ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267219 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: WAS application.cfc problems NOW xml problems
Show us how and when the XML is stored in the session scope; it sounds like a race condition. On 1/23/07, Chad Gray [EMAIL PROTECTED] wrote: Well I have narrowed it down some more. I took out the onError function so the standard CF errors would be displayed. After a few tries I finally got the error to occur. So it is not an application.cfc problem, but an XML parsing problem. Here is the error: http://chadgray.info/misc/cfError2.jpg It is like a performance problem. If I hit the pages hard and really press the server the more often I run into this error. The error does not always occur in the same place on the page. The XML data that the CF server is saying is null really is there and here it is: ?xml version=1.0 encoding=UTF-8? preferences elementView JID view=false/ history view=false/ SKU view=false/ ElementDescription view=true/ ElementType view=true/ page view=true/ TypeOfShot view=true/ SimpleORAdvanced view=false/ Props view=false/ OutlineType view=false/ notes view=false/ careyNotes view=false/ Round view=false/ ElementStatus view=true/ ElementStatusDate view=false/ /elementView pageView PageName view=true/ JID view=true/ Round view=true/ history view=false/ PageStatus view=true/ PageStatusDate view=true/ Notes view=true/ careyNotes view=true/ /pageView /preferences I setup a test site and stripped my programming WAY down... no CSS only display data and use the XML. I cannot get the error to occur. Should I not store my XML as a session variable? Is there a better way of parsing the XML then this: cfif session.prefs.preferences.elementView.ElementStatus.XMLAttributes.view EQ true Chad -Original Message- From: Chad Gray [mailto:[EMAIL PROTECTED] Sent: Monday, January 22, 2007 12:11 PM To: CF-Talk Subject: application.cfc problems fixed now i hit my real error Thanks Will, that did solve one of my problems. But now I am running into my original problem that I was trying to figure out by simplifying my onError function. On one of my pages when the user is adding a new record I do a pop up window so they can enter the new records information. When they hit submit the page submits to an action page that run this javascript to refresh the parent window and closes the pop up window. script language=javascript opener.location.reload(); self.close(); /script When the parent window refreshes the onError function in the application.cfc fires and I get an email with this dump: http://chadgray.info/misc/cferror.jpg Now see how it is staring to display the data on the page then errors. It does not always stop at this location. Next time I add a new record it will stop further down the page or higher up. Now on this page that errors I am using some XML that is stored in a session variable to decide if I show the column of data or not. table cellspacing=0 cellpadding=0 class=elementList tr thnbsp;/th cfif session.prefs.preferences.elementView.JID.XMLAttributes.view thJID/th/cfif cfif session.prefs.preferences.elementView.SKU.XMLAttributes.view thSKU/th/cfif etc... I think the cfifs on my session XML is what is causing the crash. In the stack trace there is mentioning of XML. I don't know why though If I hit refresh the page works fine. It only does it when I do my add new record as I described above. If I take the onError function out of my Application.cfc then I never hit the error. The page works fine. Is there any way to submit this to Adobe so they can tell me if this is a bug in CF or my programming skills or lack there of. :) ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267231 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4