Skip navigation
Currently Being Moderated

CF 9.0.1 CHF3 breaks CFCs

Feb 28, 2013 7:16 AM

Tags: #cf9 #chf3

Can anyone confirm my bug https://bugbase.adobe.com/index.cfm?event=bug&id=3508592 ?

 

It looks like valid syntax like :

 

  variables.incomingGateway.updateWhere(fields={'campaignId'=arguments. newCampaignId},where={'id'=arguments.incomingId});

 

is causing the CFScript parser to explode...

 

Tom

 
Replies
  • Currently Being Moderated
    Feb 28, 2013 7:25 AM   in reply to ChivertonT

    The CFCs referenced in the bug report do not seem to be attached there. Can you share them please?

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 28, 2013 9:22 AM   in reply to ChivertonT

    The "repro case" relies on code you don't include, plus the CFM file never actually calls the method in the CFC, so it's not a real repro case. All it tests is that chf3.cfml compiles, which it does.

     

    Can you pls repost one that is stand-alone, and pare it back to get rid of any unnecessary cruft (like calls to other CFCs, irrelevant functions, etc).

     

    From what you've posted, given the you're never actually calling the method, I don't see how one can ever get an error saying you're not passing in an argument, and there's no proof here that you're simply not passing in the argument correctly.

     

    FWIW, I completed the repro case above with mocked CFCs and modified the call to actually run the method, and it all worked fine for me under 9.0.2 and 9.0.2+CHF1. Given 9.0.2 was just 9.0.1 with Verity removed and CHF1+2 rolled in, I am assuming I'm doing a like-for-like test here.

     

    Here is my modified code:

     

    <!--- chf3.cfm --->

    <cfscript>

    obj=createObject('chf3');

    obj.moveToNewCampaign(incomingId=1, newCampaignId=2, userId=3);

    </cfscript>

     

    // added these lines to chf3.cfc:


    variables.incomingGateway = new MockedIncomingGateway();

    variables.logFileGateway = new MockedLogFileGateway();

     

    // MockedIncomingGateway.cfc

    component {

     

     

              array function where(){

                        return [{getCampaignId=getCampaignId}];

              }

     

     

              void function updateWhere(){

     

              }

     

              numeric function getCampaignId(){

                        return 42;

              }

    }

     

    // MockedLogFileGateway.cfc

    component {

     

     

              void function logForCurrentUser(){

     

              }

     

     

    }

     

    I dunno if those are adequate for the purposes of completing the repro case though.

     

    --

    Adam

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 28, 2013 11:09 AM   in reply to ChivertonT

    We are not using cfscript but are getting errors stating that the called method doesn't exist in the cfc.  I then go to the CFC, a white space to change the file, save it and then can enter the web site. 

     

    From exception log

     

    "Error","jrpp-46","02/28/13","13:42:17","cxdev","coldfusion.runtime.Ca st._double(J)D The specific sequence of files included or processed is: C:\inetpub\wwwroot\mysite\index.cfm, line: 2328 "

    java.lang.NoSuchMethodError: coldfusion.runtime.Cast._double(J)D

        at cfsolrSearch2ecfc565148095$funcGETLASTSEARCHESBYDAYS.runFunction(C:\i netpub\wwwroot\mysite\COM\solrSearch.cfc:2328)

     

    That method exists in the cfc and as stated above, after adding a line in the cfc file, the user can login.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 1, 2013 3:19 AM   in reply to ChivertonT

    Tom, I know you know your stuff, but I suspect you are mistaken. That's a runtime error you're seeing, which means the code needs to be run for it to error. The code that is yielding the error is in moveToNewCampaign() which means for it to error you need to run moveToNewCampaign(). Which your repro case is not doing.

     

    Simply creating the object instance will not cause that error, because the erroring code would not be being executed.

     

    If it was a parser error, it would not be saying "Element NEWCAMPAIGNID is undefined in ARGUMENTS" because that sort of thing is only checked at runtime.

     

    What's the full error message, including stack trace and tag context?

     

    --

    Adam

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 1, 2013 4:27 AM   in reply to ChivertonT

    Well we'll just have to see if anyone else can repro it. I couldn't. And I will remain sceptical that you're assessing the problem correctly until such time as someone else can see it :-(

     

    --
    Adam

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 1, 2013 8:56 AM   in reply to ChivertonT

    We, at Adobe, are able to observe the issue. We are working on fixing this.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 8, 2013 8:48 AM   in reply to ChivertonT

    Strangely enough I was able to reproduce on a CF8/Win box (as well as a CF9.0.2/Linux box).  I determined it only happened when I had functions that had optional args without default values (though still a mystery why it's even evaluating those methods at instantiation time in the first place).  As a "fix" I added default values and it works a charm now.  Problem is, that is a hack and not a fix.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points