Home  >  

Anatomy of an Enterprise Flex RIA Part 2: Running the Sample Code

Author photo
AddThis Social Bookmark Button
riaseries_part2.jpg
Last installment we looked at the tools we'll be discussing in this series. Now we're going to look at the sample code that uses those tools as a way to show Flex working in an enterprise setting.

To run the sample code you need to do a little preparation:


  1. 1. Create a database called bookie.

  2. 2. Unzip enterprise-flex-code.zip to a working directory.

  3. 3. Unzip m2_repository.zip and copy the contents into ${user.home}/.m2/repository.


Inside src is a directory for the main source of the project, called main. At the same level is a folder for test code, called test. The code goes in the main and test directories and is organized by the type of language—in this case, a java directory holds the Java code in the data project directory, and a java and flex directory in the web project.

On a Mac, this should be in /Users/<your username>/.m2. On Linux, this should be in /home/<your username>/.m2. On Windows, this will be in C:\Documents and Settings\<your username>\.m2.

Edit the properties files in the working directory for your system:

In /development.properties, change jboss.deploy.dir to point to the deploy directory of your JBoss installation.In /bookie-data edit jdbc.properties.mysql, set the username, password, and any other database-specific information to match your system’s. In /bookie-ui edit mxml.project.properties, change the flex.sdk.bin.dir to the directory containing the mxmlc compiler and deploy.dir to match your jboss deploy directory/bookie.ear/bookie.war.

Run maven build: At a command prompt in the root of your project, run `mvn package`.

Run ant deploy: At a command prompt in the root of your project, run `ant dev-deploy`.

  1. 1. Start JBoss.

  2. 2. Point your browser at http://localhost:8080/bookie.

  3. 3. Log in with card number 123456.

  4. 4. Try out the application!


Our Project: Bookie

Introducing Bookie

Our project is for an imaginary online book reservation application called Bookie. This application will be a self-service system for a hypothetical library. It will allow a user to log in with a library card number, search for books, and reserve them online so that by the time she gets to the library, the books will be ready for her to pick up.

It also allows library administrators to add and update information regarding authors and their books. While they’re working, they’ll also see automated notifications of new book reservations so that they can be prepared when a user shows up to get the book she reserved.

Use Cases

A use case, or user story, as mentioned earlier, describes the functionality we want our application to offer users. A use case highlights the functionality we need to include in our application, not just as raw functionality but also as proposed solutions to problems that users would like to have solved. You can think of a use case as a story that describes the way the user will use the application.

For instance:

“The user enters his shipping information, including state, and the system calculates the tax for that state."

Use cases don’t make technical demands explicitly, such as what kind of database schema to use or which language to use, nor do they use jargon or technical terms.

Table 1 and Table 2 list the use cases for Bookie. We’ll make them simple and condensed—simpler than they would be “in the wild"; just the titles, really. We have use cases that discuss both user and administrator stories.

Table 1: user Use Cases
USE CASE NAME DESCRIPTION
Sign InUsers will sign in to the application with their library card number. This is all the authentication we’ll do in this simple application, but it will be enough to identify a user against whom we can save data in the database.
Find by AuthorThe user will be able to find all the books by a certain author.
Find by SubjectThe user will be able to find all the books under a certain subject.
Find by Title The user will be able to search for books by the book’s title.
Browse Authors The user can browse a list of all authors.
Browse TitlesThe user can browse a list of all titles.
Browse Subjects The user can browse a list of all subjects.
Find Author The user can search for a specific author by name.
Find Subject The user can search for a subject by name.

Table 2: administrator Use Cases
USE CASE NAME DESCRIPTION
Create, Update, Delete Subjects Administrators can manage all the subjects in the system.
Create, Update, Delete Books Administrators can manage all the books in the system. This includes assigning the book, author, and subject.
Create, Update, Delete Authors Administrators can manage all the authors in the system.
Create, Update, Delete Users Administrators can manage all the users in the system.
Check Books Out Administrators can manage the outstanding reservations and mark them checked out as they’re picked up.
Check Books In Administrators can manage a list of checked out books, and check them in as they’re dropped off.


This is a nice, small project with just a few use cases, which should let us get a sense of the process and use the tools we’ve learned without dealing with a lot of technical details. Each section that follows discusses a “layer" of the application. The layers build from the database to the data model to the service interaction to the user interface of the application, giving you a chance to study the technology used at each layer.

Next installment we'll start to break the project down and show how we'll use Maven to automate the process of building the project's code. You can always find the entire series here.

