3 Replies Latest reply on Jun 9, 2011 8:03 AM by khitlin

    Data management/Paging don't support ArrayCollection data type.

    c0y0tex

      Hi, when I work data management or paging along linq to sql everything works fine until I add a data type that includes some kind of details in it, for example a sale, a sale must include a sale detail, so my webservice returns an array of sales and each of these sales include a sales details array, and as long as I don't enable paging or data management on this data type everything works fine but when I enable any of those features the following error shows up when I attempt to execute any operation on that includes that data type: 

      ReferenceError: Error #1065: Variable ArrayCollection is not defined.

       

       

       

      at global/flash.utils::getDefinitionByName()

       

       

      at com.adobe.serializers.utility::TypeUtility$/assignProperty()[C:\depot\flex\ide_trunk\ide_ builder\com.adobe.flexbuilder.dcrad\serializers\src\com\adobe\serializers\utility\TypeUtil ity.as:593]

      at com.adobe.serializers.utility::TypeUtility$/convertToStrongType()[C:\depot\flex\ide_trunk \ide_builder\com.adobe.flexbuilder.dcrad\serializers\src\com\adobe\serializers\utility\Typ eUtility.as:562]

      at com.adobe.serializers.utility::TypeUtility$/convertResultHandler()[C:\depot\flex\ide_trun k\ide_builder\com.adobe.flexbuilder.dcrad\serializers\src\com\adobe\serializers\utility\Ty peUtility.as:436]

      at mx.rpc.soap::Operation/http://www.adobe.com/2006/flex/mx/internal::processResult()[E:\dev\hero_private\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\hero_private\frameworks \projects\rpc\src\mx\rpc\AbstractInvoker.as:313]

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

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

      at DirectHTTPMessageResponder/completeHandler()[E:\dev\hero_private\frameworks\projects\rpc\ src\mx\messaging\channels\DirectHTTPChannel.as:451]

      at flash.events::EventDispatcher/dispatchEventFunction()

      at flash.events::EventDispatcher/dispatchEvent()

      at flash.net::URLLoader/onComplete()

       

      I've concluded it is due to some class not including the ArrayCollection reference in it, do any of you guys have any idea where can I start looking? or if this is simply not supported for the moment? Should I try to extend some class? Maybe CallResponder? Any ideas will be greatly appreciated.

        • 1. Re: Data management/Paging don't support ArrayCollection data type.
          khitlin Level 1

          Hey Guys,

          I am getting this same exact error, but with the type ByteArray.  This worked fine against Flex SDK 4.0 and is now throwing a runtime error once it is built against the 4.5 SDK.  Is this related to updates to the introspection in Flash Builder?

           

          Keith H.

           

          ReferenceError: Error #1065: Variable ByteArray is not defined.

          at global/flash.utils::getDefinitionByName()

          at com.adobe.serializers.utility::TypeUtility$/assignProperty()[C:\depot\flex\ide_trunk\ide_ builder\com.adobe.flexbuilder.dcrad\serializers\src\com\adobe\serializers\utility\TypeUtil ity.as:593]

          at com.adobe.serializers.utility::TypeUtility$/convertToStrongType()[C:\depot\flex\ide_trunk \ide_builder\com.adobe.flexbuilder.dcrad\serializers\src\com\adobe\serializers\utility\Typ eUtility.as:562]

          at com.adobe.serializers.utility::TypeUtility$/convertListToStrongType()[C:\depot\flex\ide_t runk\ide_builder\com.adobe.flexbuilder.dcrad\serializers\src\com\adobe\serializers\utility \TypeUtility.as:518]

          at com.adobe.serializers.utility::TypeUtility$/assignProperty()[C:\depot\flex\ide_trunk\ide_ builder\com.adobe.flexbuilder.dcrad\serializers\src\com\adobe\serializers\utility\TypeUtil ity.as:623]

          at com.adobe.serializers.utility::TypeUtility$/convertToStrongType()[C:\depot\flex\ide_trunk \ide_builder\com.adobe.flexbuilder.dcrad\serializers\src\com\adobe\serializers\utility\Typ eUtility.as:562]

          at com.adobe.serializers.utility::TypeUtility$/convertListToStrongType()[C:\depot\flex\ide_t runk\ide_builder\com.adobe.flexbuilder.dcrad\serializers\src\com\adobe\serializers\utility \TypeUtility.as:518]

          at com.adobe.serializers.utility::TypeUtility$/assignProperty()[C:\depot\flex\ide_trunk\ide_ builder\com.adobe.flexbuilder.dcrad\serializers\src\com\adobe\serializers\utility\TypeUtil ity.as:623]

          at com.adobe.serializers.utility::TypeUtility$/convertToStrongType()[C:\depot\flex\ide_trunk \ide_builder\com.adobe.flexbuilder.dcrad\serializers\src\com\adobe\serializers\utility\Typ eUtility.as:562]

          at com.adobe.serializers.utility::TypeUtility$/convertResultHandler()[C:\depot\flex\ide_trun k\ide_builder\com.adobe.flexbuilder.dcrad\serializers\src\com\adobe\serializers\utility\Ty peUtility.as:436]

          at mx.rpc.soap::Operation/http://www.adobe.com/2006/flex/mx/internal::processResult()[E:\dev\hero_private\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\hero_private\frameworks \projects\rpc\src\mx\rpc\AbstractInvoker.as:313]

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

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

          at DirectHTTPMessageResponder/completeHandler()[E:\dev\hero_private\frameworks\projects\rpc\ src\mx\messaging\channels\DirectHTTPChannel.as:451]

          at flash.events::EventDispatcher/dispatchEventFunction()

          at flash.events::EventDispatcher/dispatchEvent()

          at flash.net::URLLoader/onComplete()

          • 2. Re: Data management/Paging don't support ArrayCollection data type.
            c0y0tex Level 1

            Sure, I bumped into the ByteArray error also, are you using TinyInt or SmallInt data types in your database? I changed all those data types to int, updated the service in flash builder and ByteArray error gone, ArrayCollection error still not solved :/

            • 3. Re: Data management/Paging don't support ArrayCollection data type.
              khitlin Level 1

              I figured out what the issue is on our side and it is related to a file that is generated by the data services introspection.  The catch here, is this is an auto-generated file that is NOT meant to be modified by the developer becuase it is overwritten each time re-introspection occurs.  Hopefully I can explain this correctly....

               

              We have a file named _DocumentEntityMetadata.as that is generated upon introspection of a web service.  This file uses the ByteArray as a type for the document binary data.  On line 12 of the file, there is an import of the flash.utils.ByteArray class.  And then this line exists under the property type matching section of the file

               

              model_internal::propertyTypeMap["document"] = "ByteArray";

               

              This line is the ONLY reference to the ByteArray class in the file.  If you comment this line out the error goes away.  Here is my thinking on this...

               

              In many examples on how to resolve this issue we found that the solution was to actually create an instance of the ByteArray class in your code.  Even if it was a dummy instance, according the the posts we read.  This instructed the compiler to include the ByteArray class during compilation.  According to the documentation, the import statement does NOT import the class.  The use of the object in your code is what actaully adds the ByteArray type to your final compiled swf.  This sort of makes sense, since we often leave imports in that we don't need at runtime.

               

              So I think the line above is technically not an instance of the ByteArray class and more like a reference to the type.  Hence why it was not included during the compiling process.

               

              Short story....this is a bug in the introspection process in Flash Builder 4.5.  FYI the FB 4.0 introspected version of the _DocumentEntityMetadata.as is completely different and does not have an error when executed.