Skip to main content
Inspiring
Feb 28, 2013 3:16 PM UTC
Question

CF 9.0.1 CHF3 breaks CFCs

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

This topic is closed to new replies. Start a new post to keep the conversation going.

13 replies

Feb 28, 2013 7:09 PM UTC

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.Cast._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:\inetpub\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.

Translate
Inspiring
Feb 28, 2013 5:22 PM UTC

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

Translate
Inspiring
Feb 28, 2013 3:25 PM UTC

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

Translate
Inspiring
Mar 1, 2013 8:47 AM UTC

It only needs the one CFC and a page to create an instance. The method is not run by design. Except on CHF3, where CF seems to be running it for me.

Translate
Inspiring
Mar 1, 2013 11:19 AM UTC

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

Translate