Read more from Tony Hillerson. Tony Hillerson's Atom feed thillerson on Twitter

Comments

46 Comments

A little suggestion: it would be good to have a simple example of the command for the "1. Create a database called bookie." It would be very useful for the non-DBA specialists, who won't spend a lot of time working with DB, but just needs it to get application running.

Use cases explanation — very good and clear. I like how consistently you're putting the material in the learning stream, waiting for next parts.

Good point Rostislav. I find the easiest way to create a database once you have mysql installed is to run this command from a console: `mysqladmin -u create `. Others may want to install a graphical client like the one here: http://dev.mysql.com/downloads/gui-tools/5.0.html.

Two other notes, I'm trying to get the links to the example files up here, so stay tuned with that.

Also, there seems to have been some HTML issues with the Maven paths. They should be as follows:

Mac:
/Users/*user name*/.m2

Linux:
/home/*user name*/.m2

Windows:
C:\Documents and Settings\*user name*\.m2

Tony, thanks for the corrections, I'm following the series.

Martin said:

Tony,

when I run "mvn package", i get build error ("failed to resolve artifacts"):

Missing:
----------
1) microcontainer.jboss.ejb3:hibernate-all:jar:rc9
...
2) microcontainer.jboss.ejb3:jboss-ejb3-all:jar:rc9
...
3) microcontainer.jboss.ejb3:thirdparty-all:jar:rc9
...
4) org.apache.db.ddlutils:ddlutils:jar:1.0-SNAPSHOT
...
----------
4 required artifacts are missing.

for artifact:
lcds.examples.bookie:bookie-data:jar:1.0-SNAPSHOT

from the specified remote repositories:
central (http://repo1.maven.org/maven2)


I went to look for the first 3 files but could not find them at
http://repo1.maven.org/maven2/microcontainer/ where it tried to download them from.

I am new to maven so I really do not know how to resolve this. Any input will be appreciated! :)

thanks

Martin said:

AAaah :D

It is all good! hehe

I had not extracted m2_repository.zip correctly.

Cheers

Martin said:

Just to give heads up...

After many unsuccessful attempts I finally got the application to successfully build and deploy. It definitely was a learning, hands on experience. Thanks for the little challenge, Tony! :P

A few points:

First, I commented out line 22 (parallel>true) in code/bookie-data/pom.xml. It was throwing java exceptions for some reason...

Second, I commented out line 16 to 25 in code/bookie-data/src/test/resources/testng.xml. This disables the "Functional Tests" for unit testing that was giving off all kinds of errors and preventing the successful build. I just really wanted to build it at this point, nothing more! :P

Third, in the m2_repository.zip file there was a wrongly named directory: com/adobe/flex should be com/adobe/flex2 ...

Fourth, in code/bookie-ui/build.xml I had to append ".exe" to "mxmlc" like "${flex.sdk.bin.dir}/mxmlc.exe" (lines 33, 47 & 61). Maybe I didnt install the flex sdk right, dunno whats the deal (I am running win xp)..

Unfortunately, although the procedure populated my bookie database, compiled sources files and deployed the output to the jboss server, after opening http://localhost:8080/bookie/ and entering 123456 as card number the app popped up a msg saying "Unable to sign in"?! bleh...I looked at the jboss output and it said that it couldnt establsh database connection..

grr :(

Mauro said:

Followed Martin's suggestion and deployed succesfully, but when going to http://localhost:8080/bookie got the following error

Suggestions?

[MessagingError message='No service is configured to handle messages of type 'flex.data.messages.DataMessage'.']
at mx.messaging.config::ServerConfig$/getServiceIdForMessage()
at mx.data::Metadata()
at mx.data::ConcreteDataService()
at mx.data::ConcreteDataService$/getService()
at mx.data.mxml::DataService/set destination()
at lcds.examples.bookie.business::Services/_DataService1_i()
at lcds.examples.bookie.business::Services()
at index/_Services1_i()
at index()
at _index_mx_managers_SystemManager/create()
at mx.managers::SystemManager/initializeTopLevelWindow()
at mx.managers::SystemManager/docFrameHandler()

Martin said:

Finally, after digging deep..I managed to run the app successfully..jeje

What was missing was the jboss mysql connector. You can find info here:

http://wiki.jboss.org/wiki/Wiki.jsp?page=SetUpAMysqlDatasource

Also, do not set a password to the root account of the mysql server! I have not idea why this was messing things up but after removing the password even the Functional Unit Test seemed to run ok.

I am a total newbie regarding maven, mysql, and jboss but I got the application to run after sweating for a day! hurrah! :D

@Martin - that's good to hear. It sounds like I need some errata posted up here. Can you contact me at this email so I can figure out exactly what went wrong?

Giridhar said:

Excellet Article , Author gave the global insight into different flavours of technologies and how we can use these.

Hi Martin,

I could able to build and deploy the application on jboss , getting the same error "Unable to Sign In"

Could you please explain how you resovled the this issue ?

I have properly confgured the database connection ... Am I missing some thing ??

I will be waiting for the next part of the series....

Thanks,
Giridhar

Mihir said:

Can somebody help me?

I get the following error when issuing the 'mvn package' commnad

load-schema:
[ddlToDatabase] Read schema file C:\Eclipse\flex_projects\code\bookie-data\src\d
ata\schema.xml
[ddlToDatabase] Database platform MySQL does not support database creation via J
DBC or there was an error while creating it: Database
creation is not supported
for the database platform MySQL
Feb 9, 2008 8:03:11 PM org.apache.ddlutils.platform.PlatformImplBase evaluateBat
ch

I dont know enough about MySQL or the DDLUtils.

I also get a build failure error because the tests did not all pass. Anybody else getting the same issue?

Thanks.

John said:

@Mihir
checkout the bookie-data build file. looks like mysql is not supported, thus the error. It creates the schema just doesnt populate the data. I Havent dug any deeper.

@Mauro
Did you ever figure this out? I am getting the EXACT same error.

Martin said:

Folks, make sure your root mySQL account does not have password...this is how it is configured in the properties files in a few places. (you can try and find them all but that will be more tedious :P )

For the people getting the above error: Ignore it! :D The reason is that it tries to create a database called bookie but this is either not supported or since you created the bookie db already in the first step, it throws an error when seeing it exists, obviously.

Also, data is put in the database when running the tests so if you cant pass the tests your database will stay empty...

Hope I helped! :D

John said:

@Mauro

you need to have fds.swc under /frameworks/lib directory.

dont forget ds_rb.swc under /locale/en_US either.

ashok said:

i am getting the below error while building the package. I have installed log4j using maven, after I was getting the error, but it did not help. Did anybody else hit a similar issue?

============================================
[INFO] Building Bookie Example Data Project
[INFO] task-segment: [package]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [antrun:run {execution: ant-data-tasks}]
[INFO] Executing tasks

data-tasks:
[echo] Using Database at jdbc:mysql://localhost:3306/bookie

load-schema:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error executing ant tasks

Embedded error: The following error occurred while executing this line:
java.lang.NoClassDefFoundError: org/apache/log4j/Level
[INFO] ------------------------------------------------------------------------
[INFO] Trace
============================================

Steve said:

Ive been trying to get this to run for over a week now and keep getting the following. Has anyone resolved this?

[MessagingError message='No service is configured to handle messages of type 'flex.data.messages.DataMessage'.']
at mx.messaging.config::ServerConfig$/getServiceIdForMessage()
at mx.data::Metadata()
at mx.data::ConcreteDataService()
at mx.data::ConcreteDataService$/getService()
at mx.data.mxml::DataService/set destination()
at lcds.examples.bookie.business::Services/_DataService1_i()
at lcds.examples.bookie.business::Services()
at index/_Services1_i()
at index()
at _index_mx_managers_SystemManager/create()
at mx.managers::SystemManager/initializeTopLevelWindow()
at mx.managers::SystemManager/docFrameHandler()

ashok said:

I finally got my application to run. I had to make a few changes though.

1. Added the following line to build.xml under code\bookie-data.

Without this, the compile was failing, with the error in my previous post.

2. I had to provide the password for the mysql in jdbc.properties.mysql present under code\bookie-data.

3. Also followed Martin's advice(below) which i am pasting below
"
First, I commented out line 22 (parallel>true) in code/bookie-data/pom.xml. It was throwing java exceptions for some reason...
"

ashok said:

Hi Steve,
Do you have the below tools installed under your repository.
02/13/2008 09:38 PM flex-bootstrap
02/13/2008 09:38 PM flex-messaging
02/13/2008 09:38 PM flex-messaging-common
02/13/2008 09:38 PM flex-messaging-opt
02/13/2008 09:38 PM flex-messaging-req

I think you are missing the LiveCycle Data Services.

Cyrill said:

I've got the same problem like steve.

@ashok: do you mean the jar libraries in path C:\dev\tools\jboss\jboss-4.2.2.GA\server\default\deploy\bookie.ear\bookie.war\WEB-INF\lib ?

if yes.. i have those installed.

MC said:

is there a fix for this error? I've not been able to resovle.... it seems that lcds are setup ok.

[MessagingError message='No service is configured to handle messages of type 'flex.data.messages.DataMessage'.']
at mx.messaging.config::ServerConfig$/getServiceIdForMessage()
at mx.data::Metadata()
at mx.data::ConcreteDataService()
at mx.data::ConcreteDataService$/getService()
at mx.data.mxml::DataService/set destination()
at lcds.examples.bookie.business::Services/_DataService1_i()
at lcds.examples.bookie.business::Services()
at index/_Services1_i()
at index()
at _index_mx_managers_SystemManager/create()
at mx.managers::SystemManager/initializeTopLevelWindow()
at mx.managers::SystemManager/docFrameHandler()


Paul W said:

In case anyone got the Interface IBindingClient was not found error, you need to download the lastest flex sdk and copy the jars under lib directory in the zip and overwrite those in your flex sdk dir.

Paul W said:

Anybody got this error "That card number was not found"?

I query the books table and people table, and both row counts are zero, there must be a sql script somewhere that inserts the data...

@Paul W - Running the tests should leave the sample data in the database, is this not what you're seeing?

Paul W said:

Thanks Tony, whew! I finally got it working, what i found out was that, do not comment out the line 16 to 25 in code/bookie-data/src/test/resources/testng.xml, cos that have to do with inserting the data into the tables. And with that uncommented out, errors will be thrown becos i set a password for root login on mysql. so to reset the password, do a login to mysql, and do SET PASSWORD = PASSWORD('') to clear the root password, that will essentially fix all the problems.

Jboss is still throwing some exceptions, but i think those are related to jms queues table setup, which can be ignored i think.

Cyrill said:

I tried this tutorial a second time from 0 but at the end I received again the error:

[MessagingError message='No service is configured to handle messages of type 'flex.data.messages.DataMessage'.']

I have the all the flex jar files in the follwing 2 directories.

....jboss-4.2.2.GA\server\default\deploy\bookie.ear\bookie.war\WEB-INF\flex\jars
....jboss-4.2.2.GA\server\default\deploy\bookie.ear\bookie.war\WEB-INF\lib


Is this problem a jboss issue?.. Which JBoss version do you recommend?

Cyrill

Vol said:

"you need to have fds.swc under /frameworks/lib directory.

dont forget ds_rb.swc under /locale/en_US either."

But where to get them ?

Steve said:

With all the hoops and errors that everyone seems to have to address, why not update the article and files so everyone else new to the article won't have to fight their way through them???

Thanks to all who have posted various work arounds to the errors and incorrect files!

Steve Bick said:

This is ridiculous! I've spent way too much time trying to get the app just to compile.

I'm running into the same problem as above re:
IBindingClient was not found error

I have the release version of Flex SDK 3, verified the paths and jar files. I still get the error. Did something change from the beta version of Flex 3 to the release that would prevent this from compiling?

Roberto Cota said:

@Steve: I had the same problem, use the v2.0.1 SDK to compile. Change the mxml.project.properties file to point to the right SDK, mine is:

flex.sdk.bin.dir=C:/Program Files/Adobe/Flex Builder 3/sdks/2.0.1/bin

I agree with Steve, I'm having lots of problems, specifically with the "No service is configured to handle.." issue. I hit a wall on that one...

Hello; I am having a problem with mvn package; actually the problem is with the ant task "compile-index" that gets called by maven.

If I execute ant compile-index in the bookie-ui directory I get the following error message:

C:\Temp\FlexExample\code\bookie-ui\build.xml:33: Execute failed: java.io.IOException: CreateProcess: C:\tools\flex3\bin\mxmlc -context-root /bookie -load-config C:\Temp\FlexExample\code\bookie-ui\src\main\bookie.war\WEB-INF\flex\flex-config.xml -services C:\Temp\FlexExample\code\bookie-ui\src\main\bookie.war\WEB-INF\flex\services-config.xml index.mxml error=193


The mxmlc compiler is complaining about the index.mxml file.

Does nayone have any ideas?

christophe said:

Hello,

I manage to compile, test, package and deploy but when I try the url I have the same problem than some other :
[MessagingError message='No service is configured to handle messages of type 'flex.data.messages.DataMessage'.']
at mx.messaging.config::ServerConfig$/getServiceIdForMessage()
at mx.data::Metadata()
at mx.data::ConcreteDataService()
at mx.data::ConcreteDataService$/getService()
at mx.data.mxml::DataService/set destination()
at lcds.examples.bookie.business::Services/_DataService1_i()
at lcds.examples.bookie.business::Services()
at index/_Services1_i()
at index()
at _index_mx_managers_SystemManager/create()
at mx.managers::SystemManager/initializeTopLevelWindow()
at mx.managers::SystemManager/docFrameHandler()

Can you help me please ?

Roberto Cota said:

Looks like no one can help with this one....

jim jones said:

I'm having a problem.

The "mvn package" command seems to work fine... downloads a bunch of stuff.. but it fails at the end on the tests.

the directories created when I unzipped the repositories are (my userid is "administrator") are...

(there are 4 of them)
-----------------------------
C:\Documents and Settings\Administrator\.m2\repository\com
C:\Documents and Settings\Administrator\.m2\repository\org
C:\Documents and Settings\Administrator\.m2\repository\commons-betwixt
C:\Documents and Settings\Administrator\.m2\repository\microcontainer

what im noticing is that there is no EAR file that's been built so then of course the ANT build fails.. and there s nothing in the C:\projects\bookie-ear directory except for the pom.xml file.

Am I missing something?

the other thing is that I'm pointing to this location for my mxml compiler... C:/Program Files/Adobe/Flex Builder 3 Plug-in/sdks/3.0.0/bin

Mary said:

Hi,
I was able to build the project using Maven
I also was able to run and deploy it with Ant.

I am getting a STATUS 404 error when I type in http://localhost:8080/bookie into the browser. (The requested resource /bookie is not available.)

The JBoss App Server is up because the main JBoss page comes up.(http://localhost:8080)

Any suggestions are welcome. Thanks!

Mary

Giridhar said:

Hi Guys,

I guess every one can build this application using FLEX 2.01 COMPILER . its pretty straight.

But I want use the latest SDK Flex3, then I ran into lot of problems.

here is the right way to build with Flex3, If you use Flex3 sdk , you will certainly see this beatutiful error

"IBindingClient was not found error"

Now pl follow the bellow step if you want compile successfully,


1. download Lastes LCDS , i have downloaded the LCDS2.5.1 edtion.

2. I guess you alaredy downloaded the latest Flex3 SDK, if not download it and unzip it some where on the disk

doesnt matter where it is .

3. Now goto the folder where you have downloaded the enterprise-flex-code.zip,

I have unzipped in "enterprise-flex-code"

goto the folder where you have Flex3 SDK,
I have on "flex_sdk_3.0.0.477"
goto "flex_sdk_3.0.0.477\frameworks\libs"

copy flex.swc, framework.swc,, rpc.swc, utilities.swc files to below folder

enterprise-flex-code\code\bookie-ui\src\main\bookie.war\WEB-INF\flex\libs

4. Now you need fds.swc file , which you will find in LCDS2.5.1 installation.
To get this I have downloaded LCDS2.5.1
Now this is the time to goto the folder where LCDS2.5.1 instaled , I have on c:\lcds

you will find flex.war, deploy on jboss server , goto the tmp floder of jboss, you will find the file fds.swc

On my box, location is

jboss-4.2.2.GA\server\default\tmp\deploy\tmp1905flex-exp.war\WEB-INF\flex\libs

Now copy fds.swc to

enterprise-flex-code\code\bookie-ui\src\main\bookie.war\WEB-INF\flex\libs

5. you are good with fds, but if you compile now you get strange error locale issue "en_US"
To fix this, you need copy

framework_rb.swc, rpc_rb.swc from

"flex_sdk_3.0.0.477\frameworks\locale\en_US"

to

"enterprise-flex-code\code\bookie-ui\src\main\bookie.war\WEB-INF\flex\locale\en_US"

6. Now copy "fds_rb.swc" from

jboss-4.2.2.GA\server\default\tmp\deploy\tmp1905flex-exp.war\WEB-INF\flex\locale\en_US

to
enterprise-flex-code\code\bookie-ui\src\main\bookie.war\WEB-INF\flex\locale\en_US

You are all set now

6. JUST RUN "mvn package"

it will build successfully

thnks
Giridhar

Sal said:

Hi everyone!

My friend and I got the book and have been dealing for a while trying to find out how to get this bookie example working and as most people here our build fail after countless tries. We've got to the point of having almost everything installed (not without pain) although We are not Java pros unfortunately even though we are somewhat experienced in Flex/Flash, and... although on the bright side both of us never, never, never give up ;)

Now on our macmini running WINXP SP2 we have the following configuration (some stuff may be irrelevant here but we figured would be good to mention for completion's sake):
1) Maven 2.0.9,
2) Ant-1.7.0,
3) Embedded Jboss beta3,
4) Jboss 4.2.2.GA,
5) LCDS 2.6 Beta,
6) Flex 3 SDK,
7) Eclipse JEE Ganymede,
8) Adobe Flex Builder 3 Plugin for Eclipse (TRIAL),
9) JDK 1.5.0_15,
10) JRE 1.5.0_15 (why we have this I don't know :P since we installed 1.6.0_06)
11) JRE 1.6.0_06,
12) VisualSVN 1.5,
13) Apache 2.2.9,
14) MySQL 5.0.51b
15) MySQL gui-tools noinstall 5.0 r12
16) PHP 5.2.6,
17) FileZilla Server version 0.9.25 beta,

