views:

14

answers:

1

Hi, there! I use springactionscript 1.0RC1 and found an error as following:

Error: A class with the name 'org.springextensions.actionscript.ioc.factory.con fig.flex.FlexPropertyPlaceholderConfigurer' could not be found. Are you sure the specified class has been compiled? Look for more information on this topic here: http://www.springactionscript.org/do...inclusion.html

and my applicationContext.xml is

<objects>
    <property file="config.properties" required="false" />
    <object id="constants" class="com.libsys.utils.Constants">
        <property name="endpoint" value="${endpoint}" />
    </object> 
</objects>

If the xml file has no properties file, it works fine. I don't know how this happens, could you tell me how to solve it? Thank you!

BTW, my compiler version is 4.1.0.14632 and springactionscrip is 1.0RC1.

A: 

How are you loading the application context? With the XMLApplicationContext or with the FlexXMLApplicationContext?

If you use the latter, the FlexPropertyPlaceholderConfigurer should be included in the library and you should not be getting this error. If you are using the XMLApplicationContext, then just make sure you reference the FlexPropertyPlaceholderConfigurer somewhere in your code so it gets compiled.

For example in your main class:

private static var compiledClasses:Array = [FlexPropertyPlaceholderConfigurer];
Christophe Herreman
Thank you! I tried FlexXMLApplicationContext and it works well!
orangestar