I would never have been writing this post in addition to so many others that are already there talking about how to build, compile, deploy, run your flex applications that use Live Cycle Data Service, had I not spent last five days trying to figure out why my application wouldn't compile when I was following all the steps mentioned everywhere.
I might be dumb for not having known something that was obvious; that one must know in order to build applications in flex, so I concede. However, there might be my other dumb brethren out there who might be struggling with the same things, so this one is for you fellas!
After migrating the flex app that was built on Flex Builder 2 by my associate, some time last year, around October/November, I was facing a few issues in getting the application to compile.
Some of the errors were as follows:
1172: Definition mx.data.utils:Managed could not be found.
1172: Definition mx.data:IManaged could not be found.
Unable to resolve resource bundle "data" for locale "en_US".
Now first of all when you start Googling, you come across the following links (that are relevant):
And even though these have been written with the intention to help out the newbies in the flex world, they don't really shed light on what might be the cause of this problem and/or how to fix it. The problem is indeed far simpler than the complicated discussions on the "Known Issues" and "Hot Fixes".
All I need to know is, where is that goddamn missing library that I could include in my build path to resolve these issues.
If you have been following the instructions elsewhere, you probably already have gone through all the treacheries that I have gone through so you can relate to the frustration I am talking out of.
Well having said and done all that I have, here is what you need to do in order to get those libraries into your classpath.
The location where you installed your Live Cycle Data Services, let's call it [lcds-install-path].
Under [lcds-install-path] you will find a war file called samples.war. If you can't see it, download the Data Services afresh from an authentic source and install it.
Now the reason I referred to this samples guy was because I wanted to make sure if anybody had ever tried to accomplish what I had set out for with the Flex SDK3.0 and Data Services. (I realized later that what I was trying to do was not something that was rarely used, but something that is used so often that it is taken for granted that people who can't get it right, like me, are just too dumb to work on Flex Applications.)
Procedure for alleviation:
- Create the following directory [lcds-install-path]/flex/libs
- Create the following directory [lcds-install-path]/flex/locale
- Create the following directory [lcds-install-path]/flex/jars **
- Expand or explode (suit yourself) [lcds-install-path] /samples.war to [lcds-install-path]/samples
- Go to [lcds-install-path]/samples/WEB-INF/flex/libs and copy everything.
- Paste the files copied into [lcds-install-path]/flex/libs
- Go to [lcds-install-path]/samples/WEB-INF/flex/locale and copy everything.
- Past the files copied into [lcds-install-path]/flex/locale
- Go to [lcds-install-path]/samples/WEB-INF/flex/jars and copy everything. **
- Past the files copied into [lcds-install-path]/flex/jars **
- Go to flex builder, and edit the build-path.
- Add [lcds-install-path]/flex/libs as an SWC folder.
- Add [lcds-install-path]/flex/locale as an SWC folder.
- Add [lcds-install-path]/flex/locale/en_US/fds_rb.swc as an SWC
- And now your application should compile!
If this doesn't work still, you need to take a break and hire someone smarter to help you out.
The reason I copied all the files to a custom location was that it will keep me aware of where I need to make changes in future and also might give some hint to Adobe Team to include a separate folder in the LCDS distribution that contains all the mandatory libraries.
Hope that help you my dumb-friends. If it doesn't you can mail me at email@example.com and I will try to help you out with some more "Flex for Dummies" tips if I can.
Here are some related links that might help: