Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Getting Started / May 2006



Tip: Looking for answers? Try searching our database.

Application.cfc problem that I can't figure out

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
stillwaiting - 27 May 2006 06:40 GMT
I have built an application.cfc for my application and am receiving the following error when I request a page.

--------------------------------------------
Error Occurred While Processing Request
5 >= 0

The error occurred in C:\CFusionMX7\wwwroot\cornerstone\mockup\Application.cfc: line 1

1 : <cfapplication name="cornerstone_user" applicationtimeout="#CreateTimeSpan(2,0,0,0)#" clientmanagement="yes" clientstorage="cookie"
loginstorage="cookie" sessionmanagement="yes" sessiontimeout="#CreateTimeSpan(0,0,30,0)#" setclientcookies="yes">
2 : <cffunction name="onError" returntype="void">
3 :     <cfargument name="Exception" required="true" />
--------------------------------------------

The stack trace gave this info that I thought might be helpful
--------------------------------------------
java.lang.ArrayIndexOutOfBoundsException: 5 >= 0
    at java.util.Vector.setElementAt(Unknown Source)
    at coldfusion.filter.FusionContext.SymTab_setClientScope(FusionContext.java:246)
--------------------------------------------

Any help would be appreciated.

stillwaiting
BKBK - 27 May 2006 17:32 GMT
<i><cfapplication name="cornerstone_user"
applicationtimeout="#CreateTimeSpan(2,0,0,0)#" clientmanagement="yes"
clientstorage="cookie" loginstorage="cookie" sessionmanagement="yes"
sessiontimeout="#CreateTimeSpan(0,0,30,0)#" setclientcookies="yes"></i>

That is the Application.cfm way. In the new framework, you'll have to do
something like the following and save it as Application.cfc:

<cfcomponent>
    <cfset This.name = "cornerstone_user">
    <cfset This.loginstorage="cookie">
<cfset This.clientstorage="cookie">
    <cfset This.sessionmanagement="True">
    <cfset This.sessiontimeout="#CreateTimeSpan(0,0,30,0)#">
    <cfset This.applicationTimeout="#CreateTimeSpan(2,0,0,0)#">
    <cfset This.setclientcookies="yes">
    <cfset This.clientmanagement="yes">
                <cffunction name="onApplicationStart" returntype="boolean">
<cfreturn true>
</cffunction>
<cffunction name="onSessionStart">
</cffunction>
<cffunction name="onError">
        <cfargument name="Exception" required=true />
           <cfargument name="EventName" type="String" required=true />
    </cffunction>  
...
etc
</cfcomponent>
stillwaiting - 31 May 2006 02:56 GMT
Could someone point me toward a resource on the ins and outs of the "new way"? The CF 7 help didn't talk about any of this.

stillwaiting

> <i><cfapplication name="cornerstone_user"
> applicationtimeout="#CreateTimeSpan(2,0,0,0)#" clientmanagement="yes"
[quoted text clipped - 25 lines]
>  etc
>  </cfcomponent>
BKBK - 31 May 2006 09:42 GMT
From the livedocs, a <a target=_blank class=ftalternatingbarlinklarge
href="http://livedocs.macromedia.com/coldfusion/7/htmldocs/00000692.htm">chapter
on Application.cfc</a> and <a target=_blank class=ftalternatingbarlinklarge
href="http://livedocs.macromedia.com/coldfusion/7/htmldocs/00001122.htm">a
worked out example of Application.cfc</a>.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.