I think (and hope) that I finally have a working, stable environment for LiveCycle Data Services development. In my previous attempts, I have been plagued by Out of Memory errors (Eclipse 3.3 + Flex Builder 3 beta 2), strange “Unknown” problems (Eclipse 3.3 + Flex Builder 2), and missing plug-ins (Flex Builder 3 beta 2 stand alone).
My current approach is based on a great article titled Eclipse WTP + JBoss + Flex Builder + FDS Dev Environment Tutorial. In this case, the developer built his environment using slightly older versions of the tooling than I preferred, so I took a stab at building the environment with the following:
- Eclipse WTP 1.5.5
- JBoss 4.0.5 GA
- Flex Builder 3 beta 2
- LiveCycle Data Service 2.5 (formerly known as Flex Data Services or “FDS”)
- Peter Martin’s FDS Project Facet 2.0.1
You might notice that Eclipse WTP and JBoss are not the latest and greatest as of this writing (in the case of Eclipse WTP, the latest is 2.0.1 and JBoss is 4.2.2). I made both of these choices for a reason. First, I had trouble running WTP 2 (built on Eclipse 3.3) with Flex Builder 3b2 earlier, so I wanted to avoid it initially. As for JBoss, the aforementioned tutorial points out that the Eclipse plug-in associated with the 4.2 version is a memory and CPU hog – a problem I had with my earlier trials also.
I am not going to go into full detail on set-up and configuration of the development environment here, because the development environment tutorial does a tremendous job there. Instead, I will point out a few, albeit minor, differences as well as a few key points:
- I installed my environment at “C:\LCDSEnv,” so pathes listed below will differ from the tutorial.
- Memory setting changes are a must for both Eclipse and JBoss:
- Eclipse (C:\LCDSEnv\eclipseWTP\eclipse.ini)
- JBoss (C:\LCDSEnv\jboss\bin\run.bat):
set JAVA_OPTS=%JAVA_OPTS% -Xms256m -Xmx740m
- Utilize Peter Martin’s plugin instead of building your application based on the sample WAR file provided by LCDS.
- Do not deploy “flex.war” from the LCDS installation to your appication server (I found a tutorial that stated otherwise and all this will do is cause a port conflict and unnecessary headaches).
Now that I have a working environment, I can start to integrate my previously built Java application (Spring + Hibernate + FDS) with my Flex frontend. I will document my efforts in future posts.
I’ve been waiting semi-patiently since last week for my Gmail account to be IMAP-enabled. I even tried setting up Apple Mail to use IMAP this evening without IMAP being an option on my Gmail settings (it didn’t work even though someone claimed it worked for him).
But now suddenly, I have IMAP access for Gmail a mere 3 hours later! This is probably a coincidence, but if you are still waiting for IMAP, give it a try.
Before we can generate the skeleton for our new LCDS application, we need to identify where the data services package has been installed on your computer. To do this:
- Launch Eclipse
- Window > Preferences…
- Expand “Flex Data Services” and select “FDS Installations”
- Click the new button and edit the path to “C:\Program Files\Adobe\lcds\flex.war”
- Click OK
We will now utilize Peter Martin’s FDS Plugin (installation explained in my previous post) to generate our application skeleton:
- New > Project…
- Expand “Flex Data Services” and select “Flex Data Services Project”
- Click Next
- Enter a project name (e.g. “HelloWorld”)
- In the Target Runtim area, you can click the new button to create a Server configuration on which to run your project. In my case, I will be using JBoss 4.2. Adobe explains how to install LCDS as a web application on several platforms.
- Click Next
- On the Project Facets screen, you will need to change the version of the Dynamic Web Module (there is a small black arrow to the right of the version number) for it to work with the FDS Plugin.
- Click Next
- Accept the defaults and click Next
- On the “Flex Data Services” screen, you will need to select the Flex WAR that we installed above (probably “fds1”), you can accept all other defaults
- Click Finish
When the wizard finishes, you should have a brand new LCDS application ready to go that includes handling for both Flex (client) and Java (server) components.
In future posts, I hope to explore the development of our application a bit further.
Update: Unfortunately, it didn’t take much longer before this configuration ran into memory and other problems. I am looking into other options that are more robust.
Over the past few days, I’ve been experimenting with Adobe LiveCycle Data Services and Java to build a Java-backed Flex application. Over the next few posts, I will chronicle my experiences in the hopes of others avoiding some of the pitfalls I have encountered.
To get started, we’ll set-up and configure our development environment. In order to support development of both the client (Flex) and server (Java), I wanted to configure my IDE to handle both Flex and Java EE.
Note: I always like to use the latest and greatest, but Flex Builder 3 beta 2 and Eclipse 3.3 do not play nicely together. This configuration led to an “Out of Memory” error every twenty minutes or so, which became unmanageable. The approach I followed utilizes Flex Builder 2 with Eclipse 3.3, this is not a support configuration, but it is done in a way that allows you to easily disable the Flex Builder features if desired.
- Eclipse 3.3 for Java EE Developers
- Flex Builder 2 (free 30 day trial available)
- LiveCycle 2.5.x
- Flex SDK 2.01 hotfix 2 (included in the above FB distribution)
- Download all of the above packages.
- Extract Eclipse to a known location. I used “C:\eclipse3.3”
- Install Flex Builder 2 at “C:\Program Files\Adobe\Flex Builder 2” as the stand alone version, not the plug-in
- Install LiveCycle Data Services at “C:\Program Files\Adobe\lcds”
Out of the box, Flex Builder 2 does not work with Eclipse 3.3. A detailed tutorial on how to configure Eclipse to use Flex Builder 2 is available, but the following is the process that I utilized:
- Create a new Eclipse extension:
- Create a new directory “C:\eclipse3.3\extensions” and a second directory “C:\eclipse3.3\extensions\eclipse”
- In this directory, create an empty “.eclipseextension” file (hint: from a command prompt, enter “echo > .eclipseextension”)
- Create two additional directories in the new eclipse directory: “plugins” and “features”
- In Eclipse, select Help > Software Updates > Manage Configuration…
- In the right panel, click on “Add an Extension Location”
- Navigate to “C:\eclipse3.3\extensions” and click “Ok”
- Close Eclipse
- If you have a license for Flex Builder 2, you should launch Flex Builder and enter the license key now. You can then close FB.
- We will now merge Flex Builder into Eclipse:
- Copy “C:\Program Files\Adobe\Flex Builder 2\configuration\com.adobe.flexbuilder.”
- Copy “C:\Program Files\Adobe\Flex Builder 2\features\com.adobe.flexbuilder.*” to your extension feature directory “C:\eclipse3.3\extensions\eclipse\features.”
- Copy “C:\Program Files\Adobe\Flex Builder 2\features\com.adobe.flexbuilder.*” to your extension plugins directory “C:\eclipse3.3\extensions\eclipse\plugins.” Note: There are directories and jar files that need to be copied.
- Finally, restart Eclipse via the clean option (open a command prompt at “C:\eclipse3.3” and enter “eclipse – – clean”). This forces a reload of all Eclipse plugins.
You can verify that Flex Builder capabilities have been installed by checking if the “Flex Development” perspective is available (Window > Open Perspective > Other).
Finally, we will install Peter Martin’s outstanding FDS plugin, which we can use to generate application skeletons for LCDS projects:
- Download the plugin
- Launch Eclipse (if not already open)
- Select Help > Software Updates > Find and Install
- Select Search for new features to install
- Click New Archived Site
- Select the plugin ZIP file you downloaded
- Click Finish
- Check the feature
- Complete the wizard and restart Eclipse when prompted
I’ve been running this configuration for some time now and it seems to be stable (i.e. no Out of Memory errors). I will post updates with any glitches that need to be fixed.