Skip to main content
July 21, 2009
Question

CF9: How to force recompile?

  • July 21, 2009
  • 2 replies
  • 2183 views

I have an odd problem with CF9. Code sometimes runs, sometimes errors out when initializing an app.

When the app starts, several objects get created and their init routines invoked. Suddenly and inexplicably, I started getting this error:

"The OEMAIL argument passed to the init function is not of type  console.objects.Email"

Line xx8: <cfset oTasks.init(cDSN, oEmail)>
Line xx9: <cfset oRedirect.init(cDSN,oEmail, oLib)>

But the error comes from line xx9, not line xx8. In fact, oEmail gets passed to several init routines before CF complains about it on Line xx9. This is all code that has worked for months with CF8 and since July 14th with CF9.

First I tried deleting all C:\ColdFusion9\wwwroot\WEB-INF\cfclasses\cfEmail.*.class files. Same error. Then I made a white space change  in email.cfc and saved it. No more error on Line xx9, but now I got a similar error with another object. I had to make white space changes to about 5 of them, and finally no more error messages.

Is there some way, besides touching all these cfc files, that CF can be forced to recompile them to hopefully eliminate these erroneous error messages?

    This topic has been closed for replies.

    2 replies

    BKBK
    Community Expert
    Community Expert
    July 31, 2009

    "The OEMAIL argument passed to the init function is not of type  console.objects.Email"

    Line xx8: <cfset oTasks.init(cDSN, oEmail)>
    Line xx9: <cfset oRedirect.init(cDSN,oEmail, oLib)>

    But the error comes from line xx9, not line xx8. In fact, oEmail gets passed to several init routines before CF complains about it on Line xx9.

    Are oTasks and oRedirect both instances of the same component? The different signatures for init suggest not. One takes two arguments, the other three.

    I don't think Coldfusion supports this kind of function overloading. Could we see code for the email component?

    How do you define the parameter oEmail? Is it an instance of the component console.objects.Email? That is, do you create oEmail like this,

    <cfset oEmail=createobject("component","console.objects.Email") >?

    Coldfusion seems to think you don't.

    August 1, 2009

    oTasks and oRedirect are different components.

    Yes, creating oEmail exactly like this <cfset oEmail=createobject("component","console.objects.Email") >, and oEmailCopy similarly.

    July 24, 2009

    Not sure what's happening with the error but to clear the cache I believe what you will want to do is to uncheck " " in cfadmin under caching.  In the same area you can clear the component and template cache.  I suppose you could try setting the "Maximum number of cached templates" to 0 and then clear the cache and keep it that way for testing.  Expect very slow performance of course.

    Another thing to be warry of are the effects of proxy servers.  I have seen some odd behavior due to proxy servers caching what should have been totally dynamic templates.  In the past it happened when I used SEO Friendly URL's and there was nothing unique to the URL and no query string.

    -Joe

    July 28, 2009

    I tried unchecking everything having to do with caching, but I'm still having the same problem. In fact I can't get the app to run. I tried rechecking them too, to no avail.

    Might re-installing CF9 help in a case like this?

    July 28, 2009

    If you have a second system with the developers edition of CF8 or CF9 beta on it you might just want to post your code to it and see if the same thing happens.  If it does then yes reinstalling would be an option.

    -Joe