I guess we have all I need (and some more) to go through Tony's e-book, unfortunately we had no much luck until now.. partially for inexperience, and partially because the instructions are not exactly clear (to us at least). Several points are confusing...
To give you just one example of a confusing instance: in part 1 there is no mention about adding a Path in environment variables for mxmlc that's why when typing mxmlc --version in DOS prompt kept failing. To a seasoned programmer this may be a "Duh!", for us... not yet :)

Usually we keep going over everything, trying to get it right hoping not to hit a brick wall, but I guess and at this point we are facing a quite tall and thick brick wall :(.
It's good to see that even advanced users are having problem, we started to think we were the only once having problems with the building process ;P.

So after all the pain, and the days of reading all we could get our eyes on, we are still stuck with maven reporting a build failure, complaining about 5 missing dependencies:

1) com.adobe.flex2:flex-bootstrap:jar:2.0.1
2) com.adobe.flex2:flex-messaging:jar:2.0.1
3) com.adobe.flex2:flex-messaging-common:jar:2.0.1
4) com.adobe.flex2:flex-messaging-opt:jar:2.0.1
5) com.adobe.flex2:flex-messaging-req:jar:2.0.1

Our problem is that we do not know how to solve this missing dependencies being completelyu new to maven/ant and we do not know how to deploy LCDS to JBOSS (jsut copy the war file somewhere in the JBOSS folers, shouldn't some xml have info about that war file?)

If anyone has a pointer to help us move forward, we would really appreciate it... thank you everyone!

Best
Sal

Sal said:

Thanks for the help Giridhar, we followed the instruction to the T (we even removed LCDS 2.6 Beta2 and installed 2.5.1) but the build was still NOT successful and this is the 3rd week we are dealing with MR. Hillerson (who's MIA when it comes to helping about problems related to his book). We still get the same error where maven is reporting the error "Failed to resolve artifact" related to:

com.adobe.flex2:flex-bootstrap:jar:2.0.1
com.adobe.flex2:flex-messaging:jar:2.0.1
com.adobe.flex2:flex-messaging-common:jar:2.0.1
com.adobe.flex2:flex-messaging-opt:jar:2.0.1
com.adobe.flex2:flex-messaging-req:jar:2.0.1

If anyone has any info to get this example going please share it with the community. Would be much appreciated!
Thanks!

PS: we tried to do an mvn install: install file as the command line suggests in the reported failure below but did not work yielding to the Nth "build failure" report from maven.

This is the (almost) entire report from command line (if it helps):

Missing:
----------
1) com.adobe.flex2:flex-bootstrap:jar:2.0.1

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=com.adobe.flex2 -DartifactId=flex-bootstrap -Dversion=2.0.1 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.adobe.flex2 -DartifactId=flex-bootstrap -Dversion=2.0.1 -Dpackaging=jar -Dfile=/path/to/file -Dur
l=[url] -DrepositoryId=[id]

Path to dependency:
1) lcds.examples.bookie:bookie-ui:war:1.0-SNAPSHOT
2) com.adobe.flex2:flex-bootstrap:jar:2.0.1

