It's Singleton, not Simpleton...dummy!

Tuesday, April 22, 2008

Flex Builder 3 - LiveCycle Data Services - Libs

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:

Type 1:
1172: Definition mx.data.utils:Managed could not be found.
or
1172: Definition mx.data:IManaged could not be found.

Type 2:
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):

http://bugs.adobe.com/jira/browse/ASC-2815

http://www.mail-archive.com/flexcoders@yahoogroups.com/msg38973.html

http://www.mail-archive.com/flexcoders@yahoogroups.com/msg66002.html


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:
  1. Create the following directory [lcds-install-path]/flex/libs
  2. Create the following directory [lcds-install-path]/flex/locale
  3. Create the following directory [lcds-install-path]/flex/jars **
  4. Expand or explode (suit yourself) [lcds-install-path] /samples.war to [lcds-install-path]/samples
  5. Go to [lcds-install-path]/samples/WEB-INF/flex/libs and copy everything.
  6. Paste the files copied into [lcds-install-path]/flex/libs
  7. Go to [lcds-install-path]/samples/WEB-INF/flex/locale and copy everything.
  8. Past the files copied into [lcds-install-path]/flex/locale
  9. Go to [lcds-install-path]/samples/WEB-INF/flex/jars and copy everything. **
  10. Past the files copied into [lcds-install-path]/flex/jars **
  11. Go to flex builder, and edit the build-path.
  12. Add [lcds-install-path]/flex/libs as an SWC folder.
  13. Add [lcds-install-path]/flex/locale as an SWC folder.
  14. Add [lcds-install-path]/flex/locale/en_US/fds_rb.swc as an SWC
  15. And now your application should compile!
** - optional for now, may be needed for something in future, who knows?

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 remotemethod@gmail.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:
http://www.adobe.com/devnet/coldfusion/articles/data_app.html

10 comments:

Brian Sadler said...

I ran into the same problem trying to set up the tutorial app at http://www.adobe.com/devnet/coldfusion/articles/data_app.html . Your remedy worked exactly as stated - thank you very much indeed!

Rem0teMeth0d said...

Hi Brian, You are most welcome. I am glad it helped you. :)

Andy McIntosh said...

I believe, but don't hold me to this, you can consolidate these two steps:

Add [lcds-install-path]/flex/locale as an SWC folder.
Add [lcds-install-path]/flex/locale/en_US/fds_rb.swc as an SWC

by adding [lcds-install-path]/flex/locale/{locale} as a SWC folder.

Hope it works for you.

Rem0teMeth0d said...

It should have worked that way, I agree but from what I experienced it didn't really work. I can't tell you the reason because I believe it is quite weired but that's the way it is. :) Thanks for the tip though!

codecraig said...

thanks so much

Anonymous said...

Thanks a lot.Saved my day

Gauranga said...

Thanks a million! Worked like a charm. Saved hours of frustration....

resh said...

Worked like a charm..thank you so much!

Muqui Lu said...

Hi,

All the links to download lcds are broken.
Can you name them?
Im going to search web after them!!

Tkx

Rem0teMeth0d said...

@Muqui

Sorry about the broken link thingy. But i tried out all the links on my post and they seem to be working fine. Could you tell me which one you want, so I could can check and fix if it is broken.