Copy link to clipboard
Copied
I have a web project which uses GraniteDS to interface with java services and works perfectly using Run in FB4.
However when I use Export Release Build to create the SWF file (and put it into the correct place in my web application), the application can no longer connect to my services. They just silently fail. Why would that be?
In the project properties, i have Flex Server > Application server type set to BlazeDS with the correct parameters set. My compiler arguments are:
-locale en_US -services ${STS_WORKSPACE}/library/web-app/WEB-INF/flex/services-config.xml -include-libraries libs/granite-essentials.swc
Obviously Adobe doesn't support GraniteDS but it seems to me to be an FB4 issue - the connections work fine in development using Run. It's almost as if Export Release Build causes FB4 to ignore the compiler arguments?
Thanks for any help.
Copy link to clipboard
Copied
Should I lodge a bug report in JIRA?
Copy link to clipboard
Copied
Can you try adding the SWC via Project properties -> Flex Build Path -> Library Path -> Add SWC
Instead of saying -include-libraries?
Copy link to clipboard
Copied
The SWC is already added there automatically by virtue of being in the libs folder. The compiler option is necessary in addition because the classes in the SWC file are not directly referenced and this option does the following:
"Links all classes inside a SWC file to the resulting application SWF file, regardless of whether or not they are used.
Contrast this option with the library-path option that includes only those classes that are referenced at compile time.
To link one or more classes whether or not they are used and not an entire SWC file, use the includes option.
This option is commonly used to specify resource bundles."
Anyway in the meantime I solved the problem. Sorry I said that services were silently failing but this was incorrect, there were error messages in some tests I just did. The cause was that I'm using a framework that does injection based on annotations and when you "export release build" apparently the compiler removes annotations, which it doesn't do in normal development mode, so the objects were not getting injected hence no access to services. I'd actually be interested to know which compiler flag you are using that does this, by the way. In my case I added the following to the compiler arguments and everything started working:
-keep-as3-metadata+=Bindable,Managed,ChangeEvent,NonCommittingChangeEvent,Transient,Id,Version,Name,In,Inject,Out,Observer,ManagedEvent,Destroy
Copy link to clipboard
Copied
I have the similar problem. I am using FLEX3.5 and after release the project and set to correct location, the application cannot access to back end database. It was working when I run. My compiler arguments: -locale en_US. My cross-domain policy file is in placed too.
Any suggestion is welcome.
Thank you in advance.