13 Replies Latest reply: Mar 11, 2013 3:53 AM by ChivertonT RSS

    CF 9.0.1 CHF3 breaks CFCs

    ChivertonT Community Member

      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

        • 1. Re: CF 9.0.1 CHF3 breaks CFCs
          Piyush Nayak Community Member

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

          • 2. Re: CF 9.0.1 CHF3 breaks CFCs
            Adam Cameron. Community Member

            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

            • 3. Re: CF 9.0.1 CHF3 breaks CFCs
              JeffHorne2

              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\mysit e\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.

              • 4. Re: CF 9.0.1 CHF3 breaks CFCs
                ChivertonT Community Member

                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.

                • 5. Re: CF 9.0.1 CHF3 breaks CFCs
                  Adam Cameron. Community Member

                  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

                  • 6. Re: CF 9.0.1 CHF3 breaks CFCs
                    ChivertonT Community Member

                    "Which your repro case is not doing."

                    That's the thing ;-) It breaks even though I'm not calling it, and the trvial rewrite in the method stops it doing it.

                    Before the CHF the page (as given) correctly outputs (and does) nothing at all.

                     

                    I've seen this issue before, according to our Subversion history of that method, but it must have gone away at some point, then come back.

                     

                    It wont reproduce on a clean 9.0.2 install upgraded to it's CHF1 and JVM 1.7 though.

                    • 7. Re: CF 9.0.1 CHF3 breaks CFCs
                      Adam Cameron. Community Member

                      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

                      • 8. Re: CF 9.0.1 CHF3 breaks CFCs
                        ChivertonT Community Member

                        This does reproduce on our staging 32bit Linux CF9.0.1, previously on CHF2 plus all hot fixes prior to CHF3. This is just installing CHF3 to break it, so still the 1.6 JVM

                        • 9. Re: CF 9.0.1 CHF3 breaks CFCs
                          ChivertonT Community Member

                          Please contact me directly for link to a video showing this happening only after CHF3 install. It shows some details of our CFIDE so not public.

                          Adam: I've DMed you on Twitter

                          • 10. Re: CF 9.0.1 CHF3 breaks CFCs
                            Piyush Nayak Community Member

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

                            • 11. Re: CF 9.0.1 CHF3 breaks CFCs
                              ChivertonT Community Member

                              That's awesome. I'm happy to test out a rebuilt CHF or follow up hotfix for you ahead of public release.

                               

                              Any idea on timescales yet ?

                               

                              Tom

                              • 12. Re: CF 9.0.1 CHF3 breaks CFCs
                                Abram Adams Community Member

                                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.