In coldfusion 10, I am getting the following ERROR: "An exception occurred while invoking an event handler method from Application.cfc. The method name is: onRequestStart. "
Rootcause:Detail: "If the component name is specified as a return type, it is possible that either a definition file for the component cannot be found or is not accessible. "
RootCause:Message: "The value returned from the init_pagedatetype_ver04 function is not of type gg2_pagedatetype_cfc_ver04. "
*Any Ideas what I am doing wrong? Here is the related files and related code *
FILE #1: "\application.cfc"
<cfset THIS.mappings["/inc_CFC"]= getDirectoryFromPath(getCurrentTemplatePath())
& "/inc_CFC" >
<cffunction name="onRequestStart">
<!--- INIT page structure --->
<cfset REQUEST.paths.msg= (getDirectoryFromPath(getCurrentTemplatePath())
& "inc_CFC") >
<cfset REQUEST.gg2_pageDataStruct= 0 >
<cfinvoke
returnvariable="REQUEST.gg2_pageDataStruct"
component="inc_CFC.gg2_pagedatatype_cfc_ver04"
method="init_pagedatetype_ver04"></cfinvoke>
. . .
</cffunction>
FILE #1: "\inc_CFC\gg2_pagedatatype_cfc_ver04.cfc"
<cfcomponent output="false"
displayname="gg2_pagedatetype_cfc_ver04"
hint="Component/Class/Module that manages all business Data " >
. . .
<cffunction name="init_pagedatetype_ver04"
returntype="gg2_pagedatetype_cfc_ver04" output="false" >
<cfset var LOCAL=StructNew()>
<!--- Do nothing but create blank object / component for now. Later on
user will call other functions to init parts of structure/component --->
<cfreturn THIS>
</cffunction>
. . .
</cfcomponent>
You simply have some misspellings take a look at these:
gg2_pagedatatype_cfc_ver04
gg2_pagedatetype_cfc_ver04
One says data
while the other says date
. Make sure that all of your names and types match correctly, and your error will go away.