I have a library that, after it loads, I see this error in the console:
Failure in Loader: VerifyError: Error #1014: Class mx.collections::ArrayCollection could not be found.
I had the same problem with another library, except it had a problem with IToken. I got around this problem by changing the default linkage of libraries in build path from external to merge into code. That did not work this time.
Merging Flex libraries into service libraries does not seem to be anything close to the correct way to deal with this. Besides, it didn't some the problem every time.
What is the best way to keep these sorts of dependency errors from arising? The RSLs are included with Web apps, but not with libraries.
Is the library that fails to load an interface library? There are restrictions on classes that can be in interface libraries. See the section titled “Limitations on classes used in a service interface library” on this help page: http://help.adobe.com/en_US/enterpriseplatform/10.0/AEPDeveloperGuide/ WSabb771403789c7a3-31e63d5312fb7375fac-8000.html#WSabb771403789c7a3-37 c95b1412fb7245fd9-8000 Service libraries can use Flex classes that are specific to a flex version, but cannot render any UI elements.
I have found what happened.
I created a library and created a data model within it. I created some entities within the data model. Some of those entities had collections as properties. I created the ActionScript code for the model and the collections were ArrayCollections. I moved the interfaces of the created code to a separate library.
The interfaces need to be changed from using ArrayCollection to IList. I knew enough about that to change it for the service I was trying to bring into my application. I missed another interface that had ArrayCollections as properties and that caused the error.
After cleaning up all of the ArrayCollection references from the interface library my service loaded.
The Hello Gravity video tutorial has a very good explanation on why specific implementations of Flex classes are not used in service interfaces: http://blogs.adobe.com/gravity/2011/09/09/hellogravity-sample-applicat ion/
Europe, Middle East and Africa