0 Replies Latest reply: Jun 25, 2014 11:25 PM by senthil anubagavathi RSS

    How to solve: Main Thread (Suspended: Error: value of pendingCustomerTokenList must be a collection)

    senthil anubagavathi

      Hi All,

      Have an app that I am creating in flashbuilder 4, java axis 2 web service and mysql.

       

      In my app I have defined a service.  I have had not problems with pulling data and inserting data

      by calling my java functions through the service.

       

      I added a new property and then made it available in flex.  it display on label field,  Ran the app and got the error:

       

      Error: value of pendingCustomerTokenList must be a collection

        at valueObjects::_Super_PendingTokensResponse/set pendingCustomerTokenList()[F:\vEngage\flexworkspace\FBAgentApp\src\valueObjects\_Super_Pe ndingTokensResponse.as:104]

        at com.adobe.serializers.utility::TypeUtility$/assignProperty()[/Users/sameer/depot/flex/ide _builder/com.adobe.flexbuilder.dcrad/serializers/src/com/adobe/serializers/utility/TypeUti lity.as:559]

        at com.adobe.serializers.utility::TypeUtility$/convertToStrongType()[/Users/sameer/depot/fle x/ide_builder/com.adobe.flexbuilder.dcrad/serializers/src/com/adobe/serializers/utility/Ty peUtility.as:498]

        at com.adobe.serializers.utility::TypeUtility$/convertResultHandler()[/Users/sameer/depot/fl ex/ide_builder/com.adobe.flexbuilder.dcrad/serializers/src/com/adobe/serializers/utility/T ypeUtility.as:372]

        at mx.rpc.soap::Operation/http://www.adobe.com/2006/flex/mx/internal::processResult()[E:\dev\4.y\frameworks\projects \rpc\src\mx\rpc\soap\Operation.as:953]

        at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[E:\dev\4.y\frameworks\projects \rpc\src\mx\rpc\AbstractInvoker.as:313]

        at mx.rpc::Responder/result()[E:\dev\4.y\frameworks\projects\rpc\src\mx\rpc\Responder.as:56]

        at mx.rpc::AsyncRequest/acknowledge()[E:\dev\4.y\frameworks\projects\rpc\src\mx\rpc\AsyncReq uest.as:84]

        at DirectHTTPMessageResponder/completeHandler()[E:\dev\4.y\frameworks\projects\rpc\src\mx\me ssaging\channels\DirectHTTPChannel.as:451]

        at flash.events::EventDispatcher/dispatchEventFunction()

        at flash.events::EventDispatcher/dispatchEvent()

        at flash.net::URLLoader/onComplete()

       

      I looked at the Network Monitor tab and examined the call/response.  Response body shows no error and the Response result shows the data returned by my java axis 2 function.  Its all correct.

       

      Ran configure return type again.  Let it auto-detect and return type from sample data. The properties returned looked just fine.

       

      Looked at the _Super_PendingTokensResponse.as on line 104

       

       

      var oldValue:ArrayCollection = _internal_pendingCustomerTokenList;              

              if (oldValue !== value)

              {

                  if (value is ArrayCollection)

                  {

                      _internal_pendingCustomerTokenList = value;

                  }

                  else if (value is Array)

                  {

                      _internal_pendingCustomerTokenList = new ArrayCollection(value);

                  }

                  else

                  {

                      throw new Error("value of pendingCustomerTokenList must be a collection");

                  }

              this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pendingCustomerTokenList", oldValue, _internal_pendingCustomerTokenList));

              }   

       

      How to I correct this problem ?

       

      thanks for any help.