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

Wednesday, April 16, 2008

Pitfalls In Java Development and More

Hi guys, here is a super cool blog recently launched by my friends and colleagues at Pramati.

http://pitfalls.wordpress.com

The blog is named as Pitfalls in Java Development, but it doesn't limit the content or the description to just the pitfalls; there are amazingly new and refreshing facts about Java Technology and all its associated open source technologies.

You will also find quite a few interesting debates on DOs and NOT TO DOs in the Application Development world of Open Source and Java/J2EE. All of the authors on the blog are experts in their respective domains and technologies and share the most recent issues they encounter while working on their current assignments.

In less than two weeks since it was launched, it has reached a hit count of 3000 approx. Which in itself is an indication of how techies about the value of information shared by this blog. And to those of you for whom it matters, the CTO at Spring Source Adrian Colyer has already commented on one of the posts on this blog.

I am sure you are going to learn a lot from this single link. So check it out now!