powered by Jive Software

Instantiation of the Roster class causes the following error: "No class registered for interface 'mx.resour"ces::IResourceManager'

I am using the Flex 3 SDK (and flex builder) and am simply trying to instantiate the Roster class which produces the following error: “No class registered for interface ‘mx.resources::IResourceManager’.” at runtime.

The Roster class is attempting to instatiate the

ArrayCollection class which is causing the problem. I have attempted to

instantiate the ArrayCollection class in my own code and get the same

result. Not sure if it’s worth mentioning, however it is occuring in a straight flex actioncript project (i.e no mxml files).

It seams absurd that this is happening, I am assuming there is some

environment configuration that is not correct on my dev environment, possibly

something to do with the locale. Can anybody else confirm if they are

getting this problem using Flex 3?

Any information would be greatly appreciated.



I’ve been doing some digging and it seams this has nothing to do with XIFF rather it has to do with any flex class that relies on the ResourceManager being initialized, in this case it’s ArrayCollection. The problem does not occur when you have a main mxml class, as somewhere in the class hierarchy the ResourceManager gets initialized correctly. Unfortunately this is not the case for a straight actionscript 3 project (as in my case).

The following bug logged with Adobe is of relevance: https://bugs.adobe.com/jira/browse/SDK-12205 however whichever way I try I cannot get the darn ResourceManager initialized. I’m starting to think it may be easier to have a main mxml file that references my main actionscript class.

If anybody could help out here or has any information to offer it would be greatly appreciated.



I’m having the same problem. Latest flex 3 (from March 2) doesn’t seem to help. I’m just using a little mxml file til this is sorted…

Link to same issue on Flex forums: http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=585&threadid= 1340438&forumid=60

Ok, so I’m fed up with using an mxml file. I downloaded the opensource flex package and modified the relevant classes, stripping out all the resourceManager crud from ArrayCollection, ArrayList, ListCollectionView, Sort and Base64Decoder.

It was a simple change, but now I’m driffting away from Flex3, which sucks

Is it just me or does it seem pretty dumb to embed an internationalization manager in low level utilities? Base64Decoder?? Should that really be deciding the language used in its exceptions?? This is just glueing Flex3 into one big monolithic mess.

I agree, it’s crazy to embed the internationalization manager into such low level utilities. It’s also crazy to do that and not provide a simple way of bootstrapping the damn thing as well. I think Adobe see this as breaking backward compatibility, which says a lot about how they see straight actionscript projects or non mxml projects. I see it as breaking functionality…

Having said that, since starting to use mxml, I’m starting to like it. It really does make laying out pages much easier and the way you can use actionscript and mxml interchangeably is really quite nice. I’ve still got lots of plain actionscript classes but they’re generally included and laid out as part of a parent mxml file.

I admire your endeavor in branching Flex3, but it just sounds plain crazy. Even if you really loath using mxml that much ,it is a far lesser evil than maintaining your own branch of Flex 3.

A potential solution has been posted on the Flex support forums:

http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=585&threadid= 1340438&forumid=60

The approach is to basically initialise the ResourceManager manually in the main application files constructor. I have not tried it yet, but it looks solid.



This fix worked nicely for me. Thanks for the heads-up.