Re: Application.cfc error
Hi Laura, I'm getting this same error. Did you manage to fix this error? Do you remember what the problem was and if so can you kindly share it with me? Regards, John I'm getting an odd error when I try to use Application.cfc instead of Application.cfm. I get the following error: 500 ROOT CAUSE: java.lang.NoClassDefFoundError: Could not initialize class coldfusion. xml.rpc.CFCServlet at coldfusion.cfc.CFCProxy.init(CFCProxy.java:71) at coldfusion.runtime.AppEventInvoker.init(AppEventInvoker. java:47) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter. java:148) ... Any idea what could be causing it? I get the same error no matter if there is code in the cfc or not. Could I have messed up something in my jvm.config file when I was trying to get the debugging set up? Any help is appreciated. Thanks, Laura ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318399 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 error
Are you sure your not clearing the cart outside of your application.cfc? -e On Mon, Nov 17, 2008 at 12:19 PM, Chad Gray [EMAIL PROTECTED] wrote: I don't understand what is happening. Anyone see something in my application.cfc that would cause this error? I can get rid of the error by reinitialing the application. I get this error every once in a while. It is like the application is not re-initialzing right and my application variables are lost when a user hits the web site and tries to use the application.cart variable. The application.page variable works fine. It display the pages etc. Error Info: Message: Element CART is undefined in a Java object of type class [Ljava.lang.String; referenced as Detail: Root Cause: Type: Expression Template: /act_addCartItem.cfm? Tag Context: Here is my application.cfc cfcomponent cfset this.name = testSite cfset this.sessionManagement = true cffunction name=onApplicationStart cfset application.dsn = datasource1 cfset application.page = createObject(component, com.testSite.pages) cfset application.cart = createObject(component, com.testSite.cart) cfreturn true /cffunction cffunction name=onRequestStart cfargument name=thePage type=string required=true cfif isdefined(URL.reinit) cfset onApplicationStart() / /cfif /cffunction cffunction name=onRequestEnd returnType=void output=false cfargument name=thePage type=string required=true cfset var cfid_local = cfset var cftoken_local = !--- if the user closes their browser, make sure all session variables get killed --- cfif isdefined(Cookie.CFID) and isdefined(Cookie.CFTOKEN) cfset cfid_local = cookie.cfid cfset cftoken_local = cookie.cftoken cfcookie name=CFID value=#cfid_local# cfcookie name=CFTOKEN value=#cftoken_local# /cfif /cffunction /cfcomponent ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315368 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 error
Could it be that the application is timing out? What sort of traffic does the site get? What is your application timeout set to? -- Josh -Original Message- From: Chad Gray [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2008 9:20 AM To: cf-talk Subject: application.cfc error I don't understand what is happening. Anyone see something in my application.cfc that would cause this error? I can get rid of the error by reinitialing the application. I get this error every once in a while. It is like the application is not re-initialzing right and my application variables are lost when a user hits the web site and tries to use the application.cart variable. The application.page variable works fine. It display the pages etc. Error Info: Message: Element CART is undefined in a Java object of type class [Ljava.lang.String; referenced as Detail: Root Cause: Type: Expression Template: /act_addCartItem.cfm? Tag Context: Here is my application.cfc cfcomponent cfset this.name = testSite cfset this.sessionManagement = true cffunction name=onApplicationStart cfset application.dsn = datasource1 cfset application.page = createObject(component, com.testSite.pages) cfset application.cart = createObject(component, com.testSite.cart) cfreturn true /cffunction cffunction name=onRequestStart cfargument name=thePage type=string required=true cfif isdefined(URL.reinit) cfset onApplicationStart() / /cfif /cffunction cffunction name=onRequestEnd returnType=void output=false cfargument name=thePage type=string required=true cfset var cfid_local = cfset var cftoken_local = !--- if the user closes their browser, make sure all session variables get killed --- cfif isdefined(Cookie.CFID) and isdefined(Cookie.CFTOKEN) cfset cfid_local = cookie.cfid cfset cftoken_local = cookie.cftoken cfcookie name=CFID value=#cfid_local# cfcookie name=CFTOKEN value=#cftoken_local# /cfif /cffunction /cfcomponent ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315369 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 error
Off hand I'm not sure what is causing it, but this may help cfif (isdefined(URL.reinit)) OR (NOT IsDefined(Application.Cart)) OR (NOT IsDefined(Application.Page)) cfset onApplicationStart() / /cfif =] -- Alan Rother Adobe Certified Advanced ColdFusion MX 7 Developer Manager, Phoenix Cold Fusion User Group, AZCFUG.org ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315370 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 error
Ya positive. There are only about 10 pages total in the web site. So I know for sure there is no code to kill the variable. -Original Message- From: Emmet McGovern [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2008 12:43 PM To: cf-talk Subject: Re: application.cfc error Are you sure your not clearing the cart outside of your application.cfc? -e On Mon, Nov 17, 2008 at 12:19 PM, Chad Gray [EMAIL PROTECTED] wrote: I don't understand what is happening. Anyone see something in my application.cfc that would cause this error? I can get rid of the error by reinitialing the application. I get this error every once in a while. It is like the application is not re-initialzing right and my application variables are lost when a user hits the web site and tries to use the application.cart variable. The application.page variable works fine. It display the pages etc. Error Info: Message: Element CART is undefined in a Java object of type class [Ljava.lang.String; referenced as Detail: Root Cause: Type: Expression Template: /act_addCartItem.cfm? Tag Context: Here is my application.cfc cfcomponent cfset this.name = testSite cfset this.sessionManagement = true cffunction name=onApplicationStart cfset application.dsn = datasource1 cfset application.page = createObject(component, com.testSite.pages) cfset application.cart = createObject(component, com.testSite.cart) cfreturn true /cffunction cffunction name=onRequestStart cfargument name=thePage type=string required=true cfif isdefined(URL.reinit) cfset onApplicationStart() / /cfif /cffunction cffunction name=onRequestEnd returnType=void output=false cfargument name=thePage type=string required=true cfset var cfid_local = cfset var cftoken_local = !--- if the user closes their browser, make sure all session variables get killed --- cfif isdefined(Cookie.CFID) and isdefined(Cookie.CFTOKEN) cfset cfid_local = cookie.cfid cfset cftoken_local = cookie.cftoken cfcookie name=CFID value=#cfid_local# cfcookie name=CFTOKEN value=#cftoken_local# /cfif /cffunction /cfcomponent ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315371 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: application.cfc error
Traffic is minimal. We are just testing the site now. So it will sit for many days before getting another user. I would guess the default timeout on the application since I am not defining one in the application.cfc. 2 days in the administrator. Shouldn't the application start back up after timing out? I will add that I noticed another application variable timing out (that I took out of the application.cfc). I use to have an application.adminEmail defined just below the application.cart. And when I had a onError function in the application.cfc when the onError function fired it would say that the application.adminEmail is not defined. So it is like only the first two application variables (dsn, page) was any good. The rest were un-defined. -Original Message- From: Josh Nathanson [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2008 12:59 PM To: cf-talk Subject: RE: application.cfc error Could it be that the application is timing out? What sort of traffic does the site get? What is your application timeout set to? -- Josh -Original Message- From: Chad Gray [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2008 9:20 AM To: cf-talk Subject: application.cfc error I don't understand what is happening. Anyone see something in my application.cfc that would cause this error? I can get rid of the error by reinitialing the application. I get this error every once in a while. It is like the application is not re-initialzing right and my application variables are lost when a user hits the web site and tries to use the application.cart variable. The application.page variable works fine. It display the pages etc. Error Info: Message: Element CART is undefined in a Java object of type class [Ljava.lang.String; referenced as Detail: Root Cause: Type: Expression Template: /act_addCartItem.cfm? Tag Context: Here is my application.cfc cfcomponent cfset this.name = testSite cfset this.sessionManagement = true cffunction name=onApplicationStart cfset application.dsn = datasource1 cfset application.page = createObject(component, com.testSite.pages) cfset application.cart = createObject(component, com.testSite.cart) cfreturn true /cffunction cffunction name=onRequestStart cfargument name=thePage type=string required=true cfif isdefined(URL.reinit) cfset onApplicationStart() / /cfif /cffunction cffunction name=onRequestEnd returnType=void output=false cfargument name=thePage type=string required=true cfset var cfid_local = cfset var cftoken_local = !--- if the user closes their browser, make sure all session variables get killed --- cfif isdefined(Cookie.CFID) and isdefined(Cookie.CFTOKEN) cfset cfid_local = cookie.cfid cfset cftoken_local = cookie.cftoken cfcookie name=CFID value=#cfid_local# cfcookie name=CFTOKEN value=#cftoken_local# /cfif /cffunction /cfcomponent ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315373 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: application.cfc error
Seems like kind of a hack eh'? It probably would work though. -Original Message- From: Alan Rother [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2008 1:20 PM To: cf-talk Subject: Re: application.cfc error Off hand I'm not sure what is causing it, but this may help cfif (isdefined(URL.reinit)) OR (NOT IsDefined(Application.Cart)) OR (NOT IsDefined(Application.Page)) cfset onApplicationStart() / /cfif =] -- Alan Rother Adobe Certified Advanced ColdFusion MX 7 Developer Manager, Phoenix Cold Fusion User Group, AZCFUG.org ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315374 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 error
Hey Chad, One more thing came to mind... Not knowing anything about your hosting setup this is a wild guess... But your Application scope could be getting corrupted by another site on the same server having the same Application name... cfset this.name = testSite As a practice, I try to make this value as unique as reasonable. cfset this.name = CustomerA1234_Build26_11142008 It's a theory anyhow... =] -- Alan Rother Adobe Certified Advanced ColdFusion MX 7 Developer Manager, Phoenix Cold Fusion User Group, AZCFUG.org ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315375 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: application.cfc error
Hmmm you know I did realize that there was another web site using the same application name. Could this cause my problems? -Original Message- From: Chad Gray [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2008 1:41 PM To: cf-talk Subject: RE: application.cfc error Traffic is minimal. We are just testing the site now. So it will sit for many days before getting another user. I would guess the default timeout on the application since I am not defining one in the application.cfc. 2 days in the administrator. Shouldn't the application start back up after timing out? I will add that I noticed another application variable timing out (that I took out of the application.cfc). I use to have an application.adminEmail defined just below the application.cart. And when I had a onError function in the application.cfc when the onError function fired it would say that the application.adminEmail is not defined. So it is like only the first two application variables (dsn, page) was any good. The rest were un-defined. -Original Message- From: Josh Nathanson [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2008 12:59 PM To: cf-talk Subject: RE: application.cfc error Could it be that the application is timing out? What sort of traffic does the site get? What is your application timeout set to? -- Josh -Original Message- From: Chad Gray [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2008 9:20 AM To: cf-talk Subject: application.cfc error I don't understand what is happening. Anyone see something in my application.cfc that would cause this error? I can get rid of the error by reinitialing the application. I get this error every once in a while. It is like the application is not re-initialzing right and my application variables are lost when a user hits the web site and tries to use the application.cart variable. The application.page variable works fine. It display the pages etc. Error Info: Message: Element CART is undefined in a Java object of type class [Ljava.lang.String; referenced as Detail: Root Cause: Type: Expression Template: /act_addCartItem.cfm? Tag Context: Here is my application.cfc cfcomponent cfset this.name = testSite cfset this.sessionManagement = true cffunction name=onApplicationStart cfset application.dsn = datasource1 cfset application.page = createObject(component, com.testSite.pages) cfset application.cart = createObject(component, com.testSite.cart) cfreturn true /cffunction cffunction name=onRequestStart cfargument name=thePage type=string required=true cfif isdefined(URL.reinit) cfset onApplicationStart() / /cfif /cffunction cffunction name=onRequestEnd returnType=void output=false cfargument name=thePage type=string required=true cfset var cfid_local = cfset var cftoken_local = !--- if the user closes their browser, make sure all session variables get killed --- cfif isdefined(Cookie.CFID) and isdefined(Cookie.CFTOKEN) cfset cfid_local = cookie.cfid cfset cftoken_local = cookie.cftoken cfcookie name=CFID value=#cfid_local# cfcookie name=CFTOKEN value=#cftoken_local# /cfif /cffunction /cfcomponent ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315376 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: application.cfc error
If this line ever errors on AppStart: cfset application.page = createObject(component, com.testSite.pages) The cart won't get created and the app will have started. Adrian Building a database of ColdFusion errors at http://cferror.org/ -Original Message- From: Chad Gray Sent: 17 November 2008 18:41 To: cf-talk Subject: RE: application.cfc error Seems like kind of a hack eh'? It probably would work though. -Original Message- From: Alan Rother Sent: Monday, November 17, 2008 1:20 PM To: cf-talk Subject: Re: application.cfc error Off hand I'm not sure what is causing it, but this may help cfif (isdefined(URL.reinit)) OR (NOT IsDefined(Application.Cart)) OR (NOT IsDefined(Application.Page)) cfset onApplicationStart() / /cfif =] -- Alan Rother ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315377 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 error
Hmmm you know I did realize that there was another web site using the same application name. Could this cause my problems? YES -- Alan Rother Adobe Certified Advanced ColdFusion MX 7 Developer Manager, Phoenix Cold Fusion User Group, AZCFUG.org ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315378 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: application.cfc error
Use the following code to prevent issues with running multiple applications with the same name on a single server. this.name = constants.siteName { hash(getCurrentTemplatePath()) } (If I remembered where I first saw this, I would give proper credit.) Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315380 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: application.cfc error
I bet this is the problem! I just looked at the other application.cfc on the web server and it is defining the same application name and only defining the first two application variables! cffunction name=onApplicationStart returnType=boolean output=false cfset application.dsn = datasource1 cfset application.page = createObject(component, com.testSite.pages) cfreturn true /cffunction Right? So now say someone hits testSite1 and it runs the above application. Now someone hits testSite2 and CF says Hey this application is already running, but not all of my applications variables are defined for testSite2. This is where I am getting my error! -Original Message- From: Chad Gray [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2008 1:42 PM To: cf-talk Subject: RE: application.cfc error Hmmm you know I did realize that there was another web site using the same application name. Could this cause my problems? -Original Message- From: Chad Gray [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2008 1:41 PM To: cf-talk Subject: RE: application.cfc error Traffic is minimal. We are just testing the site now. So it will sit for many days before getting another user. I would guess the default timeout on the application since I am not defining one in the application.cfc. 2 days in the administrator. Shouldn't the application start back up after timing out? I will add that I noticed another application variable timing out (that I took out of the application.cfc). I use to have an application.adminEmail defined just below the application.cart. And when I had a onError function in the application.cfc when the onError function fired it would say that the application.adminEmail is not defined. So it is like only the first two application variables (dsn, page) was any good. The rest were un-defined. -Original Message- From: Josh Nathanson [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2008 12:59 PM To: cf-talk Subject: RE: application.cfc error Could it be that the application is timing out? What sort of traffic does the site get? What is your application timeout set to? -- Josh -Original Message- From: Chad Gray [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2008 9:20 AM To: cf-talk Subject: application.cfc error I don't understand what is happening. Anyone see something in my application.cfc that would cause this error? I can get rid of the error by reinitialing the application. I get this error every once in a while. It is like the application is not re-initialzing right and my application variables are lost when a user hits the web site and tries to use the application.cart variable. The application.page variable works fine. It display the pages etc. Error Info: Message: Element CART is undefined in a Java object of type class [Ljava.lang.String; referenced as Detail: Root Cause: Type: Expression Template: /act_addCartItem.cfm? Tag Context: Here is my application.cfc cfcomponent cfset this.name = testSite cfset this.sessionManagement = true cffunction name=onApplicationStart cfset application.dsn = datasource1 cfset application.page = createObject(component, com.testSite.pages) cfset application.cart = createObject(component, com.testSite.cart) cfreturn true /cffunction cffunction name=onRequestStart cfargument name=thePage type=string required=true cfif isdefined(URL.reinit) cfset onApplicationStart() / /cfif /cffunction cffunction name=onRequestEnd returnType=void output=false cfargument name=thePage type=string required=true cfset var cfid_local = cfset var cftoken_local = !--- if the user closes their browser, make sure all session variables get killed --- cfif isdefined(Cookie.CFID) and isdefined(Cookie.CFTOKEN) cfset cfid_local = cookie.cfid cfset cftoken_local = cookie.cftoken cfcookie name=CFID value=#cfid_local# cfcookie name=CFTOKEN value=#cftoken_local# /cfif /cffunction /cfcomponent ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315379 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm