Flex, Spring and BlazeDS: the full stack! (Part 4) [updated]


[UPDATE] This article series has been reedited on the Adobe Developer Connection. For more information, see this post.

In the previous articles in this series, we did the boring stuff of setting up Spring, Hibernate and MySQL on a sample todo list server on one side, and we wrote a small useless Flex UI on the other side. In this article, we’re going to write the final UI and connect it with the Spring backend using BlazeDS. Let’s go!

Creating a module to share configuration files

[EDIT]
This section has been added to avoid duplicating configuration files.
[/EDIT]

The first thing we need to do is to create a new module under todolist. That module will contain our 2 configuration files and package them up in a resource zip that can be included later in both the web and ria modules.

So first go to todolist and run the following command:

mvn archetype:create -DgroupId=org.epseelon.samples -DartifactId=todolist-config

Then go to todolist-config and delete src/main/java and src/main/test directories. After that, create an src/main/resources directory and create services-config.xml in there with the following content:

<?xml version="1.0" encoding="UTF-8"?>
<services-config>
  <services>
    <service-include file-path="remoting-config.xml" />
  </services>

  <!-- Spring factory registration -->
  <factories>
    <factory id="spring"
     class="org.epseelon.samples.todolist.controller.SpringFactory" />
  </factories>

  <channels>
    <channel-definition id="channel-amf"
       class="mx.messaging.channels.AMFChannel">
    <endpoint
       url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf"
       class="flex.messaging.endpoints.AMFEndpoint" />
      <properties>
        <polling-enabled>false</polling-enabled>
      </properties>
    </channel-definition>
  </channels>

  <logging>
    <target class="flex.messaging.log.ConsoleTarget"
      level="Error">
      <properties>
        <prefix>[BlazeDS]</prefix>
        <includeDate>true</includeDate>
        <includeTime>false</includeTime>
        <includeLevel>true</includeLevel>
        <includeCategory>true</includeCategory>
      </properties>
      <filters>
        <pattern>Endpoint.*</pattern>
        <pattern>Service.*</pattern>
        <pattern>Message.*</pattern>
        <pattern>DataService.*</pattern>
        <pattern>Configuration</pattern>
       </filters>
    </target>
  </logging>

  <system>
    <redeploy>
      <enabled>true</enabled>
      <watch-interval>20</watch-interval>
      <watch-file>
        {context.root}/WEB-INF/flex/services-config.xml
      </watch-file>
      <watch-file>
        {context.root}/WEB-INF/flex/remoting-config.xml
      </watch-file>
      <touch-file>{context.root}/WEB-INF/web.xml</touch-file>
    </redeploy>
  </system>
</services-config>

Next in the same directory, create a file named remoting-config.xml with the following content:

<?xml version="1.0" encoding="UTF-8"?>
<service id="remoting-service"
class="flex.messaging.services.RemotingService">

  <adapters>
    <adapter-definition id="java-object"
      class="flex.messaging.services.remoting.adapters.JavaAdapter"
      default="true" />
  </adapters>

  <default-channels>
    <channel ref="channel-amf" />
  </default-channels>

  <destination id="todoService">
    <properties>
      <factory>spring</factory>
      <source>todoService</source>
    </properties>
  </destination>
</service>

Now you need to edit todolist-config/pom.xml like this:

<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <parent>
    <artifactId>todolist</artifactId>
    <groupId>org.epseelon.samples</groupId>
    <version>1.0-SNAPSHOT</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.epseelon.samples</groupId>
  <artifactId>todolist-config</artifactId>
  <name>todolist-config</name>
  <version>1.0-SNAPSHOT</version>
  <packaging>pom</packaging>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <id>make shared resources</id>
            <goals>
              <goal>single</goal>
            </goals>
            <phase>package</phase>
            <configuration>
              <descriptors>
                <descriptor>src/main/assembly/resources.xml</descriptor>
              </descriptors>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

Notice the pom packaging and configuration of maven assembly plugin to package configuration according to the assembly descriptor in src/main/assembly/resources.xml file as follows:

<assembly>
  <id>resources</id>
  <formats>
    <format>zip</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>
  <fileSets>
    <fileSet>
      <directory>src/main/resources</directory>
      <outputDirectory></outputDirectory>
    </fileSet>
  </fileSets>
</assembly>

Now you can run ‘mvn install’ and you see a file called todolist-config-1.0-SNAPSHOT-resources.zip, with just our 2 configuration file inside.

Exposing Spring service via BlazeDS

The next thing to do is to add BlazeDS libraries to our web module dependencies. To do that, edit todolist-web/pom.xml and add the following dependencies:

<dependency>
  <groupId>com.adobe.blazeds</groupId>
  <artifactId>blazeds-common</artifactId>
  <version>3.0.0.544</version>
</dependency>
<dependency>
  <groupId>com.adobe.blazeds</groupId>
  <artifactId>blazeds-core</artifactId>
  <version>3.0.0.544</version>
</dependency>
<dependency>
  <groupId>com.adobe.blazeds</groupId>
  <artifactId>blazeds-remoting</artifactId>
  <version>3.0.0.544</version>
</dependency>
<dependency>
  <groupId>backport-util-concurrent</groupId>
  <artifactId>backport-util-concurrent</artifactId>
  <version>3.1</version>
</dependency>
<dependency>
  <groupId>javax.servlet</groupId>
  <artifactId>servlet-api</artifactId>
  <version>2.5</version>
  <scope>provided</scope>
</dependency>

blazeds-core, blazeds-common and blazeds-remoting are only available from my personal repository for now, until Adobe publishes them to a public repository. Now that BlazeDS libraries have been added to the project, we’ll add a special Java class to the project. This class will act as a bridge between BlazeDS and Spring by retrieving Spring bean instances for BlazeDS FlexFactory interface. Here comes the org.epseelon.samples.todolist.controller.SpringFactory class (curtesy of Jeff Wroom):

package org.epseelon.samples.todolist.controller;

import flex.messaging.FactoryInstance;
import flex.messaging.FlexFactory;
import flex.messaging.config.ConfigMap;
import flex.messaging.services.ServiceException;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.context.ApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;

public class SpringFactory implements FlexFactory {

  private static final String SOURCE = "source";

  public void initialize(String id, ConfigMap configMap) {
  }

  public FactoryInstance createFactoryInstance(String id, ConfigMap properties) {
    SpringFactoryInstance instance = new SpringFactoryInstance(this, id, properties);
    instance.setSource(properties.getPropertyAsString(SOURCE, instance.getId()));
    return instance;
  } // end method createFactoryInstance()

  public Object lookup(FactoryInstance inst) {
    SpringFactoryInstance factoryInstance = (SpringFactoryInstance) inst;
    return factoryInstance.lookup();
  }

  static class SpringFactoryInstance extends FactoryInstance {
    SpringFactoryInstance(SpringFactory factory, String id, ConfigMap properties) {
      super(factory, id, properties);
    }

    public String toString() {
      return "SpringFactory instance for id=" + getId() + " source=" + getSource() + " scope=" +
        getScope();
    }

    public Object lookup() {
      ApplicationContext appContext = WebApplicationContextUtils.getWebApplicationContext(flex.messaging.FlexContext.getServletConfig().getServletContext());

      String beanName = getSource();
      try {
        return appContext.getBean(beanName);
      } catch (NoSuchBeanDefinitionException nexc) {
        ServiceException e = new ServiceException();
        String msg = "Spring service named '" + beanName
          + "' does not exist.";
        e.setMessage(msg);
        e.setRootCause(nexc);
        e.setDetails(msg);
        e.setCode("Server.Processing"); 

        throw e;
      } catch (BeansException bexc) {
        ServiceException e = new ServiceException();
        String msg = "Unable to create Spring service named '"
          + beanName + "' ";
        e.setMessage(msg);
        e.setRootCause(bexc);
        e.setDetails(msg);
        e.setCode("Server.Processing");
        throw e;
      }
    }
  }
}

Now we’ll configure the servlet that is responsible for handling remoting requests coming from the Flex UI and calling the Spring service accordingly. Add the following configuration to todolist-web/src/main/webapp/WEB-INF/web.xml, just after listener configuration:

<context-param>
  <param-name>flex.class.path</param-name>
  <param-value>/WEB-INF/flex/hotfixes</param-value>
</context-param>

<!-- MessageBroker Servlet -->
<servlet>
  <servlet-name>MessageBrokerServlet</servlet-name>
  <servlet-class>
    flex.messaging.MessageBrokerServlet
  </servlet-class>
  <init-param>
    <param-name>services.configuration.file</param-name>
    <param-value>/WEB-INF/flex/services-config.xml</param-value>
  </init-param>
  <init-param>
    <param-name>flex.write.path</param-name>
    <param-value>/WEB-INF/flex</param-value>
  </init-param>
  <load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
  <servlet-name>MessageBrokerServlet</servlet-name>
  <url-pattern>/messagebroker/*</url-pattern>
</servlet-mapping>

As you can see, this servlet needs some configuration files to work, more specifically the files that are in our shared configuration module.

In order to import these files, we need to include our shared configuration module as a dependency of the web module. To do this, add the following dependency to todolist-web/pom.xml:

<dependency>
    <groupId>${project.groupId}</groupId>
    <artifactId>todolist-config</artifactId>
    <version>1.0-SNAPSHOT</version>
    <classifier>resources</classifier>
    <type>zip</type>
    <scope>provided</scope>
</dependency>

Then, in order to unpack those configuration files and embed them in your web application, you need to add the following plugin configuration to the build section in todolist-web/pom.xml:

<plugin>
  <artifactId>maven-dependency-plugin</artifactId>
  <executions>
    <execution>
      <id>unpack-config</id>
      <goals>
        <goal>unpack-dependencies</goal>
      </goals>
      <phase>generate-resources</phase>
      <configuration>
        <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/flex</outputDirectory>
        <includeArtifacIds>todolist-config</includeArtifacIds>
        <includeGroupIds>${project.groupId}</includeGroupIds>
        <includeClassifiers>resources</includeClassifiers>
        <excludeTransitive>true</excludeTransitive>
        <excludeTypes>jar,swf</excludeTypes>
      </configuration>
    </execution>
  </executions>
</plugin>

Now, you can have a look at todolist-config/src/main/resources/services-config.xml. Here the most interesting part is the destination configuration: we define a todoService destination that uses our SpringFactory for handling and the source parameter corresponds to the bean id of the service.

There is one more thing to do in order to allow Maven to build todolist-web independently from other modules. flex-compiler-mojo defines a resource-bundle packaging that maven-war-plugin is not aware of. And you have to add the following plugin configuration to solve that issue:

<plugin>
    <groupId>info.rvin.mojo</groupId>
    <artifactId>flex-compiler-mojo</artifactId>
    <extensions>true</extensions>
</plugin>

Last but not least, run ‘mvn install’ to check that everything is working, and that both configuration files are present in WEB-INF/flex.

That’s it. Now our todo service is exposed for remoting via BlazeDS. Let’s move on to the client-side connection.

Writing the Flex UI

First off, delete todolist-ria/src/main/flex/Main.xml and create todolist-ria/src/main/flex/index.mxml with the following content:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                layout="vertical" verticalAlign="middle" horizontalAlign="center"
                xmlns:screen="org.epseelon.samples.todolist.view.screen.*">

    <screen:TodoForm/>

</mx:Application>

The main screen is a TodoForm class that you have to create in todolist-ria/src/main/flex/org/epseelon/samples/todolist/view/screen/TodoForm.mxml:

<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
                layout="vertical" width="488" height="384" creationComplete="getList()">

    <mx:Form width="100%" height="100%" defaultButton="{saveButton}">
        <mx:FormHeading label="Todo List" width="100%"/>
        <mx:FormItem label="ID:" width="127">
            <mx:TextInput width="100%" id="idText"
                          text="{TodoItem(todoDatagrid.selectedItem).id}" editable="false" enabled="false"/>
        </mx:FormItem>
        <mx:FormItem label="Title:" width="345">
            <mx:TextInput width="100%" id="titleText"
                          text="{TodoItem(todoDatagrid.selectedItem).title}"/>
        </mx:FormItem>
        <mx:DataGrid id="todoDatagrid" width="100%" height="100%" dataProvider="{todoItems}">
            <mx:columns>
                <mx:DataGridColumn headerText="ID" dataField="id" width="30"/>
                <mx:DataGridColumn headerText="Title" dataField="title"/>
            </mx:columns>
        </mx:DataGrid>
    </mx:Form>

    <mx:ControlBar horizontalAlign="center">
        <mx:Button label="New" click="setDefault()"/>
        <mx:Button label="Save" id="saveButton" click="save()"
                   textAlign="center"/>
        <mx:Button label="Delete" click="remove()"/>
    </mx:ControlBar>

    <mx:RemoteObject id="todoService" showBusyCursor="true"
                     fault="onFault(event)" destination="todoService">
        <mx:method name="save" result="onResultSave(event)" fault="onFault(event)"/>
        <mx:method name="remove" result="onResultRemove(event)" fault="onFault(event)"/>
        <mx:method name="getList" result="onResultGetList(event)" fault="onFault(event)"/>
    </mx:RemoteObject>

    <mx:Script>
        <![CDATA[
        import mx.collections.ArrayCollection;
        import org.epseelon.samples.todolist.view.entity.TodoItem;
        import mx.rpc.events.ResultEvent;
        import mx.rpc.events.FaultEvent;
        import mx.controls.Alert;

        [Bindable]
        private var todoItems:ArrayCollection;

        private var todoItem:TodoItem;

        public function save():void
        {
            this.todoItem = new TodoItem();
            this.todoItem.id = new Number(idText.text);
            this.todoItem.title = titleText.text;
            todoService.save(todoItem);
        }

        public function onResultSave(event:ResultEvent):void
        {
            status = "Item was successfully saved with ID: " + TodoItem(event.result).id;
            getList();
        }

        public function remove():void
        {
            if (todoDatagrid.selectedItem != null) {
                todoItem = todoDatagrid.selectedItem as TodoItem;
                todoService.remove(todoItem);
            } else {
                Alert.show("Select an item to delete");
            }
        }

        public function onResultRemove(event:ResultEvent):void
        {
            status = "Deletion succeeded!";
            getList();
        }

        public function getList():void
        {
            todoService.getList();
        }

        public function onResultGetList(event:ResultEvent):void
        {
            todoItems = event.result as ArrayCollection;
        }

        public function setDefault():void
        {
            idText.text = "";
            titleText.text = "";
        }

            //Ocorreu uma falha ao chamar algum servico servico.
        public function onFault(event:FaultEvent):void
        {
            Alert.show(event.fault.message);
        }
        ]]>
    </mx:Script>
</mx:TitleWindow>

The first part of this view is a simple form with two text fields to contain the ID and the title of the item being edited or created, and a list of all todo items.

Then you have a control bar with all the buttons necessary to create, update and delete items.

The third part is the remote object that is used to call methods on the server. As you can see, it references the todoService destination and defines the three methods to save, delete and list items, with their corresponding result and fault handlers.

Finally, we have the ActionScript part that implements methods to call the server, result and fault handlers. As you can see, all those methods use the org.epseelon.samples.todolist.view.entity.TodoItem class, that is really an exact ActionScript mapping for the org.epseelon.samples.todolist.domain.TodoItem class on the server-side. Here it goes:

package org.epseelon.samples.todolist.view.entity
{
  [RemoteClass(alias="org.epseelon.samples.todolist.domain.TodoItem")]
  [Bindable]
  public class TodoItem
  {
    public var id:Number;
    public var title:String;
  }
}

Now what is really cool is that BlazeDS will automatically serialize into and deserialize from this class for us, so that we only have to manipulate this version in our client.

Compiling the Flex UI

Since our Flex UI defines a remote object that references our todoService destination, we need to compile index.mxml with a few additional parameters.

First, the compiler needs to know where it can find the services-config.xml file where todoService destination is defined. You can add a <services/> element to the flex-compiler-mojo configuration section. But here, we are going to use the default setting, which causes the plugin to look for a file named services-config in the module resources. And to avoid duplicating those files, we will just add our shared configuration module as a dependency of todolist-ria:

<dependency>
    <groupId>${project.groupId}</groupId>
    <artifactId>todolist-config</artifactId>
    <version>1.0-SNAPSHOT</version>
    <classifier>resources</classifier>
    <type>zip</type>
    <scope>provided</scope>
</dependency>

And in order to unpack the files in resources, add the following plugin configuration to todolist-ria/pom.xml:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-dependency-plugin</artifactId>
  <executions>
    <execution>
      <id>unpack-config</id>
      <goals>
        <goal>unpack-dependencies</goal>
      </goals>
      <phase>generate-resources</phase>
      <configuration>
        <outputDirectory>${project.build.directory}/generated-resources</outputDirectory>
        <includeArtifacIds>todolist-config</includeArtifacIds>
        <includeGroupIds>${project.groupId}</includeGroupIds>
        <excludeTransitive>true</excludeTransitive>
      </configuration>
    </execution>
  </executions>
</plugin>

Now we need to add target/generated-resources to default resources by adding the following section in build:

<resources>
  <resource>
    <directory>${basedir}/src/main/resources</directory>
  </resource>
  <resource>
    <directory>${basedir}/target/generated-resources</directory>
    <filtering>true</filtering>
  </resource>
</resources>

Last but not least, our remote object will send its AMF request messages to the same host and same port than the one on which the SWF is running. But we still need to specify the context root where the MessageBrokerServlet will receive those messages. This context root value will be used as a placeholder in the channel definition in services-config.xml. To specify a value for this parameter, all we have to do is to modify the configuration for the flex-compiler-mojo in todolist-ria/pom.xml:

<plugin>
  <groupId>info.rvin.mojo</groupId>
  <artifactId>flex-compiler-mojo</artifactId>
  <version>1.0-alpha7</version>
  <extensions>true</extensions>
  <configuration>
    <locales>
      <param>en_US</param>
    </locales>
    <contextRoot>todolist-web</contextRoot>
  </configuration>
</plugin>

By the way, you can notice that the value for the context root corresponds to the build/finalName parameter defined in todolist-web/pom.xml. Now you can run ‘mvn install’ on the whole project.

Note that by default, flex-compiler-mojo will look for the one mxml file in src/main/flex as the main application. If there are several mxml files there, it will take any file called main.as or main.mxml as the main application. And because Velo really understood that Maven is all about “convention over configuration”, you can also specify your own path for this main file using the ‘sourceFile’ configuration parameter. Ain’t that awesome?

Ready for the final steps?

Bundling the Flex UI into the web application

Now we need to include our Flex UI as a dependency in our web module. To do so, add the following dependency to todolist-web/pom.xml:

<dependency>
  <groupId>org.epseelon.samples</groupId>
  <artifactId>todolist-ria</artifactId>
  <version>1.0-SNAPSHOT</version>
  <type>swf</type>
</dependency>

Now if we want this dependency to be copied over to our web archive, we need to configure maven-dependency-plugin to do so. So you can add this execution to the maven-dependency-plugin configuration in todolist-web/pom.xml:

    <execution>
      <id>copy-swf</id>
      <phase>process-classes</phase>
      <goals>
        <goal>copy-dependencies</goal>
      </goals>
      <configuration>
        <outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
      <includeTypes>swf</includeTypes>
      </configuration>
    <execution>

There are still a few things we need to do, just to make it easier to access our application. First, edit todolist-web/src/main/webapp/index.jsp and put the following content:

<html lang="en">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<!--  BEGIN Browser History required section -->
<link rel="stylesheet" type="text/css" href="history/history.css" />
<!--  END Browser History required section -->

<title>Todo List</title>
<script src="AC_OETags.js" language="javascript"></script>

<!--  BEGIN Browser History required section -->
<script src="history/history.js" language="javascript"></script>
<!--  END Browser History required section -->

<style>
body { margin: 0px; overflow:hidden }
</style>
<script language="JavaScript" type="text/javascript">
<!--
// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = 9;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 28;
// -----------------------------------------------------------------------------
// -->
</script>
</head>

<body scroll="no">
<script language="JavaScript" type="text/javascript">
<!--
// Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
var hasProductInstall = DetectFlashVer(6, 0, 65);

// Version check based upon the values defined in globals
var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);

if ( hasProductInstall && !hasRequestedVersion ) {
// DO NOT MODIFY THE FOLLOWING FOUR LINES
// Location visited after installation is complete if installation is required
var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
var MMredirectURL = window.location;
document.title = document.title.slice(0, 47) + " - Flash Player Installation";
var MMdoctitle = document.title;

AC_FL_RunContent(
"src", "playerProductInstall",
"FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
"width", "100%",
"height", "100%",
"align", "middle",
"id", "index",
"quality", "high",
"bgcolor", "#869ca7",
"name", "index",
"allowScriptAccess","sameDomain",
"type", "application/x-shockwave-flash",
"pluginspage", "http://www.adobe.com/go/getflashplayer"
);
} else if (hasRequestedVersion) {
// if we've detected an acceptable version
// embed the Flash Content SWF when all tests are passed
AC_FL_RunContent(
"src", "todolist-ria-1.0-SNAPSHOT",
"width", "100%",
"height", "100%",
"align", "middle",
"id", "todolist-ria-1.0-SNAPSHOT",
"quality", "high",
"bgcolor", "#869ca7",
"name", "todolist-ria-1.0-SNAPSHOT",
"allowScriptAccess","sameDomain",
"type", "application/x-shockwave-flash",
"pluginspage", "http://www.adobe.com/go/getflashplayer"
);
} else {  // flash is too old or we can't detect the plugin
var alternateContent = 'Alternate HTML content should be placed here. '
+ 'This content requires the Adobe Flash Player. '
+ '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
document.write(alternateContent);  // insert non-flash content
}
// -->
</script>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
id="index" width="100%" height="100%"
codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
<param name="movie" value="index.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#869ca7" />
<param name="allowScriptAccess" value="sameDomain" />
<embed src="todolist-ria-1.0-SNAPSHOT.swf" quality="high" bgcolor="#869ca7"
width="100%" height="100%" name="index" align="middle"
play="true"
loop="false"
quality="high"
allowScriptAccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/go/getflashplayer">
</embed>
</object>
</noscript>
</body>
</html>

This code comes from the standard HTML template generated by Flex Builder and uses javascript to embed the SWF object into a traditional web page. Of course, we need to add the files this pages depends on. First download AC_OETags.js and copy it to todolist-web/src/main/webapp/AC_OETags.js.

Then download playerProductInstall.swf and put it in the same directory.

Lastly, download history.zip and unzip it in the same directory.

That’s it, now everything is ready. You can now run ‘mvn install’ for the last time, deploy todolist-web.war to JBoss or Tomcat, start your server and go to http://localhost:8080/todolist-web…
And it should work!

And because I’m a good boy, I’m even going to give you the final version of this project with everything inside. Enjoy!

Conclusion

This project setup certainly requires a bit of work, but in the end, set aside this small issue with configuration file duplication that should be fixed soon, it’s pretty clean, and flex-compiler-mojo works really great.

Now of course, we can add many things like flexunit tests, asdoc generation and so on, but for now, I just wanted to focus on the configuration needed for BlazeDS to work.

Now I’m waiting for your feedback, questions, suggestions, and I’ll probably edit those articles as it comes until it’s good enough to be published… somewhere else.

In the meantime, I’d like to thank Velo for providing this great plugin as well as the support I needed from him to write this tutorial.

Ready for comments? Shoot!


116 responses to “Flex, Spring and BlazeDS: the full stack! (Part 4) [updated]”

  1. Hi Sebastien,

    When we start talking about this article I had a bad opinion about spring. But, now I begin like it.

    Congratulations for the article, thanks for using flex-mojos and if you need any help on next 😉

    VELO

  2. Hi Sebastien,

    great tutorial just wondering if you can help me.

    I get

    [INFO] Loading configuration file C:todolisttodolisttodolist-riatargetconfig.xml
    [ERROR] C:todolisttodolisttodolist-riasrcmainflexindex.mxml:[4,-1] Could not resolve to a component implementation.

    when doing mvn install just before “Bundling the Flex UI into the web application”

    Im sure ive followed all the steps..any ideas…

  3. But i am getting this error while building it.
    258K downloaded
    [WARNING] *** CHECKSUM FAILED – Error retrieving checksum file for com/adobe/flex/sdk/rpc/3.0.0.3.0.0.477/
    rpc-3.0.0.3.0.0.477.swc – IGNORING
    [INFO] ————————————————————————
    [ERROR] BUILD ERROR
    [INFO] ————————————————————————
    [INFO] Failed to resolve artifact.

    Missing:
    ———-
    1) com.adobe.flex.sdk:rpc:resource-bundle:en_US:3.0.0.3.0.0.477

    Try downloading the file manually from the project website.

    Then, install it using the command:
    mvn install:install-file -DgroupId=com.adobe.flex.sdk -DartifactId=rpc -Dversion=3.0.0.3.0.0.477 -Dc
    lassifier=en_US -Dpackaging=resource-bundle -Dfile=/path/to/file

    Alternatively, if you host your own repository you can deploy the file there:
    mvn deploy:deploy-file -DgroupId=com.adobe.flex.sdk -DartifactId=rpc -Dversion=3.0.0.3.0.0.477 -Dcla
    ssifier=en_US -Dpackaging=resource-bundle -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

    Path to dependency:
    1) com.yomari.econvision:econvision-webapp:war:1.0-SNAPSHOT
    2) com.adobe.flex.sdk:rpc:resource-bundle:en_US:3.0.0.3.0.0.477

  4. Sebastian,

    Thanks for your help.

    yes I coped it from the final project archive and I still get the same error. I have checked the other files and all seem to match so Im not sure why I get a namespace error. Any suggestions?

    Dave

  5. sure …whats your email? Here is the error again. I get the same error when I take your source and use mvn install

    [INFO] Flex compiler configurations:
    -compiler.accessible=false
    -compiler.allow-source-path-overlap=false
    -compiler.as3=true
    -compiler.context-root todolist-web
    -compiler.debug=false
    -compiler.es=false
    -compiler.external-library-path=
    -compiler.fonts.local-fonts-snapshot C:Maventodolisttodolist-riatargetfonts.ser
    -compiler.include-libraries=
    -compiler.keep-generated-actionscript=false
    -compiler.library-path=
    -compiler.locale en_US
    -compiler.optimize=true
    -compiler.services C:Maventodolisttodolist-riasrcmainresourcesservices-config.xml
    -compiler.source-path C:Maventodolisttodolist-riasrcmainflex C:Maventodolisttodolist-riasrcmainresources
    -compiler.strict=true
    -compiler.theme=
    -compiler.verbose-stacktraces=false
    -load-config C:Maventodolisttodolist-riatargetconfig.xml
    -runtime-shared-libraries=
    -use-network=true
    [INFO] Loading configuration file C:Maventodolisttodolist-riatargetconfig.xml
    [ERROR] C:Maventodolisttodolist-riasrcmainflexindex.mxml:[5,-1] Could not resolve to a component implementation.

  6. Hi Sebastien,

    This series is great! It allowed me to get up and running with Maven/Java/Flex in such a short time.

    But I’m getting the same error as flexlover, where it cannot find the resource bundle (en_US). I can successfully do ‘mvn install’ from the parent folder. But if I do ‘mvn install’ under the todolist-web module, I get an error where it cannot find the resource bundle. Any suggestions?

    Thanks

  7. Here’s the result when I build from the todolist-web folder.

    Path to dependency:
    1) org.epseelon.samples:todolist-web:war:1.0-SNAPSHOT
    2) org.epseelon.samples:todolist-ria:swf:1.0-SNAPSHOT
    3) com.adobe.flex.sdk:rpc:resource-bundle:en_US:3.0.0.3.0.0.477

    ———-
    2 required artifacts are missing.

    for artifact:
    org.epseelon.samples:todolist-web:war:1.0-SNAPSHOT

    from the specified remote repositories:
    central (http://repo1.maven.org/maven2),
    flex-mojos-repository (http://flex-mojos.googlecode.com/svn/trunk/repository/),
    epseelon-repository (http://m2repo.epseelon.org/)

  8. Lorenzo, flexlover,

    I managed to reproduce your problem. I still don’t understand why building from todolist works and building from todolist-web fails, but it is not that important: when you build it from todolist, you get todolist-web.war in todolist-web/target, which is all you need. Because Maven builds in cascade. So don’t worry about the build failing in todolist-web. I’ll investigate, but don’t worry about it.

  9. Hi,

    To solve this problem, just need to add this on war:

    <build>
    <plugins>
    <plugin>
    <groupId>info.rvin.mojo</groupId>
    <artifactId>flex-compiler-mojo</artifactId>
    <extensions>true</extensions>
    </plugin>
    </plugins>
    </build>

    ok?

    VELO

  10. I get faultCode: InvokedFailed
    faultString: [MessagingError message=”Destination ‘todoService’ either does
    not exists or the destination has no channels
    defined (and the destination does not define any default channels.)’]’
    faultDetail: ‘Couldn’t establish a connection to ‘todoService”

    Any ideas, I deploy the full solution as downloaded

  11. By the way!

    What is the best way to autogenerate Value objects for both Java and ActionScript? Is there a Maven plugin to autogenerate that? Even better would be to have the full lifecycle from Hibernate XML files all the way so the VO for both Java and ActionScript.

    Cheers

  12. Magnus, are you certain that your application is started and loaded correctly? I’ll test the project attached to this article again and see if I can reproduce your problem.

  13. Magnus, Velo,
    About generation of value objects, there’s nothing in BlazeDS for it but if my memory is correct, there is a code generator in GraniteDS (an alternative to BlazeDS) to do just that. As far as I’m concerned, I’m using a more integrated approach with AndroMDA (http://www.andromda.org)

  14. Great stuff VELO I think it would be a good contribution.

    Sébastien Im gonna try again to see what Im doing wrong so I’ll get back to you on that.

    By the way has anyone tried the Hessian Flex port to compare speed compared to AMF?

  15. Sébastien I just tried with the download and I get the same error when I run it on JBoss default installation…hmmm something obvious Im missing?

    Magnus

  16. You’re right Magnus, there’s definitely something wrong with my project: it doesn’t work anymore. Thanks for the feedback. I’ll fix it and let you know.

  17. I got it!!! It seems that Maven and its plugins have a hard time keeping properties consistent over time. You see the resource specified in ${project.target.directory}/generated-resources? By default it’s supposed to resolve to target/generated-resources, where both services-config.xml and remoting-config.xml are copied from configuration module. Well, suddenly, it doesn’t resolve to that anymore, so services-config.xml is not found by the compiler and you get the error saying that the client cannot find todoService.

    Here is the solution. All you have to do is to replace the resources section in todolist-ria/pom.xml with the following one:

    
           <resources>
                <resource>
                    <directory>${basedir}/src/main/resources</directory>
                </resource>
                <resource>
                    <directory>${basedir}/target/generated-resources</directory>
                    <filtering>true</filtering>
                </resource>
            </resources>
    

    I’ll correct the article and the end project right away.

  18. Sebastien, great article. This is the technology stack I want to use, but what drove you to do this with 3 maven sub-projects? I went through your tutorial. It builds, deploys and works fine. I tried to collapse it into a single war project and keep running into one issue or another with the .swf or java classes not building. No errors, but not doing what I want. You *should* be able to be able to do the flex-compiler-mojo plugin along with other plugins. I have put together maven scripts with XDoclet and other code generating steps that all get incorporated into a war in a single pom.xml. Why is this different? Thank you.

    Fred

  19. I agree that it may seem a little bit too complicated for the task at hand but it all comes down to what Maven encourages in terms of best practices. One of the main principles of Maven is “one module, one package”. Here we have one module to compile and package an SWF, and a second to build and package a WAR. And since both of them use common configuration files, I’ve factored out those files in a third module. If we wanted to be even closer to best practices, we would have to split the web module into one to build java classes in a JAR, and another one to bundle everything in a WAR.

    Now why this principle, that’s another story. I think the idea is reusability, even though it would be hard to reuse our SWF in another context as the one of this web app.

    By the way, I tried the single module approach first but I ran into problems because Maven can only have one source directory by configuration, and having Java classes and Flex files to compile meant two different source directories with two compilers running.

    Anyways, it seems more cumbersome with three modules, but I think it’s a good compromise between modularity, maintainability and elegance. The only thing that is really annoying is the amount of configuration still necessary to import configuration files.

  20. AFIK, I can’t attach another compiler-plugin to war module.

    So, war module compile src/main/java with java-compiler, and, there is no way to say it to compile src/main/flex with flex-mojos.

    May be I’m wrong and there is a way. But I don’t know how.

    If anyone knows, let me know.

    VELO

  21. Sebastien, I have gone the route before of splitting classes into different .jar(s) and .war(s) inside an .ear. But rather than belabor the point, let us say I want to write an XDoclet2 plugin that generates Actionscript POFOs from Hibernate POJOs. There is already an XDoclet2 plugin that does this [http://xdoclet.codehaus.org/Actionscript+plugin], but it would probably have to be modified/copied to meet the requirements of BlazeDS. In the case of your tutorial, that would be the TodoItem class. Try to keep these mirrored classes in sync in a large project is an unnecessary pain in the butt. So now we have to run the XDoclet2 Maven plugin [http://xdoclet.codehaus.org/Maven2+plugin] within a new Java Maven module that has the .java source files, pack/copy/unpack the generated Actionscript files over to the todolist-ria module, build the .swf and then continue with the current pack/copy/unpack(s) of the .swf and configuration files. We also either need to .jar up the original .class files or install them in the local repo, or pack/copy/unpack them over to the .war. What if like yourself, I like .hbm.xml files instead of EJB3 annotations, but like to generate them with XDoclet? I have to either move those over as well, or .jar them up with the POJOs and hope my class loader du jour can find them in the .jar when the SessionFactory is constructed in the Spring context in a .war.

    It is a professional decision when KISS trumps the potential savings of reuse. I find having the entire source in one module, where my IDE (IDEA) can easily find usages and perform refactorings across Java, XML and Actionscript, and a flat single level deployment archive, simplifies development and eliminates class loader problems and overhead. If in the future, there are some set of classes which might be shared with another project or within modules, then I will refactor them out at that point.

    The problems I am running into getting this to run as a single module seem to be related to the need to specify a element. I am delving into mojo compiler code to try and determine out why it cannot figure out that the source directory for flex is src/main/flex given the standard Maven layout. It should not need the sourceDirectory element. I also want it to pickup a second source tree, say target/generated-sources-flex, in the event that I write an XDoclet2/BlazeDS plugin. Thank you again.

    Fred

  22. This project is by no means a production-ready project. It is merely a tutorial project to give some hints about how to glue things together. There is especially one thing that is not good in this project: TodoItem !

    IMHO, Hibernate entities should never ever be exposed to the presentation layer. There should always be a layer of abstraction (call it Value-Objects or Data-Transfer Objects) between business layer and presentation layer, such that Spring services manipulate Hibernate entities but only accept DTO’s as input or output. There are several excellent reasons for that approach, and if you want to know more, I suggest reading this.

    By the way, the reason why I wrote this article series was because I needed this stack in a much more advanced real-life project I’m working on. This project uses AndroMDA to generate most of the boilerplate code, including Hibernate entities and DTO’s from a UML model. And right now, I’m trying to write a new cartridge for AndroMDA to generate ActionScript mapped DTO’s based on the same model.

  23. Hi Frederick,

    Maven standard directory structure doesn’t preview any non java project.

    So, I adapt it to flex-mojos.

    Even if I look for sourcePath in other place, how to run flex-mojos on a project where packaging is war?

    VELO

  24. Hi,

    First of all thanks so much for such a nice article..

    I am able to build everything and i am able to generate the war File.

    Now when i deploy the war File i only see one .swf File which is generated by the xxx-ria sub project..

    How ever most of our applications will have multiple .swf files (one for eahc module) and we usually expect the user to type the URI ending in mxml. (Which are handled by the Flx

    As we configure the tomcat for this web app using the servlet mapping config info:

    FlexMxmlServlet
    *.mxml

    Now the ria app won’t copy any .mxml files into the war file..!!

    Do i need to add this capability in the web app to copy all the Flex Related files (.mxml and .as ) to the appropriate folder in the webapp ??

    Thanks
    sateesh

  25. As I said before, this project is by no means a production-ready project. Now if you want to customize it to handle MXML files via the Flex compiling servlet, it is perfectly feasible. But the layout of this project is probably not adapted for that. So if you manage to get it working, I’ll be happy to have a look.

  26. Not only AMAZING content IMO, but also so well written… A two year-old step-by-step guide about a quite complicated topic… You gotta become a teacher, seriously
    Thanks man, you’ve helped me to learn even maven and a little flex… =D
    Hope everything keeps going well with Lorelai… =P

    To VELO belo trabalho cara!

  27. Hi Sebastien,

    Thanks very much for this great tutorial.

    I just have a problem :
    I download your projet and when i run the mvn install, i’ve got this error :

    [INFO] ————————————————————————
    [ERROR] BUILD ERROR
    [INFO] ————————————————————————
    [INFO] Failed to resolve artifact.

    Missing:
    ———-
    1) com.adobe.blazeds:blazeds-common:jar:1.0

    ….

    2) com.adobe.blazeds:blazeds-core:jar:1.0

    ….

    3) com.adobe.blazeds:blazeds-remoting:jar:1.0

    ….

    ———-
    3 required artifacts are missing.

    for artifact:
    org.epseelon.samples:todolist-web:war:1.0-SNAPSHOT

    from the specified remote repositories:
    flex-mojos-repository (http://flex-mojos.googlecode.com/svn/trunk/repository/),
    epseelon-repository (http://m2repo.epseelon.org/),
    central (http://repo1.maven.org/maven2)

    thanks for your help 🙂

  28. Yep, sorry for that, I forgot to fix the final project, but there is a mistake in my todolist-ria/pom.xml. I won’t be able to fix it right now but you can do it: just replace 1.0 by 3.0.0.544 as the version number for blazeds-common, blazeds-core and blazeds-remoting dependencies.

  29. Hi,
    Thanks for a great write up.
    However, I downloaded the todolist2.zip to see the blaze libraries were missing in them. Could you tell me if it is possible to get them.

  30. Good point. Actually, I had deployed version 3.0.0.544 to my personal repository before because Adobe had only release 1.0-beta1 to the official repository. I didn’t know that 3.0 had been released there since. So I guess you can use those versions instead.

  31. Sebastien;
    Thanks so much for publishing this article. I’ve been looking for something like this for a while. I’ve even paid for such tutorials that have not even worked. This is the exact application stack I’ve been looking for. Thanks

    In you instructions where you delete Main.xml to index.xml I had a problem where the source was not recognized. It took me a while to find it. I change the name to index.mxml and my problem when away. Just wanted to give you some feedback.

  32. Hello Sebastien,

    I’m trying to develop an example using FlexMojos, BazeDS as your tutorial. But instead to generate a war, I use the tomcat maven plugin to directly run my application in the developement phase. But I have an error about the MessageBrocker Servlet, and services-config.xml file. May be you can help me. Here is the errors:

    [INFO] XML validation disabled
    **** MessageBrokerServlet failed to initialize due to runtime exception: flex.messaging.config.ConfigurationException: Please specify a valid ‘services.confi
    ation.file’ in web.xml. You specified ‘/WEB-INF/flex/services-config.xml’. This is not a valid file system path reachable via the app server and is also no
    path to a resource in your J2EE application archive.
    at flex.messaging.config.ServletResourceResolver.isAvailable(ServletResourceResolver.java:49)
    at flex.messaging.config.FlexConfigurationManager.setupConfigurationPathAndResolver(FlexConfigurationManager.java:202)
    at flex.messaging.config.FlexConfigurationManager.getMessagingConfiguration(FlexConfigurationManager.java:78)
    at flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:100)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
    at org.apache.catalina.startup.Embedded.start(Embedded.java:821)
    at org.codehaus.mojo.tomcat.AbstractRunMojo.startContainer(AbstractRunMojo.java:253)
    at org.codehaus.mojo.tomcat.AbstractRunMojo.execute(AbstractRunMojo.java:113)
    at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

    [INFO] Marking servlet MessageBrokerServlet as unavailable
    [ERROR] Servlet /samples-flex-blazeds-web threw load() exception
    javax.servlet.UnavailableException: Please specify a valid ‘services.configuration.file’ in web.xml. You specified ‘/WEB-INF/flex/services-config.xml’. Thi
    s not a valid file system path reachable via the app server and is also not a path to a resource in your J2EE application archive.
    at flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:163)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
    at org.apache.catalina.startup.Embedded.start(Embedded.java:821)
    at org.codehaus.mojo.tomcat.AbstractRunMojo.startContainer(AbstractRunMojo.java:253)
    at org.codehaus.mojo.tomcat.AbstractRunMojo.execute(AbstractRunMojo.java:113)
    at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:375) ……
    ………………………….

    Please help me
    dialloma

  33. Those configuration files are copied over to WEB-INF/flex when generate-resources phase is run. So make sure that your Tomcat server is started up after this phase. I’ve never used tomcat maven plugin so I don’t know when it’s run.

  34. Even, If I produce a WAR file, and deploy it in the installed Tomcat as your tutorial, My application cannot work.
    Do you have a idea. I send you my messaging-config.xml and services-config.xml configuration files:
    1)

    <!– Destination specific channel configuration can be defined if needed

    –>

    true
    .s

    2)

    Custom

    sampleusers

    <!– Uncomment the correct app server

    –>

    false

    true
    4

    true
    500

    5000

    [BlazeDS]
    false
    false
    true
    false

    Endpoint.*
    Service.*
    Configuration

    true
    20
    {context.root}/WEB-INF/flex/services-config.xml
    {context.root}/WEB-INF/flex/proxy-config.xml
    {context.root}/WEB-INF/flex/remoting-config.xml
    {context.root}/WEB-INF/flex/messaging-config.xml
    {context.root}/WEB-INF/web.xml

    Do you inspect an error in one or both files.
    Thank you in advance
    dialloma

  35. Ah sorry, I can’t post the XML file. But I have sended my application source code for you. Please, can you try to run it to see If you can expect an error ?

    Thank you
    dialloma

  36. Hi Sebastien,
    I took tips from your sample and am trying to develop a BlazeDS remoting app on my own. However, I have a slight problem that I cant seem to locate how to solve.
    Any tips are greatly appreciated. Here is the problem

    1. I have a eclipse java project that I have deployed in my tomcat container. This runs all my spring and hibernate code.
    2. I have an eclipse flex project that contains only Flex files.

    Now I want to connect these two and want my flex files to locate the destination that i have configured in remoting-config.xml and services-config.xml and deployed on server side.
    Any tips on this is greatly appreciated.

  37. Sorry about that but I’m not an expert at Eclipse at all. I’m one of those crazy guys ready to pay a few hundred bucks to get an intelligent IDE… :oP
    Anyone else can help?

  38. Again, great great demo/tutorial. Thanks!!!!!!

    Interesting point. I downloaded the solution you provided, and I had to mnually change the versions of the blazeDS libraries in the todolist-web pom.xml

    com.adobe.blazeds
    blazeds-common
    3.0.0.544

    com.adobe.blazeds
    blazeds-core
    3.0.0.544

    com.adobe.blazeds
    blazeds-remoting
    3.0.0.544

    I’m not sure which ones I should be using.

  39. Hi, great work, very useful article. However, i have issues when restarting jboss after copying todolist-web.war to my jboss deploy directory. Can you help?

    Here is the error from the IE browser:

    HTTP Status 404 – /todolist-web/

    type Status report

    message /todolist-web/

    description The requested resource (/todolist-web/) is not available.
    JBossWeb/2.0.0.GA_CP01

    Here are the errors in the jboss run log:

    16:46:03,743 ERROR [[/todolist-web]] Exception sending context initialized event to listener instanc
    e of class org.springframework.web.context.ContextLoaderListener^M
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘dataSource’
    defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Error setting property values;
    nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessEx
    ceptions (1) are:
    PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property ‘driverClas
    sName’ threw exception; nested exception is java.lang.IllegalStateException: Could not load JDBC dri
    ver class [com.mysql.jdbc.Driver]^M
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValue
    s(AbstractAutowireCapableBeanFactory.java:1243)^M

    16:46:03,743 ERROR [StandardContext] Context [/todolist-web] startup failed due to previous errors^M
    16:46:03,753 INFO [[/todolist-web]] Closing Spring root WebApplicationContext^M
    16:46:03,934 WARN [ServiceController] Problem starting service jboss.web.deployment:war=todolist-we
    b.war,id=-1905260413^M
    org.jboss.deployment.DeploymentException: URL file:/C:/Program Files/jboss/server/default/tmp/deploy
    /tmp35603todolist-web-exp.war/ deployment failed^M
    at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:379)^M
    at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)^M

    16:46:04,044 ERROR [MainDeployer] Could not start deployment: file:/C:/Program Files/jboss/server/de
    fault/deploy/todolist-web.war^M
    org.jboss.deployment.DeploymentException: URL file:/C:/Program Files/jboss/server/default/tmp/deploy
    /tmp35603todolist-web-exp.war/ deployment failed^M
    at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:379)^M
    at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)^M
    at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)^M
    at org.jboss.web.WebModule.startModule(WebModule.java:83)^M

  40. Hello Sébastien,

    I’m rather impressed with your series of posts…
    Any chance you could enlighten us on the usage of Datamanagement Services in the same manner?
    I myself am trying to create a project using mySQL, JPA, Spring and the liveCycle Datamanagement services with a Flex GUI…
    Yet I’m getting errors and I’m not really able to debug stuff (although I’m using Eclipse with the flex plugin…)

    in a very short version, the error I’m getting right now is:

    [ERROR]
    [RPC Fault faultString=”There was an unhandled failure on the server. javax/transaction/SystemException” faultCode=”Server.Processing” faultDetail=”null”]
    at mx.data::ConcreteDataService/http://www.adobe.com/2006/flex/mx/internal::dispatchFaultEvent()
    at DataListRequestResponder/fault()
    at mx.rpc::AsyncRequest/fault()
    at NetConnectionMessageResponder/statusHandler()
    at mx.messaging::MessageResponder/status()
    [END OF ERROR]

    Not sure if this is any indication on what I’m doing wrong but hey… it might help!

    Furthermore: I’m working in Brussels myself, so if you wanna talk more directly (mail or face-to-face) I’m more then willing to free up some time for that!

    regards,
    Pieter

  41. How can i compile this project using eclipse/Flex3-plugin to compile this project?? Can you tell me the settings? I have the following error: “Could not resolve to a component implementation.”

    Here is what I have done: I created a blend new Flex project and put the todolist-ria/main into the default src directory of the new project structure.

    Thanks.

  42. Did I miss anything from the instruction? How can i do it? Where can i find mysql-connector.jar?

  43. > Baztheman
    Re-read part 3, all the instructions are there.
    As for FlexBuilder, I don’t know and I don’t really have the time to help you on that right now. Sorry about that.

    > Pieter
    Frankly I’ve never used LCDS myself because I don’t need it for now.

  44. Sebastien,

    I re-read part 3 again. I put the mysql-connector-java-5.1.6.jar in C:jbossserverdefaultlib and still having the same issue. I also recompiled everything from the zip files in this page. Am i doing something wrong?

    I will try to read the part 3 again to see if i have missed anything. 🙁

    Thanks.

  45. Hi Sebastien,
    Thank you again for the great post
    We made an application based on your serie of tutorials
    Everything works fine when deploying on http://localhost:8080/alpha
    When deploying on our server http://www.mydomain.com/alpha the amf communication doesn’t seem to work anymore
    I think that i need to change
    url=”http://{server.name}:{server.port}/{context.root}/messagebroker/amf”
    in FLEX-RIA / services-config.xml
    Where does the application get server.name value and server.port value?
    How can i set up different values and how can i tell maven to package a set of value over another set of value?
    Thank you for your help
    Matt

  46. server.name and server.port cannot be customized. They always correspond to the same host and port the swf file resides on. That’s a security measure.

  47. Hi Sebastien
    Thanks for your reply
    This might not have anything to do with Flex
    But would you have any tip as why the communication is not working on http://www.mydomain.com/alpha and is working on localhost:8080/alpha
    How can i print to log file the value of server.name and server.port?
    Thank you

  48. Sebastien,
    I believe it is a bug in our application. Please discard my last post. Thank you

  49. Do you think my issue is related to the database login information in jdbc.properties? Here is the content of that file:

    jdbc.driverClassName=com.mysql.jdbc.Driver
    jdbc.url=jdbc:mysql://localhost:3306/todolist
    jdbc.username=xxx
    jdbc.password=yyy
    hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect

    Where “todolist” is the table created as instructed. xxx is the db username, and yyy is the db password.

  50. Ok, i changed the jdbc.properties files and recompiled the todolist-web.war but I am still having the same issue. The error from the log is exactly the same before. I am just running out of ideas. The db name, table name, username and password have been verified using Toad. Here is some additional information for the jboss server information:

    ===============================================================================^M
    ^M
    JBoss Bootstrap Environment^M
    ^M
    JBOSS_HOME: C:jboss^M
    ^M
    JAVA: C:Javajdk1.5.0_06binjava^M
    ^M
    JAVA_OPTS: -Denv.token=dev -Dprogram.name=run.bat -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 ^M
    ^M
    CLASSPATH: C:Javajdk1.5.0_06libtools.jar;C:jbossbinrun.jar;C:jbossserverdefaultlib^M
    ^M
    ===============================================================================^M
    ^M
    14:15:08,099 INFO [Server] Starting JBoss (MX MicroKernel)…^M
    14:15:08,099 INFO [Server] Release ID: JBoss [Trinity] 4.2.0.GA_CP01_JBPAPP-364 (build: SVNTag=JBoss_4_2_0_GA_CP01 date=200711150933)^M
    14:15:08,099 INFO [Server] Home Dir: C:jboss^M
    14:15:08,099 INFO [Server] Home URL: file:/C:/jboss/^M
    14:15:08,099 INFO [Server] Patch URL: null^M
    14:15:08,099 INFO [Server] Server Name: default^M
    14:15:08,099 INFO [Server] Server Home Dir: C:jbossserverdefault^M
    14:15:08,099 INFO [Server] Server Home URL: file:/C:/jboss/server/default/^M
    14:15:08,099 INFO [Server] Server Log Dir: C:jbossserverdefaultlog^M
    14:15:08,099 INFO [Server] Server Temp Dir: C:jbossserverdefaulttmp^M
    14:15:08,099 INFO [Server] Root Deployment Filename: jboss-service.xml^M
    14:15:08,365 INFO [ServerInfo] Java version: 1.5.0_06,Sun Microsystems Inc.^M
    14:15:08,365 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.5.0_06-b05,Sun Microsystems Inc.^M
    14:15:08,365 INFO [ServerInfo] OS-System: Windows XP 5.1,x86^M
    14:15:09,302 INFO [Server] Core system initialized^M

  51. I don’t see any error in this log. If it’s the same as before (java.lang.IllegalStateException: Could not load JDBC dri
    ver class [com.mysql.jdbc.Driver]), the only reason I see is JBoss not finding your JDBC connector on the classpath. Are you sure you put it in JBOSS_HOME/server/default/lib and you’re starting the default configuration?

    Because I don’t see any other possible reason.

  52. Thanks for replying.

    See the log that i sent in the last message. I attached the start of the jboss log. Here it is again:

    CLASSPATH: C:Javajdk1.5.0_06libtools.jar;C:jbossbinrun.jar;C:jbossserverdefaultlib

    I put mysql-connector-java-5.1.6.jar in C:jbossserverdefaultlib. So i think when jboss started, it should be in its classpath. Am i missing anything?

  53. Sebastien

    We build an appllication based on your great tutorial.

    It works on IE7 + flash9
    It doesn’t work on firefox. It hangs
    It displays an error message on Safari
    FAULT: faultCode:Client.Error.MessageSend faultString:’Send failed’ faultDetail:’Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: ‘http://www.alerts4all.com/alpha/messagebroker/amf”

    what is your cross browser experience with your prototype?

    Thank you for your help
    Matt

  54. Sebastien,
    Let me add an additional information to my unclear post
    With firefox, when accessing the app via http://www.mydomain.com, the flex will load but any request to the server will hang (I click on ‘login’ button and it hangs)
    With firefox still, everything works just fine when accessing the app with localhost http://localhost:8080….
    If i repeat the same steps with IE7, everything works fine whether it is localhost or mydomain
    That would be great if you could give me any tip!
    Thank you

  55. baztheman, could you send me your WAR package so that I can have a look (sebastien.arbogast@gmail.com)

    mattif, it works great on all browsers, even Safari and Firefox 3. And it’s normal because that’s one of the powers of Flash: provided that you have the latest version of the Flash plugin, you have no cross-browser issue whatsoever. So double-check that you have the latest version of the Flash plugin on all your browsers.

  56. Sebastien,

    Thanks for your response

    Yes agree with you that this is not a cross browser / compatibility issue
    For example: the app runs fine on all browsers @ http://localhost:8080/context
    However it loads but hangs/display an error when initiating a call to the server when running @ with http://www.mydomain.com/context

    FAULT: faultCode:Client.Error.MessageSend faultString:’Send failed’ faultDetail:’Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: ‘http://www.alerts4all.com/alpha/messagebroker/amf”

    So i think there are some security issues going on but i don’t really know where to start looking

    matt

  57. Sebastien

    The following post might be related to my problem
    http://verveguy.blogspot.com/
    Do you think it would be relevant to your prototype as well?
    If you wanted to add crossdomain.xm where would you add it in your prototype?
    Thank you

  58. Thanks for the article series and it works great with tomcat 5.5. A lot of great detail to get this whole stack working.

    I did have to change the change the versions of the blazeDS libraries. I also had to make sure the xalan related jars were in the tomcat classpath per the bug report http://bugs.adobe.com/jira/browse/FB-10765 to resolve the issue with loading the brokermessageservlet at startup (resulting in a fault when running the todolist webapp).

  59. Mattlf,

    I had the same fault which got resolved after I added the xalan related jars to the app servers classpath. Please check if you these jars (and refer to the link in my post above):

    serializer.jar
    xalan.jar
    xercesImpl.jar
    xml-apis.jar

  60. Hi Sebastian,
    great article.

    Everithing is working fine, but I have a question:

    How can I debug both the flex ria and the java part?

    I tryied using tomcat or jetty container but it doesn’t work.

    Please let me know.

    Many thanks

    Filippo

  61. Probably a trivial question, I followed most of the tutorial for the Spring/Flex/BlazeDS.
    How do I import the whole project into FlexBuilder3? Will it be able to handle it??
    Do I need other plugins?

    The tutorial showed everything to be done manually, but I would like to take advantage of FlexBuilder3.

  62. I’m not an Eclipse user myself so I’m always trying to create projects that build independently of any IDE. That’s why I use Maven to build this project. Unfortunately, Flex Builder offers no support for such projects yet. There is a way to create a new project and configure it so that the source folder is in src/main/flex and so on. But I don’t really have time to write a tutorial on that for the moment. Sorry.

  63. In response to comments 51 through 55: I ran into the same exception. The problem is that with the ‘install’ goal, running Maven produces a WAR file with the WEB-INF/flex/* files. However, the IDE’s “Run” operation uses a ‘deploy’ goal which sometimes doesn’t have the necessary dependencies to extract the files into WEB-INF/flex/* resulting in a WAR without them.

  64. In attempts to setup the java SpringFactory class(Jeff Vroom’s bridge), I am receiving compile errors.
    Also eclipse goes crazy and cannot find any of the package dependencies– leading to lots of eclipse syntax errors (all the other classes compile fine and eclipse is quiet)

    …controllerSpringFactory.java:[5,28] cannot find symbol
    symbol : class ConfigMap
    location: package flex.messaging.config

    …controllerSpringFactory.java:[15,36] cannot find symbol
    symbol : class ConfigMap
    location: class …controller.SpringFactory

    I have about 15 error messages of these missing resources (above is trimmed).

    Any thoughts or suggestions on where I can solve this would be much appreciated.

  65. What does this mean? It’s coming from the fault event when the application starts.

    ———————————————————————————————————————
    faultCode:Server.Processing faultString:’org.springframework.transaction.CannotCreateTransactionException : Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection’ faultDetail:’null’
    ———————————————————————————————————————

    Thank you for the knowledge.

  66. Great job!!! One issue I encountered though. I had a project that used Charts, but after switching to using your directions, my Chart no longer works. When I run maven install it fails on mx:PieChart and mx:LineChart. They are not recognized.

    When I originally created the project, I used the Eclipse with Flex IDE so Chart was not an issue. After I was able to get it working with the Spring Hibernate back end, as you illustrated above, I can no longer do the mvn thing via Eclipse on the project, I have to run mvn install from the command line.

    Do you, or anyone else, have any suggestions can share, please.

    Thanks

  67. Charting components are actually commercial products that are part of Flex Builder Professional edition. So when you built your project within Eclipse, you had your license automatically taken into account. Now that you build it with Maven, you need to input your serial number somewhere in your pom.xml so that the compiler can find it. I don’t know where it can be specified though. Maybe you can have more information on flex-mojos mailing list.

  68. I tried to post the details of this message here, but it won’t accept too much info. I posted the entire info on Adobe’s site under your blog there.

    I purchased the Pro version, loaded all the libs (jar, rb and swc) into my local repos, updated my Flex to 3.1.0, used the all versions of mojo compiler up to the latest flex-compiler-mojo, license.jar, then tried to build the project, but got the error message: “Could not resolve to a component implementation”

    However, if I use your dependencies (3.0.0.3.0.0.477) etc from your repos, it works fine, but Charting does not work. I understand why that does not work, license issue, so I know I have to use my own.

    Do you, or anyone reading, know why I might be getting the error message “Could not resolve to a component implementation”?

    I tried every idea I came up with and none work. NOTE: this is on the index.mxml file created above. I went as far as making it a simple basic mxml file without the call to the external file.

    Thanks

  69. I just noticed the error message did not display correct above : it is Could not resolve mx:Application to a component implementation

  70. Hi,

    I have one doubt.

    How to develop Spring and FLex project in the same Platform Like Ecipse. For example i have create a project (Name- sampleProject) in Eclipse using Sprnig Framework.Now i need to include flex into the same application. It is possible to integrate the flex page into the Same Spring Project.

  71. A.Rivera :
    What does this mean? It’s coming from the fault event when the application starts.
    ———————————————————————————————————————
    faultCode:Server.Processing faultString:’org.springframework.transaction.CannotCreateTransactionException : Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection’ faultDetail:’null’
    ———————————————————————————————————————
    Thank you for the knowledge.

    Hi Sébastien,
    Great series of articles. Thanks for that! Everything worked out but at the moment supreme… having the same error as mentioned above. Although I can see what is (not) happening, I don’t know to fix this. Any suggestion? Thanks in advance.

  72. @yagogak

    Well, I’m curious to see it working in flex 2 and 3. That is something I found problematic.

    Anyway, I’m glad they released a new version (after a months of inactivity). I saw the follow my idea of using flex-compiler-oem, it does prove that is not _that_ crazy.

    But I’m curious, why did you address your message to me?

    VELO

  73. Great article, got everything to build just fine. However I have a problem at runtime, the app does not show/run.

    I deployed the war to tomcat and when I go to the URL I get a blank screen. Now I did modify your app just slightly. I had no need for database so I removed db calls so this made the spring config really simple just one bean (todoService) to configure. I changed the name to sample instead of todolist in all cases so my url is http://localhost:8080/sample-web/.

    I have checked the swf and it runs fine on its own and there are no errors when starting/running tomcat.

    Any idea what would cause the flash app to not display in browser?

  74. I downloaded and built your todolist example with no problems either and this deployed and runs on tomcat with no problem.

    I am completely stumped why changing the name and not using a db would cause the app to not be displayed. There are several references to the swf file name in index.jsp but since I renamed all these to refer to the new name this should be good, right?

    What other hooks are there where these changes could be causing this problem?

    As I said, I’m completely stumped so any advice/suggestion is very welcome.

  75. You mention not including mysql-connector-java-5.1.6.jar as a dependency but rather manually putting this in the lib folder. How can this be automated? We really need to remove all manual steps, what are the options? Why not include as dependency?

  76. @Dave
    Because JDBC is not an application-specific library. Well, it rarely is anyway. Actually the best way to deal with it would be to share it the OSGi way. But in the meantime it’s just best practice to have JDBC part of your system environmen, that is your application server. And it’s not included in JBoss or Tomcat by default because it depends on your preferred database system.

  77. @Dave
    I don’t know exactly what you modified but the javascript that embeds the SWF in the HTML is tricky. The full name of the SWF is never mentioned. And there are references you must update, others that you shouldn’t touch. I don’t remember exactly and I don’t have the html template here. But you can can easily try and see by updating one reference at a time.
    As for the database reference, did you disable the transaction manager too? Because that’s what creates the Hibernate/JPA session and if you don’t disable those, you’re in trouble. The thing is that there are a lot of things that happen automagically with Spring 2, and I’m not always convinced it’s a good thing, especially for people who don’t understand how Spring works under the hood, it can be tricky.

  78. I only modified the jsp page as I think that is the only custom page. There are several places where it uses names like “sample-ria-1.0-SNAPSHOT”, this is what I modified. I think in one place it has the .swf extension.

    As for Spring, I commented out everything except:

    Perhaps it is a Spring problem, I don’t know the majic it does. I just deleted the entries that were db/transaction related as that seemed like the right thing to do.

    I did get your sample working with my changes when I started with your downloadable project, in this later case the db stuff is still there it just fails at runtime because I don’t have that db loaded.

    P.S. I would like to know what happened in the first attempt because I’m afraid if I don’t know the cause, it will happen again. But that might not be possible.
    Also, if I keep going with this approach I would like to automate the editing of the jsp page and perhaps all the static web files should be yet another maven module so it all gets added automatically.

  79. Oops, the blog tool stripped out my spring xml code, lets try it again.

    As for Spring, I commented out everything except:

  80. Hum, I don’t know how to post xml. So I’ll just say what I do in Spring.

    I have one bean id=todoService mapped to class=TodoServiceImpl. Everything else was commented out.

  81. if you have not resolved the issue with flex mojo’s with chart. there here is the solution:

    How to use charts or advanced datagrid?

    Is necessary to add data visualization dependencies:

    com.adobe.flex.sdk
    datavisualization
    3.0.0.3.0.0.477
    swc

    com.adobe.flex.sdk
    datavisualization
    3.0.0.3.0.0.477
    resource_bundle
    en_US

    [top]
    How to remove “Flex Charting Trial” water mark?

    In order to do that, you must have Charts license.

    Them, just add licenses configuration to your pom.xml, like this:

    info.rvin.mojo
    flex-compiler-mojo

    put-your-license-here

  82. Hello,

    I have build a webapp based on your tutorial. Unfortunately I overlooked that part where you said it is good only when we have one entity in the system. Now its too late and I have big problems with LazyInitializationException. I made Many-to-Many relationships in hibernate and there is a problem with sessions. Is it complicated to upgrade todolist app to use more then one entity? You said that it is possible to add everything later. Could you post more details?

    My webapp is a part of my master thesis and I really need it working. So if you could give me some tips it would be great. (I need to mention that it is my first webapp in this technologies so not everything id clear to me at once).

  83. Hello Sébastien,

    Thanks for this series of articles. I have successfully created a full project that includes Java and Flex.

    However, I am wondering now how to integrate this in Eclipse. I would like to be able to code and deploy in Eclipse.

    I checked Eclipse WTP tutorials, but they all recommend to create a Flex / J2EE project from scratch, and I can’t find anything on how to integrate a project with the structure we just built.

    Do you have an idea on how to accomplish this?

    Thanks for your posts,

    Sébastien

  84. Hi,

    I tried similar configuration is my machine for remote service but i am getting following exception

    [BlazeDS]MessageBroker failed to start: Exception: flex.messaging.config.ConfigurationException: Invalid scope setting for remoting destination ‘todoService’. Valid options are ‘request’, ‘session’, or ‘application’.
    at flex.messaging.FactoryInstance.setScope(FactoryInstance.java:85)
    at com.myservice.flexinterface.SpringFactory.createFactoryInstance(SpringFactory.java:26)

    Even i have added the scope in remote-config.xml as follows but the result is same.

    springfactory
    serviceclass
    session

    Can you help me to fix this error.

    Thanks,
    Prasad

  85. Hi All,

    I wonder if you can help me with an issue. I have been working through the example and getting an error

    [ERROR] G:workdirTestProjectstodolist-riasrcmainflexorgepseelonsamplestodolistviewscreenTodoForm.mxml:[33,-1] Definition org.epseelon.samples.todolist.view.entity:TodoItem could not be found.

    any idea how I can get this working?

    Thanks
    Abu

  86. faultCode:InvokeFailed faultString:'[MessagingError message=’Destination ‘todoService’ either does not exist or the destination has no channels defined (and the application does not define any default channels.)’]’ faultDetail:’Couldn’t establish a connection to ‘todoService”

  87. I am using bellow versions

    4.1.0.16076
    2.5.6
    3.2.6.ga
    1.5.0.M1
    4.0-beta-3
    1.6
    4.0.0.14931

    but i don’t know y am getting todoService’ either does not exist i have checked in both tomcat and jboss

  88. every thing good

    what is the difference between using a blazeds war file and implementing flexfactory.

    in this which will act as a controller

Leave a Reply

%d