2 Replies Latest reply on Sep 3, 2009 4:31 AM by WebSnozz

    Need urgently help remote class error

    sandyflex

      Hello all please help me this problem i am facing last 7 days..

       

      I have make a code in flex windows application >> calculation compnent

      in this component some export and import facility have providing

      when i run the programm some import file loading problem here

      i have using some class method given bellow

       

      [RemoteClass(alias="com.calc.view.EmergyVertexRenderer")]

       

      after compile the code display error >>

       

      TypeError: Error #2007: Parameter child must be non-null.
      ArgumentError: Error #1063: Argument count mismatch on com.calc.view::EmergyVertexRenderer(). Expected 1, got 0.
          at ObjectInput/readObject()
          at mx.collections::ArrayList/readExternal()[E:\dev\3.1.0\frameworks\projects\framework\src\m x\collections\ArrayList.as:443]
          at mx.collections::ArrayCollection/readExternal()[E:\dev\3.1.0\frameworks\projects\framework \src\mx\collections\ArrayCollection.as:132]
          at flash.filesystem::FileStream/readObject()
          at Calculator/ImportCanvas()[D:\demo\cal\src\Calculator.mxml:752]
          at Calculator/menuHandler()[D:\demo\cal\src\Calculator.mxml:941]
          at Calculator/___Calculator_MenuBar1_itemClick()[D:\demo\cal\src\Calculator.mxml:1021]
          at flash.events::EventDispatcher/dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at mx.core::UIComponent/dispatchEvent()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\co re\UIComponent.as:9156]
          at mx.controls::MenuBar/eventHandler()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\con trols\MenuBar.as:1379]
          at flash.events::EventDispatcher/dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at mx.core::UIComponent/dispatchEvent()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\co re\UIComponent.as:9156]
          at mx.controls::Menu/dispatchEvent()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\contr ols\Menu.as:1302]
          at mx.controls::Menu/mouseUpHandler()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\cont rols\Menu.as:1644]

      When i pass any parameter class than also it not taken please give solution

      You can mail me direct my mail id >> id.email001@gmail.com

      Thanks

        • 1. Re: Need urgently help remote class error
          Gaurav P(Adobe) Level 2

          Hi,

          What is the backend server you are using, is it Coldfusion?

          Also, can you mention the method signatures (both on AS side and the server side) that you are trying to invoke when you get this error.

           

          On a separate note, have you tried using DCD(Data menu->connect to...) for this service.

           

          Thanks,

          - Gaurav

          • 2. Re: Need urgently help remote class error
            WebSnozz

            I was getting the "Expected 1, got 0. at ObjectInput/readObject()" error whenever I had an ArrayCollection that contained a class which didn't have a parameterless constructor.  So whatever class of objects you have in that array class probably need default values for all the constructor parameters:

             

            class SomeClass(param1:String, param2:String) {}

             

             

             

            Fixed: class SomeClass(param1:String = "something", param2:String = "" ) {}

             

            I think this is because the deserializer has to construct an instance of the object before setting it's properties.  Without a default constructor it fails.