2) com.adobe.flex2:flex-messaging:jar:2.0.1

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=com.adobe.flex2 -DartifactId=flex-messaging -Dversion=2.0.1 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.adobe.flex2 -DartifactId=flex-messaging -Dversion=2.0.1 -Dpackaging=jar -Dfile=/path/to/file -Dur
l=[url] -DrepositoryId=[id]

Path to dependency:
1) lcds.examples.bookie:bookie-ui:war:1.0-SNAPSHOT
2) com.adobe.flex2:flex-messaging:jar:2.0.1

3) com.adobe.flex2:flex-messaging-common:jar:2.0.1

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=com.adobe.flex2 -DartifactId=flex-messaging-common -Dversion=2.0.1 -Dpackaging=jar -Dfile=/path/to/
file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.adobe.flex2 -DartifactId=flex-messaging-common -Dversion=2.0.1 -Dpackaging=jar -Dfile=/path/to/fi
le -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) lcds.examples.bookie:bookie-ui:war:1.0-SNAPSHOT
2) com.adobe.flex2:flex-messaging-common:jar:2.0.1

4) com.adobe.flex2:flex-messaging-opt:jar:2.0.1

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=com.adobe.flex2 -DartifactId=flex-messaging-opt -Dversion=2.0.1 -Dpackaging=jar -Dfile=/path/to/fil
e

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.adobe.flex2 -DartifactId=flex-messaging-opt -Dversion=2.0.1 -Dpackaging=jar -Dfile=/path/to/file
-Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) lcds.examples.bookie:bookie-ui:war:1.0-SNAPSHOT
2) com.adobe.flex2:flex-messaging-opt:jar:2.0.1

5) com.adobe.flex2:flex-messaging-req:jar:2.0.1

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=com.adobe.flex2 -DartifactId=flex-messaging-req -Dversion=2.0.1 -Dpackaging=jar -Dfile=/path/to/fil
e

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.adobe.flex2 -DartifactId=flex-messaging-req -Dversion=2.0.1 -Dpackaging=jar -Dfile=/path/to/file
-Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) lcds.examples.bookie:bookie-ui:war:1.0-SNAPSHOT
2) com.adobe.flex2:flex-messaging-req:jar:2.0.1

----------
5 required artifacts are missing.

for artifact:
lcds.examples.bookie:bookie-ui:war:1.0-SNAPSHOT

from the specified remote repositories:
central (http://repo1.maven.org/maven2)


[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 25 seconds
[INFO] Finished at: Fri Jul 04 15:39:01 EDT 2008
[INFO] Final Memory: 14M/26M
[INFO] ------------------------------------------------------------------------

C:\projects\bookie\code>

Adam said:

To resolve the problems with missing the "com.adobe.flex2*" jars simply rename your maven repository directory ".m2\repository\com\adobe\flex" to ".m2\repository\com\adobe\flex2" as there is a mismatch between the directory in the project zip file and the bookie-ui/pom.xml

Adelbert said:

Still same problems (MessagingError ... DataMessage...)
that were mentioned above here.

Error msg: see below.

Even after solving the build issues
and putting fds.swc & fds_rb.swc at the right place

When putting the contents of src/flex
(index.mxml, lcds dir,etc.) at the web application
root, the flex web-tier compiler does his work
and the resulting index.swf works!

So it is a problem with the flex compiler phase
in the ant build.xml file.

Anyone who knows how to solve the build?

The issue must be with the build snippet shown below...

Regards,
Adelbert

error msg:
--------------
[MessagingError message='No service is configured to handle messages of type 'flex.data.messages.DataMessage'.']
at mx.messaging.config::ServerConfig$/getServiceIdForMessage()
at mx.data::Metadata()
at mx.data::ConcreteDataService()
at mx.data::ConcreteDataService$/getService()
at mx.data.mxml::DataService/set destination()
at lcds.examples.bookie.business::Services/_DataService1_i()

build snippet:
-------------------








Adelbert said:

the build snippet:


			
			
			
			
			
			
			
		
Silvano said:

Hello,

I'm having the unresolved problem of..

[MessagingError message='No service is configured to handle messages of type 'flex.data.messages.DataMessage'.']
at mx.messaging.config::ServerConfig$/getServiceIdForMessage()
at mx.data::Metadata()
at mx.data::ConcreteDataService()
at mx.data::ConcreteDataService$/getService()
at mx.data.mxml::DataService/set destination()
at lcds.examples.bookie.business::Services/_DataService1_i()
at lcds.examples.bookie.business::Services()
at index/_Services1_i()
at index()
at _index_mx_managers_SystemManager/create()
at mx.managers::SystemManager/initializeTopLevelWindow()
at mx.managers::SystemManager/docFrameHandler()

Can somebody help ?

Austin Dimmer said:

Hi Guys, I seem to get a new error! If anyone has any suggestions as to what to try, I would be much obliged!

-------------------------------------------------------------------------------
Test set: TestSuite
-------------------------------------------------------------------------------
Tests run: 16, Failures: 1, Errors: 0, Skipped: 15, Time elapsed: 3.16 sec startEmbeddedJBoss(lcds.examples.bookie.entity.TestCrud) Time elapsed: 0 sec java.lang.RuntimeException: java.util.zip.ZipException: The system cannot find the path specified
at org.jboss.util.file.JarArchiveBrowser.(JarArchiveBrowser.java:55)
at org.jboss.util.file.ArchiveBrowser.getBrowser(ArchiveBrowser.java:52)
at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:370)
at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:350)
at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:305)
at org.jboss.ejb3.embedded.EJB3StandaloneDeployer.create(EJB3StandaloneDeployer.java:440)
at lcds.examples.bookie.BaseEJBTest.startEmbeddedJBoss(BaseEJBTest.java:32)
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:585)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:552)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:322)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:156)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:223)
at org.testng.SuiteRunner.run(SuiteRunner.java:145)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
at org.testng.TestNG.run(TestNG.java:613)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:74)
at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
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:585)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
Caused by: java.util.zip.ZipException: The system cannot find the path specified
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:203)
at java.util.zip.ZipFile.(ZipFile.java:234)
at org.jboss.util.file.JarArchiveBrowser.(JarArchiveBrowser.java:50)
... 27 more

rico said:

If I try to load the URL http://localhost:8080/bookie the swf file doesn't load completely. I see only the flex preloader and then the site hang up. JBoss is running correctly. I can successful connect to the mysql bookie db. If I call the swf file directly with the url file:///D:/Tools/jboss/server/default/deploy/bookie.ear/bookie.war/index.html or .../admin.html I see the correct flex-ui and the admin call shows the correctly filled db tables. But I can't log in. I think something is wrong with the folder hierarchie under the jboss deploy path. The JBoss server logs are fine. Here are my two property configuration files:

mxml.project.properties
flex.sdk.bin.dir=D:/Adobe/Flex Builder 2 Plug-in/Flex SDK 2/bin
deploy.dir=D:/Tools/jboss/server/default/deploy/bookie.ear/bookie.war/

and in

development.properties
jboss.deploy.dir=D:/Tools/jboss/server/default/deploy

What is wrong?

rico said:

If I try to load the URL http://localhost:8080/bookie the swf file doesn't load completely. I see only the flex preloader and then the site hang up. JBoss is running correctly. I can successful connect to the mysql bookie db. If I call the swf file directly with the url file:///D:/Tools/jboss/server/default/deploy/bookie.ear/bookie.war/index.html or .../admin.html I see the correct flex-ui and the admin call shows the correctly filled db tables. But I can't log in. I think something is wrong with the folder hierarchie under the jboss deploy path. The JBoss server logs are fine. Here are my two property configuration files:

