7 Replies Latest reply on Mar 11, 2010 8:17 PM by JayeshViradiya

    Upgrading from CF7 to CF9 breaks my RemoteClasses?

    tim.clearview Level 1

      Hi gang... this problem has been kicking my butt all day, thought it was time to ask the forum.


      We have a few Flex apps as part of our site, using Coldfusion as a back end (through Flash Remoting).

      Our production and dev servers are running CF7. The Flex apps work fine in that environment.

      We just set up a CF9 dev server, though, as we want to upgrade. Strangely, SOME of the Flex code is barfing in this environment. It seems to specifically relate to RemoteClasses of Actionscript Value Objects.

      For example, I have this AS class:

      package models
      {
      import com.roguedevelopment.objecthandles.ObjectHandles;
      [RemoteClass(alias="DocumentPageFieldBean")]

      [Bindable]
      public class DocumentPageField extends ObjectHandles
      {
      public var DocumentPageFieldID:Number = 0;
      public var DocumentPageID:Number = 0;
      public var DocumentComponentID:Number = 0;
      public var Required:Number = 0;
      public var DocAnswer:DocumentAnswer;
      public var ElementID:int = 0;
      public var filter:String = "";
      public var start:int = 0;
      public var char:int = 0;
      public var tab:int = 0;
      public var type:String = "";
      public var defaultdata:int = 0;
      public var defaultdate:String = "";
      public var limit:int = 0;

      public function DocumentPageField()
      {
      }

      }
      }

      Referring to a CFC at {cfcpath}.flex.Document.DocumentPageFieldBean

      This has never caused issues in the past... but today, no matter what, I get:

      (mx.rpc::Fault)#0
        errorID = 0
        faultCode = "Client.Packet.Encoding"
        faultDetail = (null)
        faultString = "Error deserializing client message."
        message = "faultCode:Client.Packet.Encoding faultString:'Error deserializing client message.' faultDetail:'null'"
        name = "Error"
        rootCause = (Object)#1
          cause = (null)
          detail = "Ensure that the name is correct and that the component or interface exists."
          localizedMessage = "Could not find the ColdFusion component or interface DocumentPageFieldBean."
          message = "Could not find the ColdFusion component or interface DocumentPageFieldBean."
          missingFileName = "DocumentPageFieldBean"
          rootCause = (null)
          type = "Application"

      I've tried to use the registerClassAlias method, which did nothing. I've also tried changing the RemoteClass to [RemoteClass(alias="{cfcpath}.flex.Document.DocumentPageFieldBean")], which I know makes no sense since we are referring to the alias, but tried anyway. No luck.

      Any ideas? I can't find anything on the net relating to this.. and once again, If I drop it in CF7, works fine. I've of course confirmed the CFCs are there in the same path structure as CF7.

        • 1. Re: Upgrading from CF7 to CF9 breaks my RemoteClasses?
          jrowny

          Having the exact same issue going form CF8 to CF9. Runs flawlessly on CF8, yet on CF9 I get that exact same error.

          • 2. Re: Upgrading from CF7 to CF9 breaks my RemoteClasses?
            JayeshViradiya Adobe Employee

            Hi,

             

            In CF9, we have introduced some changes in Flash remoting. Because of that there are few changes in WEB-INF/flex.Config-XML files at Destination and Channel level. Some of the Elements which used to exist at Channel level in CF8/CF7, have now been shifted to Destination level in CF9.

             

            I would suggest you to go through this "Enhanced Flash Remoting" feature doc to get idea about changes done. By Default CF9, now ships XML files with these new changes. And a Recompilation of your Old Flex Application is required to be done against these new Config XML files.

             

            I dont know, how you have migrated your Channels/Destinations from CF7 to CF9. Migration changes are mentioned in the Doc. Please go through it.

             

            If you can answer some of these questions, I will have better clarity.

             

            --> Do you Observe any Error related to Flash remoting on Server startup?

             

            --> Have you directly copied your OLD CF7 Config-XML files on CF9?

                     If YES, this means that Old Flash remoting is being used on CF9 and so You dont need to Recompile your Flex Application and it should just work fine the way it used to work in CF7/CF8.

                     If NO, it means that you are using "Enchanced/Improved Flash Remoting" feature of CF9  But with Flex Application compiled with CF7/CF8 Style Flash Remoting. In this case, refer to the Documentation and add your Required Destinations as per the new Flash remoting specification.

             

            CF9 continues to support CF7/CF8 style Flash Remoting as well and whether to use OLD Flash Remoting or New Flash remoting will be decided by CF based upon the Format of the Config XML files.

             

            --> Are these Flex Application using LCDS as well?

             

            Thanks

            Jayesh Viradiya

            1 person found this helpful
            • 3. Re: Upgrading from CF7 to CF9 breaks my RemoteClasses?
              jrowny Level 1

              In our case, the issue turned out to be that the new AMF de-serializer does not understand per-app settings, in this case mappings.

               

              We had some mappings in the application.cfc used by our service. Those mappings were not working when executing the value objects.

               

              The fix was to put the mappings in the CF Administrator, but that really should be made into a bug.

              • 4. Re: Upgrading from CF7 to CF9 breaks my RemoteClasses?
                tim.clearview Level 1

                Thanks, Jayesh, we'll try that! Sorry, I didn't realize there was a whole upgrade path for Flex apps and CF9.

                • 5. Re: Upgrading from CF7 to CF9 breaks my RemoteClasses?
                  JayeshViradiya Adobe Employee

                  Ok...so CF7 to CF9 migration problem may not be because of AMF de-serializer not entertaining PerApp Mapping settings as PerApp setting feature was introduced in CF8 only. Where as CF8 to CF9, if somebody has perApp mapping settings, then it seems to be broken.

                  • 6. Re: Upgrading from CF7 to CF9 breaks my RemoteClasses?
                    bensarz7

                    I have the exact same problem even when compiling using the CF9 config files.

                    • 7. Re: Upgrading from CF7 to CF9 breaks my RemoteClasses?
                      JayeshViradiya Adobe Employee

                      Compilation in FB, shouldnt fail because of Config XMl changes. Could you tell me what is the compilation error that you are getting ?

                       

                      BTW, On CF server side, what remoting you are using OLD remoting(cf8/cf7 style) or NEW (cf9) one?

                       

                      Do you see any Messagebroker related Errors on Server startup?

                       

                      Jayesh Viradiya