• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

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

New Here ,
May 23, 2011 May 23, 2011

Copy link to clipboard

Copied

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()

at com.adobe.serializers.utility::TypeUtility$/convertToStrongType()

at com.adobe.serializers.utility::TypeUtility$/convertResultHandler()

at mx.rpc.soap::Operation/http://www.adobe.com/2006/flex/mx/internal::processResult()

at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()

at mx.rpc::Responder/result()

at mx.rpc::AsyncRequest/acknowledge()

at DirectHTTPMessageResponder/completeHandler()

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.

Views

908

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 07, 2011 Jun 07, 2011

Copy link to clipboard

Copied

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()

at com.adobe.serializers.utility::TypeUtility$/convertToStrongType()

at com.adobe.serializers.utility::TypeUtility$/convertListToStrongType()

at com.adobe.serializers.utility::TypeUtility$/assignProperty()

at com.adobe.serializers.utility::TypeUtility$/convertToStrongType()

at com.adobe.serializers.utility::TypeUtility$/convertListToStrongType()

at com.adobe.serializers.utility::TypeUtility$/assignProperty()

at com.adobe.serializers.utility::TypeUtility$/convertToStrongType()

at com.adobe.serializers.utility::TypeUtility$/convertResultHandler()

at mx.rpc.soap::Operation/http://www.adobe.com/2006/flex/mx/internal::processResult()

at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()

at mx.rpc::Responder/result()

at mx.rpc::AsyncRequest/acknowledge()

at DirectHTTPMessageResponder/completeHandler()

at flash.events::EventDispatcher/dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at flash.net::URLLoader/onComplete()

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 07, 2011 Jun 07, 2011

Copy link to clipboard

Copied

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 😕

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 09, 2011 Jun 09, 2011

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines