Error using Coldspring DefaultXmlBeanFactory.cfc line 902

7 views
Skip to first unread message

Chuck Savage

unread,
Dec 4, 2009, 1:16:38 PM12/4/09
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?

Brian Kotek

unread,
Dec 4, 2009, 2:35:39 PM12/4/09
to coldspri...@googlegroups.com
I don't really follow what you're saying, it's like you jumped past any explanation here. What is expecting that "init" be the first element in the array of methods? I've never heard of anyone having any problem with the order that any methods are defined, and people have been using CS and CFCs with init() methods for years.

Brian


--

You received this message because you are subscribed to the Google Groups "ColdSpring-Users" group.
To post to this group, send email to coldspri...@googlegroups.com.
To unsubscribe from this group, send email to coldspring-use...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/coldspring-users?hl=en.



Dennis Clark

unread,
Dec 4, 2009, 3:03:55 PM12/4/09
to coldspri...@googlegroups.com
Oops, my bad, Sean only discussed how to fix it; he didn't actually provide the patch. It would be easy enough to implement though.

On Fri, Dec 4, 2009 at 3:02 PM, Dennis Clark <boom...@gmail.com> wrote:
This bug has been reported (with a fix offered) before:


It'd be nice to see this fixed in the official download of ColdSpring.

Dennis

Dennis Clark

unread,
Dec 4, 2009, 3:02:05 PM12/4/09
to coldspri...@googlegroups.com
This bug has been reported (with a fix offered) before:


It'd be nice to see this fixed in the official download of ColdSpring.

Dennis
On Fri, Dec 4, 2009 at 2:35 PM, Brian Kotek <bria...@gmail.com> wrote:

Chuck Savage

unread,
Dec 4, 2009, 4:53:06 PM12/4/09
to coldspri...@googlegroups.com
@Brian, Sorry for the abruptness of that.  I was trying to be brief without going on and on.

@Dennis, I ended up posting the fix on this thread: http://groups.google.com/group/coldspring-users/browse_frm/thread/a2dc8d9edf01e3a5 which you may have already seen.

I needed to get it to work.  It may not be the appropriate fix, since I don't know coldspring, but it works.

Chuck Savage

unread,
Dec 4, 2009, 4:56:33 PM12/4/09
to coldspri...@googlegroups.com
@Brian, I linked this in the other thread, but here is the original error and follow up discussion on the reactor groups.  http://groups.google.com/group/reactor-users/browse_frm/thread/50770e8ea6b88762
Reply all
Reply to author
Forward
0 new messages