You are correct in theory, but unfortunately, CF doesn’t always behave.  I have seen the same error for the aforementioned reasons – especially in development, where files change all the time.  It seems that in certain circumstances, CF just doesn’t properly clean that cache out or files become locked, even when caching is disabled.  I think that under the hood, CF does something with compiled files/types to differentiate them – ie, they don’t just use the strict class name as the identifier.  That’s why the files in the cache all have numbers appended to them, and that’s how CF can have 3 different applications running with 3 different objects that have the same name.  I think that’s why it becomes a “type” error – I would be willing to bet that somewhere in that error stack, the actual java type name is quite different than what it is complaining that the CF type should be.

 

Roland

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brian Kotek
Sent: Wednesday, May 10, 2006 7:06 PM
To: [email protected]
Subject: Re: [CFCDev] CFC typing errors when there should be none?

 

Well locally I have trusted cache and save class files disabled. But even if they were enabled, then wouldn't it just do nothing (ie keep using the same version of the CFC it has in memory or written to disk)? That's not what's happening, it's generating an error saying a returned CFC is not of the specified type, but it IS of the specified type. It's the same file name in the same location on disk. I could understand it if CF simply didn't pick up the changes at all, but throwing an error about an invalid type when the type IS correct (the object can be dumped to confirm this) definitely seems odd.

Thanks,

Brian

On 5/10/06, Roland Collins <[EMAIL PROTECTED]> wrote:

Check the help docs for the info on the Trusted Cache and Save Class Files settings.  That's what's causing your error – basically, CF ignores updated files under some circumstances with those settings enabled.

 

Roland

 


From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]] On Behalf Of Brian Kotek
Sent: Wednesday, May 10, 2006 12:58 PM
To: [email protected]
Subject: Re: [CFCDev] CFC typing errors when there should be none?

 

Do we have any idea why this is happening though? If I have a CFC, and I update it in some way but it is still named the same thing and has the same path, why would CF suddenly not think it is the proper type any longer?

On 5/10/06, Peter J. Farrell <[EMAIL PROTECTED]> wrote:

Brian Kotek said the following on 5/10/2006 9:53 AM:
> Nope, no conflicting mappings (in fact sometimes no mapping at all,
> just a directory off the web root). The point is that everything was
> working fine, then I update the CFCs, then get an error about an
> invalid return type, then clear the template cache, and then
> everything works again.
As Chris Scott just said on the ColdSpring list, you have to careful of
the template caching.  If you're on production, you need to clear it
when you update your files (this is why you don't have it on when in
development).  It causes really strange things to happen if you don't.
Has Chris said "Massive Headaches"....

--
Peter J. Farrell - Maestro Publishing
Certified Adobe ColdFusion MX7 Developer
Member Team Mach-II and Team Fusion
--
Co-Host of the ColdFusion Weekly Podcast
The "Virtually Live" Call-In Show
http://www.coldfusionweekly.com






----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting ( www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting ( www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

Reply via email to