mxml.project.properties
flex.sdk.bin.dir=D:/Adobe/Flex Builder 2 Plug-in/Flex SDK 2/bin
deploy.dir=D:/Tools/jboss/server/default/deploy/bookie.ear/bookie.war/

and in

development.properties
jboss.deploy.dir=D:/Tools/jboss/server/default/deploy

What is wrong?

H said:

Hello everyone,I bought this e-book a week ago. As everyone, Ive been struggling with the project setup.

The above answers were very helpful. Unfortunately as I solve problems, new ones keep popping up. I dont know if anyone had got this error yet.

Its concerning a flex-config file unable to open en-CA from locale .

Toni??? any ideas?anyone?

charles said:

@rico
I also got the blank app, and to resolve it I use the flex3 sdk and updated the libs in the bookie app (see directions above). I had originally taken the easier path of using flex2, but I think lcds 2.51 needs flex 3

Although sometimes a bit terse, all the steps needed to resolve problems I encountered where in the comments here (thanks all!). I suggest tackling them one by one and you should get through it fine.

hth
charles

Leave a comment


Tag Cloud

Question of the Week: Open Source Flex Projects

What would you say are the 5 most prominent open source projects in the Flex world?

Answer

Latest Features

Recommended for You

@InsideRIA on Twitter

Archives

  • Or, visit our complete archive.  

About This Site

Welcome to the premiere community site for all things RIA sponsored by O'Reilly Media and Adobe Systems Incorporated.