FDS Plugin for Eclipse Web Tools Platform

I have developed a plugin for the Eclipse Web Tools Platforms (WTP). The plugin provides a project facet, which is used to add Flex Data Services (FDS) functionality to a dynamic web project.

What is the Eclipse Web Tools Platform?

The Eclipse Web Tools Platform is an open source project that provides an “extensible development platform and application frameworks for building software”. The Eclipse WTP is a top-level project that “extends the Eclipse platform with tools for developing J2EE web applications”. The WTP project contains two subprojects:

  • Web Standards Tools (WST) – the WST subproject aims to “provide common infrastructure to any Eclipse-based development environment targeting Web-enabled applications”.
  • J2EE Standard Tools (JST) – the JST subproject aims to “provide a basic Eclipse plug-in for developing applications based on J2EE 1.4 targeting J2EE-compliant application servers, as well as a generic J2EE tooling infrastructure for other Eclipse-based development products.”.

Why the Eclipse Web Tools Platform?

To-date within Adobe Consulting EMEA we have delivered all our Flex 2 FDS projects on the Eclipse WTP for the following reasons:

  • Java Support – Flex Builder doesn’t add the Java nature to an FDS project therefore you have no support for Java development within the web module.
  • Version Control – Flex Builder creates an FDS project in-place on an external application server, as a result the web module assets are not part of the project under Eclipse and hence not subject to version control, especially if you are using the Eclipse team support. I believe you should always version control your web module e.g. all the files within flex.war. Within an enterprise it is highly likely that you will be running multiple FDS projects on different versions of Flex. When a developer or a deployer checks out a project they should receive the complete application. In addition, if you label or branch the codebase you should tag all files related to that version e.g. source files, library files, configuration files, deployment descriptors, API-implementations otherwise it becomes difficult to re-constitute the application at that version.
  • J2EE Support – if you are developing an enterprise application it is unlikely to contain just Flex and FDS artificats, for example business logic could be encapsulated in EJBs running in the mid-tier.
  • Debugging – within the Eclipse environment you are able to configure end-to-end debugging that allows you to step-through your Flex RIA-code and your server-side code (e.g. RPC services, EJBs, etc.).

From a runtime perspective FDS fits within the J2EE architecture, however from a development perspective within the IDE it doesn’t fit in to the J2EE development model. Eclipse provides an excellent Java development environment, which is extended by the WTP to aid the development of J2EE web applications. The WTP tooling understands the structure of a web module and an EJB JAR and how they combine to form an Enterprise application (EAR). With this in mind FDS is simply a unit of functionality within a web module, which is the concept of a project facet. A project facet allows you to add units of functionality to a web module, other examples include XDoclet and indeed Java support.

How to install the FDS Plugin

The plugin has been developed against Eclipse 3.1.2 + WTP 1.0.2 + Flex Builder 2. I downloaded the all-in-one WTP + Eclipse and then installed the Flex Builder plugins.

The plugin is developed against Java 5, so you will need the Java 5 JRE installed. I normally put a shortcut to the eclipse.exe on my desktop and edit the properties as follows:

C:\apps\adobe\flex2.0\wtp1.0.3\eclipse.exe -vm “C:\apps\java\jre1.5.0_06\bin\javaw.exe”

Remember to replace “C:\apps\java\jre1.5.0_06\bin\javaw.exe” with the path to “javaw.exe” on your PC.

The plugin is distributed using an Eclipse update site. To install the plugin start Eclipse and open Help > Software Updates > Find and Install. Create a new remote site with the following URL:

http://www.iterationtwo.com/fdsplugin/

Note: The update site is currently on the iteration::two web site as there are file size restrictions on the Adobe blog server. I hope to get it moved to a more permanent home in the near future.

You can also download the plugin from the Flex Exchange.

How to create an FDS aware Web project

You can create an FDS enabled web project one of two ways:

  1. Open File > New > Project and select Web > Dynamic Web Project. Follow the wizard and select the Flex Data Services facet.
  2. Open File > New > Project and select Flex Data Services > Flex Data Services Web Project.

You can of course add or remove a project facet at a later date using the project properties.

Hello World Example

The WTP platform comes with a number of server adapters, for example Tomcat. As yet there is currently no adapter for JRun. The compulsory "Hello World" example shows how to create an FDS Web project running on Tomcat.

  1. Download and install Tomcat 5.5.
  2. Start Eclipse.
  3. Create an FDS project called HelloWorld.
  4. The FDS project facet creates a default application (Main.mxml) under the content directory (WebContent) by default.
  5. Open Main.mxml and add the following: <mx:Label text="Hello World" />
  6. Open the Servers view, Window > Show View > Other > Server > Servers.
  7. In the Servers view right-click and select New > Server.
  8. Select Apache > Tomcat v5.5 Server.
  9. On the next page configure the Tomcat installation directory and the JRE.
  10. On the last page add the HelloWorld application.
  11. Start your Tomcat server, right-click > Start.
  12. Open the Run > Run….
  13. Select Flex Application and click New.
  14. Configure the application as follows, you will need to override the URL defaults:

  1. Click Run.

You could also right-click Main.mxml and select Run As > Flex Application, however you would need to edit the configuration to manually configure the URLs as Flex Builder won’t resolve them correctly.

You can now use that same run configuration to debug your application, just click the debug icon on your main toolbar. You can also start the server in debug mode and set breakpoints in your Java code. You can control your embedded server (e.g. start, stop, debug, etc.) by using the icons on the Servers view .

Source Code

The source code is included in the plugin (com.adobe.flex.enterprise.ui).

54 Responses to FDS Plugin for Eclipse Web Tools Platform

  1. Jason says:

    Hi,Is this plugin for a general eclipse installation with the WTP installed or specifically for the Flex Builder? I tried installing it on my eclipse installation and I got this error:’com.adobe.flex.enterprise.feature (1.0.5) requires plug-in “com.adobe.flexbuilder.editors.mxml”‘.Thanks

  2. Peter Martin says:

    The plugin has been developed against Eclipse 3.1.2 + WTP 1.0.2 + Flex Builder 2. I downloaded the all-in-one WTP + Eclipse and then installed the Flex Builder plugins.The installation section has been updated with the software requirements and a link to the WTP download.

  3. Hi Peter,Have you tried in lastest WTP 1.5? should be possible to use your plugin and flex builder 2 plugin?If not, that would be a great addition for the future.Thanks!

  4. Rod says:

    HiIteration::two website is anavailable at the moment. Is there a way to get the plugin through another website.Thanks

  5. omprakash says:

    Hi,I tried doing this following stepTo install the plugin start Eclipse and open Help > Software Updates > Find and Install. Create a new remote site with the following URL:http://www.iterationtwo.com/fdsplugin/but it says no network connection.is there any alternative way.I am using eclipse 3.2, flex builder 2.Thanks

  6. Excellent man, this is really useful.I’m using WTP right now for an FDS project and the deployment model is a pain. When you make mods to FDS’ “Dynamic Web Project” it overwrites the already-deployed Flex project when you re-synchronize it. My first thought was to get the Flex project to “deploy” directly into the FDS project’s WebContent folder in the workspace so that the Flex project’s artifacts get deployed to the server along with the rest of the “Dynamic Web Project’s” WebContent folder at synchronize-time. That would also allow you to use the “run server from within the workspace” option in WTP. I’ll definitely be giving your plug-in a whirl tho’.Do you think your plug-in’ll work with Rational and WebLogic?

  7. Christina says:

    Hi,I tried doing this following stepTo install the plugin start Eclipse and open Help > Software Updates > Find and Install. Create a new remote site with the following URL:http://www.iterationtwo.com/fdsplugin/but it says no network connection.is there any alternative way.I am using eclipse 3.1, flex builder 2.Can you please help meThanks

  8. Parth Pandya says:

    Hi Guys,i installed the plugin through the update site URL and using elicpse 3.1 ant WTP 1.0.2. When i try to create a Data Service project i get following exception.Plug-in com.adobe.flex.enterprise.ui was unable to load class com.adobe.flex.enterprise.project.wizard.FlexWebProjectWizard.Can anyone please help to resolve this?thanks

  9. Christina says:

    hi,same Problem here like above:Plug-in com.adobe.flex.enterprise.ui was unable to load class com.adobe.flex.enterprise.project.wizard.FlexWebProjectWizard.please helpthanks

  10. Mark says:

    The biggest problem I have had in trying to get started with Flex/Data Services/Web Project/Java was understanding how to set the project up. There is very little info on how to do this and the books have been slow in coming.This plugin answered all my project setup questions by using it to setup a project.It -Created my directory structure.Created all the flex configuration xml / properties / css files needed for an FDS project.Put all the fds required jars in the lib directory.Created some default mxml and created all the other flex/fds required objects.It added the ability to modify the java options(libs,source,build path …) from the properties of the project.Once the project was set up I could see how to fit in the java components.Great Job.This should be one of the main Flex links on the Adobe site.

  11. Parth Pandya says:

    Hi Christina,How did you solve the problem that you were getting?I’m getting as below, which is same that you had before the plugin worked for you.Plug-in com.adobe.flex.enterprise.ui was unable to load class com.adobe.flex.enterprise.project.wizard.FlexWebProjectWizardcan anyone help?Cheers,

  12. Christina says:

    Hi Parth Pandya,i couldnt solve the problem. I tried to do everything again, but it still doesnt work.I still have the following error then i want to create a flex data services project”Plug-in com.adobe.flex.enterprise.ui was unable to load classcom.adobe.flex.enterprise.project.wizard.FlexWebProjectWizard”here is the exactly steps i took.1.I downloaded the all-in-one WTP + Eclipse and then I downloaded from the adobe HP and installed the Flex Builder 2 plugin.2. I created a new remote site with the following URL: http://www.iterationtwo.com/fdsplugin/ like above3. I tried to open a new FDS -Projekt, but the erroe message like above appers. So i downloaded and install also the FDS Express from the adobe HP, cause i thought it might need also this installation to work(i dont know, if i need that).Well after all that the error is still there and i cant go on with my work. Does anybody know, what we are doing wrong??thank for helpChristina

  13. Christina says:

    Hallo Peter,i have a problem, maybe you can help me.I have in my eclipse already a J2EE Project with a JSP frontend. My job is it to try using flex as frontend instead of JSP. My first question isCan i create a project in eclipse that understands Java and flex together? I have in the same workspace my Project the “Flex Client FDS” and then the other “Java Project”. How can i communicate from flex client(one project) to java methods(other Project)?? I am positive that adobe has a solution for that. I already now how the remoteobject works, but in that case i had to export my java project as a jar file. I dont believe this is the only way it works. :-)thank you Christina

  14. Gaga says:

    For you who have this problem”Plug-in com.adobe.flex.enterprise.ui was unable to load classcom.adobe.flex.enterprise.project.wizard.FlexWebProjectWizard”Check if your eclipse is lunched with Java 1.5. I had similar issue until I switched to Java 1.5

  15. Christina says:

    I still have the same problem even if i switch to Java 1.5problem”Plug-in com.adobe.flex.enterprise.ui was unable to load classcom.adobe.flex.enterprise.project.wizard.FlexWebProjectWizard”has anybody other idea?

  16. Rod says:

    HiI’m using Eclipse 3.1.2 + WTP (all in one file). Then I installed Flex. Flex Design mode doesn’t work anymore…Any ideas ?Thanks

  17. Parth Pandya says:

    Guys,if you have below mentioned problem,”Plug-in com.adobe.flex.enterprise.ui was unable to load classcom.adobe.flex.enterprise.project.wizard.FlexWebProjectWizard”then you may be using “shortcut to Eclipse”. When i run the elicpse from .exe file then i dont get the above exception and all works fine. I ended up using elicpse.ini file to setup the memory and other things that i was adding in shortcut and now it just works for me all time.hope this helps…cheers

  18. Bernie says:

    Peter,I have been attempting, without success, to download the fdsplugin from the iterationtwo update site.Have you relocated this plugin? Could you PLEASE provide an updated link?

  19. Scotty says:

    Hi Peter,Thanks for creating and sharing your plugin.Since the update site appears to be down, could you share what the facet does automatically?Thanks

  20. Scotty says:

    Nevermind my request….Just noticed it was on the Flex Exchange.Thanks!

  21. Hi Peter,the plugin is great. This takes away one of the major pain point in developing Flex/J2EE applications.Many thanks Malcolm Edgar

  22. Hi Peter,I am getting a really strange error when I ported an existing project across to use this plugin.I am using the Flex FileReference class, and I get a File I/O error when using it. Note in the stacktrace it appears to be referencing the source path of someones PC:C:\dev\GMC\sdk\frameworks\mx\core\UIComponent.as:1161regards Malcolm EdgarError #2044: Unhandled IOErrorEvent:. text=Error #2038: File I/O Error.at com.avoka.flex.ui.panel::ArsPart02/com.avoka.flex.ui.panel:ArsPart02::onCreationComplete()[D:\java\eclipse-wtp-1.0.2\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\webapps\ditr.eeo.client\com\avoka\flex\ui\panel\ArsPart02.mxml:37]at com.avoka.flex.ui.panel::ArsPart02/___WizardPanel1_creationComplete()[D:\java\eclipse-wtp-1.0.2\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\webapps\ditr.eeo.client\com\avoka\flex\ui\panel\ArsPart02.mxml:5]at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()at flash.events::EventDispatcher/dispatchEvent()at mx.core::UIComponent/set initialized()[C:\dev\GMC\sdk\frameworks\mx\core\UIComponent.as:1161]at mx.managers::LayoutManager/mx.managers:LayoutManager::doPhasedInstantiation()[C:\dev\GMC\sdk\frameworks\mx\managers\LayoutManager.as:687]at Function/http://adobe.com/AS3/2006/builtin::apply()at mx.core::UIComponent/mx.core:UIComponent::callLaterDispatcher2()[C:\dev\GMC\sdk\frameworks\mx\core\UIComponent.as:7789]at mx.core::UIComponent/mx.core:UIComponent::callLaterDispatcher()[C:\dev\GMC\sdk\frameworks\mx\core\UIComponent.as:7732]

  23. Elias Balasis says:

    Great idea.I had also been unsuccessfully trying to use WTP.I am using Eclipse 3.2 with WTP 5.0 on Java 5.0I expect that this plugin will work on my configuration.Has anyone tried it successfully?

  24. fabio_sebastiano says:

    Hi, i’m trying to use the plugin, i’ve installed it after the download from the flex exchange site, but it doesn’t work. When i create a new dynamic web project, it doesn’t show me the dataService facet and it doesn’t add the flex part to the sile system…Anyone have an idea?Thank you

  25. vijay krishna says:

    Hi,I am having two versions(3.12,3.13) for Common Components Plugin. The thing is the update site doesn’t allow both the versions at a time. For that i am modifying the “Installation Details” in fature.xml in that i checked the “This feature requires exclusion installation” and updated. Now the problem is we try to install the Common Componets one version and some other feature that time also the Update site does not allow to install the common component version thing.thanksvijay.

  26. Tom Raic says:

    Same here. I was unsuccessful in getting the plug-in to work correctly. I installed it on the environments you suggested. But it seems very buggy. I cannot get it to debug or run correctly, without JBoss crashing. I get Memory Heap leaks, or internal 500 server errors for a bad configuration.This seems an extremely useful plug-in. I hope someone takes the initiative to finish implementing it correctly. Please plet me know if a later version exists, or maybe I’m doing something wrong.

  27. Elias Balasis says:

    OK. I have finally done it.The plug-in runs perfectly inside my Eclipse WTP 1.5.2 installation.Unfortunately, I cannot set the FDS server’s location in the file system relative to the Eclipse project’s location.Any ideas?

  28. Elias Balasis says:

    Congratulations.This plugin is amazing.You have earned my gratitude Peter Martin.Unfortunately I have noticed that the file system location of the server in .flexProperties file is absolute.How could I make it relative to the file system location of the eclipse project?

  29. Steve says:

    Nice! Save a lot of works.I have one question about Tomcat 5.5, it needs JOTM to work with FDS 2, any idea to implement the setting for tomcat5.5@localhost ( Eclipse embedded Tomcat) ?Here is the link from adobehttp://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6b82874fI use Hibernate in my project. It is able to display or edit data in datagrid on regular Tomcat5.5, however can only display the data in the Eclipse embedded Tomcat5.5 server. I am keep getting “Unable to access UserTransaction in DataService” error when I try to save the changes. Both of them are using the same codes.Steve

  30. Paul Gracie says:

    HiThe FDS PlugIn looks very useful -unfortunately breaks FlexBuilder for Mac beta.Installs OK, one can create a Hello Worldproject, but right clicking on *any* project breaks – 90%+ CPU and repeated entries in the PDE error log.Tried with- Eclipse 3.1 : but Mac FlexBuilder requires 3.2, will not install on 3.1- Completely clean 3.2 + WTP bundle : still breaks.Very sad :-(paul

  31. Manu says:

    HiI was trying to install this plugin. But I got this error saying..”com.adobe.flex.enterprise.feature (1.0.5) requires plug-in “com.adobe.flexbuilder.editors.mxml”.Anyone could help me out here please..Thanks.

  32. While the plugin is great for setting up a project, I have had nothign but trouble with eclipse after installing it. Using a clean WTP all-in-one R1.0.3 which is based on eclipse 3.1.2. The past three days of using it has me crashing eclipse about once a hour!

  33. While the plugin is great for setting up a project, I have had nothign but trouble with eclipse after installing it. Using a clean WTP all-in-one R1.0.3 which is based on eclipse 3.1.2. The past three days of using it has me crashing eclipse about once a hour!

  34. While the plugin is great for setting up a project, I have had nothign but trouble with eclipse after installing it. Using a clean WTP all-in-one R1.0.3 which is based on eclipse 3.1.2. The past three days of using it has me crashing eclipse about once a hour!

  35. my apologies for the multiples, kept seeing a 500 error on my end. :(DK

  36. eliasbalasis says:

    To people experiencing problems with Eclipse.I suspect a memory error is popping up.I had the same problem.Make sure you have setup correctly the memory options in eclipse.iniCheck also the eclipse.org issue tracker for related memory incidents.All problems disappeared after I modified my eclipse.ini memory options.sample memory options in eclipse.ini-vmargs-Xms128m-Xmx640m

  37. eliasbalasis says:

    To people experiencing problems with Eclipse.I suspect a memory error is popping up.I had the same problem.Make sure you have setup correctly the memory options in eclipse.iniCheck also the eclipse.org issue tracker for related memory incidents.All problems disappeared after I modified my eclipse.ini memory options.sample options in eclipse.ini-vmargs-Xms128m-Xmx640m

  38. eliasbalasis says:

    To people experiencing problems with Eclipse.I suspect a memory error is popping up.I had the same problem.Make sure you have setup correctly the memory options in eclipse.iniCheck also the eclipse.org issue tracker for related memory incidents.All problems disappeared after I modified my eclipse.ini memory options.sample options in eclipse.ini-vmargs-Xms128m-Xmx640m

  39. eliasbalasis, have my memory settings set high, sim to yours, still have issues. After 1 day of working, the next day it all bombs out. Also, using this setup after a crash we often see that the FB editor gets mucked up and have to re-install it all.DK

  40. seems there’s a update on this to version 1.0.6. Any news from the trenches on it?

  41. Wolfgang Becker says:

    After upgrading Flexbuilder to FB 2.01 i get the folowwing error on my FDS Projects:”A problem occurred when opening this project. Try quitting an restarting the application. If the problem persists, you may be using an unsupportet project Version, or your project files may be corrupted.”The same when i create a new “Flex Dataservices Web Project”.Are there any issues with Flex 2.01?

  42. Ed says:

    Everything was working fine, but now when I try to create a project with FDS facets, I started getting:Failed to instantiate class com.adobe.flex.enterprise.project.facet.FlexEnterpriseFacetInstallDelegate.Any Ideas?

  43. ed says:

    This is a neat plugin, but I hate things that are good, but supported by only one person -you are up a creek when the support dies or becomes slow…btw… like someone else mentioned, I had to do a complete re-installed of flex and the fds plugin to get rid of the :Failed to instantiate class com.adobe.flex.enterprise.project.facet.FlexEnterpriseFacetInstallDelegate.Something got corrupted… now it works again…

  44. Neeraj Singh says:

    i am getting the same error as Douglas (few posting above)When i create a new “Flex Dataservices Web Project”, it generate all the structure but end with this error..”A problem occurred when opening this project. Try quitting an restarting the application. If the problem persists, you may be using an unsupported project Version, or your project files may be corrupted.”Are there any issues with Flex 2.01?Also seems like ActionScript properties file has missing tag likeError from Eclipse Log File1) com.adobe.flexbuilder.project.persist.PersistenceException: Expected a single compilerSourcePath tag but found 02) !ENTRY org.eclipse.xsd 2 0 2007-01-26 17:27:44.875!MESSAGE Element type “QueryString.keys.length” must be followed by either attribute specifications, “>” or “/>”.!STACK 0org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Element type “QueryString.keys.length” must be followed by either attribute specifications, “>” or “/>”.Any ideas?

  45. gazeteler says:

    Are there any issues with Flex 2.01?

  46. Tom Raic says:

    Hey Peter, you think you would be able to provide a sample project or way of deploying a WAR, instead of an EAR? When you choose to compile on the server, using EAR, the deployment works fine. However, I create a project to compile locally, or when I create a WAR project (by not selecting EAR), the application with deploy the first time, but then the JBOSS server is not able to re-deploy the application again. Is there a setting in JBOSS to force a re-deploy or re-compile? I find it to be a pain to use EAR for testing. I tried once to use deployment descriptors to deploy, but I got many errors with certain files not being able to deploy correctly. What do you recommend?

  47. fabio says:

    Hi everybody,i’m facing a real funny problem with modules and moduleLoader, i hopeit’s not my fault anyway…If i create a normal flex project with fBuilder, i’m able to usemodules in a lot of different ways (as mxml, as as in a function etc..)…but if i try to use them in my fds application (created with this fdseclipse plugin) i can’t use modules. The compile-time error message isalways the same:Could not resolve to a component implementationI tried a lot of solutions, paying attention to import all the classesetc…but nothing change.I will appreciate everykind of help.

  48. Joost says:

    The “Expected a single compilerSourcePath tag” is probably caused because of a change in the .actionScriptProperties configuration file between Flex 2 and Flex 2.0.1.I compared the file in the FDS-web project and a Flex project and moved the changes into the FDS-web project file.Then everything seemed to work fine.I can start the webapp and do debugging in Flex. However, when debugging the source is not available. I tried several source directories, but no suc6. Any ideas ?

  49. Raul says:

    Hi everybody,I have been following all the steps of the tutorial but when I try to create a new “Flex DataSErvice Web Project” I receive the next message:”A problem occurred when opening this project. Try quitting an restarting the application. If the problem persists, you may be using an unsupportet project Version, or your project files may be corrupted.”(yes like other persons .. Douglas, ed, …)Please, could you help me to solve this error?. Thanks a lot.

  50. Swathi says:

    I have added the fds plug in , but when I try to create the dynamic web project , the option to select the option to select fds project facet is not present in the “Select Project Facet” window. I am using wtp all in one 1.0.2 with eclipse 3.1 and flex builder 2 plug-in. Please help.

  51. Swathi says:

    Hi all,My problem with the fds facet has been solved. I used wtp 1.5 + eclipse 3.2 +Flex builder 2.0.1. I jave added the downloaded zip file of the fds plug in by this way.Help > Software Updates > Find and Install>New archived siteGive the zip file of the fds plugin which is downloaded.Add the path for flex.war in the Properties >flex data services >fds installations

  52. anuj pathak says:

    Hi all,i am unable to install FDS plug-in on flex 2.1it’s giving error as followsFlex Enterprise Builder (2.0.0.200702152022) requires plug-in “org.eclipse.wst.common.project.facet.coreplease let me know from where i can get this plug-ini also tried to install Flex 2.1 plug-in over Eclipse+wtp Bundle, it again giving error likeplease gine eclipse 3.1 or higher, which i already had (i have the eclipse 3.3 with wtp 2.0)please suggest what to do

  53. Pos Software says:

    is there any alternative way.I am using eclipse 3.2, flex builder 2.

  54. When using this (excellent) plug-in with Sun’s HotSpot JVM (v5 and v6) it’s “perm gen” space that the VM keeps running out of. I have found that I am able to fix the problem (on XPP and Vista) with the following shortcut:-“C:\Program Files\Eclipse 3.2\eclipse.exe” -vmargs -Xmx1024m -XX:MaxPermSize=1024mThis may be overkill but it certainly fixed the problem for me.