Chuck Savage
unread,Dec 4, 2009, 1:16:38 PM12/4/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ColdSpring-Users
It really doesn't matter what CFC I'm calling, I've debugged it down
to that the function Init() is being called after the setBeanFactory
(), and thus since the beanInstance hasn't been initialized, it throws
an error that isn't caught.
Since it is looping through the list of members in the beanInstance,
and there is no guarantee that init will be first in the array.
I've created this try/catch block around line 902.
<cftry>
<cfset beanInstance.setBeanFactory(beanDef.getBeanFactory()) />
<cfcatch type="any">
<cfdump var="#beanInstance#" label="BEAN_INSTANCE" />
<cfdump var="#beanDef.getFactoryBean()#"
label="BEAN_DEF.GET_FACTORY_BEAN" />
<cfdump var="#functionIndex#" label="LOOP_INDEX" />
<cfdump var="#md.functions#" label="MD.FUNCTIONS ARRAY" />
<cfabort>
</cfcatch>
</cftry>
This shows where in the function array we're called at, and looking at
the array, we can see Init() is further down, and is never called.
What options do you suggest? Run the loop twice for each Init() check
and setBeanFactory() check? Or manually sort the array so that Init
is always first?