One question that developers often ask when they see Flex for the first time is: “how do I write a database application?”
The answer to this question is typically: You use an HTTPService, WebService, or RemoteObject to connect to a server-side component that provides an API to manipulate your data. This approach provides infinite possibilities, but it makes the assumption that you already have that entire backend infrastructure in place. If you don’t, and all you want to do is build a rapid prototype or a simple application, this might look like a lot of work.
In addition to the RPC services mentioned above, the Flex Data Management Services (FDMS) provide a virtually code-free approach to synchronize data between the client application and the middle-tier. That takes care of 50% of our challenge: no data synchronization code to write at the client-side.
FDMS also provides a pluggable adapter and assembler architecture to handle changes at the server-side. As an example of writing a generic assembler, I built a simple JDBC assembler that allows you to develop rapid prototypes and basic database-driven applications without writing a single line of server-side code. All you need to do is specify the database connection information and the table you want to work with in data-management-config.xml.
This assembler is by no means a full featured solution, but it shows the power and flexibility of the FDMS architecture: you could easily extend its capabilities, or build other generic assemblers for existing persistence solutions (a Hibernate assembler is already shipping with the product).
The point is that if FDMS provides a solid architecture to handle the most complex persistence scenarios (with virtually no data synchronization code at the client side), with the addition of specialized assemblers, it can also provide simple solutions to simple use cases, significantly improve your productivity, and deliver end-to-end code-free persistence.
Installing the SimpleJDBCAssembler:
To use the SimpleJDBCAssembler, you need to install the Flex Data Services. If you haven’t already done so, you can download the Flex Data Services here, and follow the installation instructions.
Download jdbcassembler.zip here and expand it in your root directory (the files will be unzipped in a directory called jdbcassembler)
Copy SimpleJDBCAssembler.class in {context-root}\WEB-INF\classes\flex\samples\assemblers. For example, if you installed the integrated server, copy SimpleJDBCAssembler.class in \fds\jrun4\servers\default\samples\WEB-INF\classes\flex\samples\assemblers.
Running the sample application:
Copy the \jdbcdemo directory in the context root of your web application. For example, if you installed the integrated server, copy the \jdbcdemo directory in \fds\jrun4\servers\default\samples.
Open {context-root}\WEB-INF\flex\data-management-config.xml and add the following destination:
This example uses an embedded HSQLDB database. Make sure hsqldb.jar is available in the classpath of your web application. For example in {context-root}\WEB-INF\lib. If you are using another database, make sure the JDBC driver for that database is in the classpath of your web application.
Start the server
Access http://localhost:8700/samples/jdbcdemo/simpleclient.mxml. (Change the port number and the context root as appropriate). This is a basic client built with just a few lines of code. You can edit the data inside the datagrid.
Access http://localhost:8700/samples/jdbcdemo/app.mxml. (Change the port number and the context root as appropriate). This is a slightly more sophisticated client. You edit data in a separate form.
Also notice that changes are pushed in real time to all the clients connected to a destination. For example, open the application in two browser sessions, change some data in one session, and notice that the changes are automatically pushed to the second session.
But I’m getting a SQL table not found exception. Here goes the stack trace:
java.sql.SQLException: Table not found in statement [SELECT * FROM product]
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source)
at org.hsqldb.jdbc.jdbcStatement.executeQuery(Unknown Source)
at flex.samples.assemblers.SimpleJDBCAssembler.fill(SimpleJDBCAssembler.
java:82)
at
I would appreciate if you can help me. Thanks again!
Beck,
In data-management-config.xml can you specify
jdbc:hsqldb:/jdbcassembler/db/flexdemo for the database URL? Let me know how that works.
Thanks,
Christophe
Did you unzip jdbcassembler in your root directory? Basically the jdbc URL is a path to your database (flexdemo.script). So jdbc:hsqldb:/jdbcassembler/db/flexdemo assumes that you have the fully populated flexdemo.script in :\jdbcassembler\db\flexdemo.
I too could not get the hsqldb going (I could if I used a absolute path eg: c:\…etc. So i ported it to MySQL. Anyone else doing this or planning to use this great assembler with MySQL a word of advice, I found a little got ya. When you specify the connection string in data-managent.config be sure to use & instead of & when specifying you url eg:
jdbc:mysql://localhost/flexdemo?user=flexdemo&password=flexdemo
instead of
jdbc:mysql://localhost/flexdemo?user=flexdemo&password=flexdemo
otherwise you will get a unfriendly message like:
Configuration error encountered on line 230, column 72: ‘The reference to entity “password” must end with the ‘;’ delimiter.’
[RPC Fault faultString="No destination 'jdbc-product' exists in service flex.data.DataService" 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/NetConnectionChannel.as$33:NetConnectionMessageResponder::statusHandler()
at mx.messaging::MessageResponder/status()
Hi
Get the above error when I start the application
can you please help,I am new to this stuff
thanks
girish
Christophe – awesome example! I have replicated the product table in Oracle and tried to modify the data-management-config.xml but am getting Channel.Connect.Failure.
hi..
i found ur sample interesting but can u revert me or post an sample program for connecting flex with oracle table as i am finding it very difficult to get the solution for this.
its a good example. but could you help me with this exception that i get on load??
[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error undefined url:'rtmp://localhost:2037'"]
at mx.data::ConcreteDataService/http://www.adobe.com/2006/flex/mx/internal::dispatchFaultEvent()
at ::DataListRequestResponder/fault()
at mx.rpc::AsyncRequest/fault()
at mx.messaging::ChannelSet/::faultPendingSends()
at mx.messaging::ChannelSet/channelFaultHandler()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.messaging::Channel/mx.messaging:Channel::connectFailed()
at mx.messaging.channels::PollingChannel/mx.messaging.channels:PollingChannel::connectFailed()
at mx.messaging.channels::RTMPChannel/mx.messaging.channels:RTMPChannel::statusHandler()
Hi Christophe,
I stumbled upon this blog when I was trying to find a solution to an error i’m encountering while using FDS.
Basically i’m modifying the Contact Manager FDS sample to use a ready SQL database but just replacing the MSAccess database with SQL DB throws a wierd error.
I can get my ArrayCollection populated with data from the SQL server but each object is empty.
My Java wrapper lists all the objects correctly before passing to Flex but somewhere they just break and come in Flex as empty objects.
This only happens when using an SQL DB and not with an MS Access DB…everything else stays the same.
The exact error it throws is
The fill method with parameters ‘[Ljava.lang.Object;’ and destination ‘contacts’ returned null.
Arunkumar…
I had the same problem. I solved it by creating the directory path exactly as specified: for example, mine is:
\fds2\jrun4\servers\default\samples\WEB-INF\classes\flex\samples\assemblers
(note that I needed to add a “flex” directory with “samples” and “assemblers” subdirectories)
After restarting the Integrated Flex Server, it worked.
How to connect to MS-SQL database and to retrive data ie a row and display it in the flex application please provide the code for the java dao and the flex part.
Hi
I am getting following error. I am using Mysql as database and Jrun as application server.
Could you please let me know How do I resolve these errors
[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error undefined url:'rtmp://localhost:2037'"]
at mx.data::ConcreteDataService/http://www.adobe.com/2006/flex/mx/internal::dispatchFaultEvent()
at ::DataListRequestResponder/fault()
at mx.rpc::AsyncRequest/fault()
at mx.messaging::ChannelSet/::faultPendingSends()
at mx.messaging::ChannelSet/channelFaultHandler()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.messaging::Channel/mx.messaging:Channel::connectFailed()
at mx.messaging.channels::PollingChannel/mx.messaging.channels:PollingChannel::connectFailed()
at mx.messaging.channels::RTMPChannel/mx.messaging.channels:RTMPChannel::statusHandler()
hi
Plz send me sample examples of database connectivity with oracle/db2 using flex>also send me the steps for connectivity and the required components like data service
my email shrinivas.sontakke@gmail.com
hi
Plz send me sample examples of database connectivity with oracle/db2 using flex>also send me the steps for connectivity and the required components like data service asap so that it will help me a lot
my email anitha.govindaswamy@wipro.com
08/06 11:07:38 user MessageBrokerServlet: init
08/06 11:07:39 error Could not pre-load servlet: MessageBrokerServlet[1]flex.messaging.MessageException: Cannot create class of type ‘test.SampleServ
ice’. Type ‘test.SampleService’ not found.
at flex.messaging.util.ClassUtil.createClass(ClassUtil.java:57)
at flex.messaging.factories.JavaFactory$JavaFactoryInstance.getInstanceClass(JavaFactory.java:244)
at flex.messaging.factories.JavaFactory$JavaFactoryInstance.createInstance(JavaFactory.java:251)
at flex.messaging.factories.JavaFactory.createFactoryInstance(JavaFactory.java:93)
at flex.messaging.FactoryDestination.getFactoryInstance(FactoryDestination.java:76)
at flex.messaging.services.remoting.adapters.JavaAdapter.validateInstanceSettings(JavaAdapter.java:254)
at flex.messaging.services.remoting.adapters.JavaAdapter.initialize(JavaAdapter.java:99)
at flex.messaging.services.AbstractService.start(AbstractService.java:206)
at flex.messaging.MessageBroker.startServices(MessageBroker.java:503)
at flex.messaging.MessageBroker.start(MessageBroker.java:181)
at flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:107)
at jrun.servlet.WebApplicationService.loadServlet(WebApplicationService.java:1200)
at jrun.servlet.WebApplicationService.preloadServlets(WebApplicationService.java:791)
at jrun.servlet.WebApplicationService.postStart(WebApplicationService.java:293)
at jrun.deployment.DeployerService.initModules(DeployerService.java:711)
at jrun.deployment.DeployerService.createWatchedDeployment(DeployerService.java:242)
at jrun.deployment.DeployerService.deploy(DeployerService.java:430)
at jrun.deployment.DeployerService.checkWatchedDirectories(DeployerService.java:179)
at jrun.deployment.DeployerService.run(DeployerService.java:891)
at jrunx.scheduler.SchedulerService.invokeRunnable(SchedulerService.java:230)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
[0]flex.messaging.config.ConfigurationException: Error instantiating application scoped instance of type ‘test.SampleService’ for destination ‘sampleService’.
at flex.messaging.factories.JavaFactory.createFactoryInstance(JavaFactory.java:117)
at flex.messaging.FactoryDestination.getFactoryInstance(FactoryDestination.java:76)
at flex.messaging.services.remoting.adapters.JavaAdapter.validateInstanceSettings(JavaAdapter.java:254)
at flex.messaging.services.remoting.adapters.JavaAdapter.initialize(JavaAdapter.java:99)
at flex.messaging.services.AbstractService.start(AbstractService.java:206)
at flex.messaging.MessageBroker.startServices(MessageBroker.java:503)
at flex.messaging.MessageBroker.start(MessageBroker.java:181)
at flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:107)
at jrun.servlet.WebApplicationService.loadServlet(WebApplicationService.java:1200)
at jrun.servlet.WebApplicationService.preloadServlets(WebApplicationService.java:791)
at jrun.servlet.WebApplicationService.postStart(WebApplicationService.java:293)
at jrun.deployment.DeployerService.initModules(DeployerService.java:711)
at jrun.deployment.DeployerService.createWatchedDeployment(DeployerService.java:242)
at jrun.deployment.DeployerService.deploy(DeployerService.java:430)
at jrun.deployment.DeployerService.checkWatchedDirectories(DeployerService.java:179)
at jrun.deployment.DeployerService.run(DeployerService.java:891)
at jrunx.scheduler.SchedulerService.invokeRunnable(SchedulerService.java:230)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
08/06 11:07:39 user FlexSwfServlet: init
08/06 11:07:39 user FlexInternalServlet: init
Any solution for the above problems?
Iam facing this problem when i use RPC.
Hi Guys there could anyone help us(Arunkumar, Vinay, Karthik and myself) with a solution to solve “Channel.Connect.Failed” error. I am working on a crucial prototyping with short deadline. Given below are the steps I have followed installing
1. Install WTP 1.5.3(Eclipse)
2. Install Flex Builder 2.0 Plugin
3. Install Flex Builder 2.0.1 Update
4. Install Flex Builder 2 Hotfix 2
5. Update Flex Builder with Hotfix 3
6. Install Peter Martin FDS Plugin
7. Configure WTP VM param
8. Installation of LCDS 2.5
8. Configure LCDS in WTP
9. Configure Tomcat in WTP
10. Create a sample LCDS Project
Hi Guys there could anyone help us(Arunkumar, Vinay, Karthik and myself) with a solution to solve “Channel.Connect.Failed” error. I am working on a crucial prototyping with short deadline. Given below are the steps I have followed installing
1. Install WTP 1.5.3(Eclipse)
2. Install Flex Builder 2.0 Plugin
3. Install Flex Builder 2.0.1 Update
4. Install Flex Builder 2 Hotfix 2
5. Update Flex Builder with Hotfix 3
6. Install Peter Martin FDS Plugin
7. Configure WTP VM param
8. Installation of LCDS 2.5
8. Configure LCDS in WTP
9. Configure Tomcat in WTP
10. Create a sample LCDS Project
I am just trying to work on a sample application using Eclipse,Flex Builder Plugin,LCDS 2.5 and Tomcat.
Can anyone provide a PDF or Link which can guide me through steps
I am just trying to work on a sample application using Eclipse,Flex Builder Plugin,LCDS 2.5 and Tomcat using MYSQL as database.
Can anyone provide a PDF or Link which can guide me through steps
Now that FDS have been rolled into LiveCycle Data Services, AND that AIR/Flex 3 is in beta, it would be great to have an update to this article/primer on db connectivity w/Flex. If a more current article exists, could someone point me to it?
Channel.Connect.Failed
I was getting this error, that was because I didn’t extract the .zip on c:\, then the database was on the wrong place.
If you see the data-management-config.xml in the database section we had the following line:
jdbc:hsqldb:/jdbcassembler/db/flexdemo
/jdbcassembler/db/flexdemo -> it’s the path to the database, and the base path is c:\ in windows (note that this path is NOT relative to the CONTEXT ROOT!!), you can adjust this to another directory if you wish.
I have also tested with the fds-tomcat instead of jrun4 sucessfully.
i am getting the following error when i acces my application on live ip
[RPC Fault faultString=”Send failed” faultCode=”Client.Error.MessageSend” faultDetail=”Channel.Connect.Failed error undefined url:’rtmp://203.215.163.72:8080:2037′”]
while my application is working properly on LAN our internal loacal ips like 192.168.200.24 i can access that properly. Can any body tell my if there is any settings in XML or any secuirty policy
Is there any “simple” way to get notified (and the clients updated) when the data changes in the datasource? Example: I have FLEX client app opened in 3 different machines. When data is changed in the (editable) datagrid, Livecycle DS takes care of updating the clients. Datasource is MS SQL server table. Now, if I change the data directly on that SQL table, nothing happens in the FLEX apps. This is important in environments where different technologies (not only Flex apps) interact with a data source. In my case we have a few different financial applications dealing with different sets of data. Any clue on how to deal with that? Updating the clients when changes in the SQL table occur? (without using fill commands polled every few seconds?).
If the data is manipulated directly in the database without the DS then there is no way this change can be pushed to the clients. Only option would be for the clients to poll the data on a regular interval. Other option that I can think of is to have an insert/update trigger on the table and as part of trigger management somehow notify DS service.
I’d highly recommend taking a look at the X2O Framework (www.x2oframework.com).
It’s a web-based data modeling platform that generates the server-side infrastructure (database, server-side, web services) as well as generated AS3 value objects. You don’t have to do any rpc or remoting integration. Instead, it lets you focus on Flex programming and have all your data management there.
I’d highly recommend taking a look at the X2O Framework (www.x2oframework.com).
It’s a web-based data modeling platform that generates the server-side infrastructure (database, server-side, web services) as well as generated AS3 value objects. You don’t have to do any rpc or remoting integration. Instead, it lets you focus on Flex programming and have all your data management there.
hi
Plz send me sample examples of database connectivity with oracle/db2 using flex>also send me the steps for connectivity and the required components like data service asap so that it will help me a lot
my email arathy@mediainteractive.in
hi
Plz send me sample examples of database connectivity with db2 using flex>also send me the steps for connectivity and the required components like data service asap so that it will help me a lot
my email arathy@mediainteractive.in
hi
Plz send me sample examples of database connectivity with oracle/db2 using flex>also send me the steps for connectivity and the required components like data service asap so that it will help me a lot
Why do you have to be like MAcGyver to get flex to do anything. You know Adobe better get this data connection thing user friendly or Silverlight will surpass them for these type of projects. I should be able to go to the “Choose Data Source” feature in Flex, choose my server and database then flex needs to create the needed classes to make this work. I shouldnt need to got to useless blog after another to onlt hit more dead ends.
How to connect to MS-SQL database and to retrive data ie a row and display it in the flex application please provide the code for the java dao and the flex part.
How to connect to MS-SQL database and to retrive data ie a row and display it in the flex application please provide the code for the java dao and the flex part.
hi
Plz send me sample examples of database connectivity with MYSQL using java flex builder 3 also send me the steps for connectivity and the required components like data service asap so that it will help me a lot
hi
Plz send me sample examples of database connectivity with MYSQL using java flex builder 3 also send me the steps for connectivity and the required components. hear attach my mail id : vimal071982@gmail.com
hey i hv planned to do a project whose front end is flex and back end ‘ll b database…..so u plzz xplain me clearly the connectivity and the drivers needed for it….
I love how your website is a great one stop shop for anyone looking for more information on this subject. All posts along with this one are perfectly written and are extremely informative to boot.
This internet site is amazing. I’m going to set this in the bookmarks prior to I misplace the url I don’t believe I’ll ever come across my way again in this article often.
As always, another great article. Checking your blog daily for the latest posts has become a routine for me now. I am practically addicted to your blog.
As always, another great article. Checking your blog daily for the latest posts has become a routine for me now. I am practically addicted to your blog.
My good friend recommend me looking your site How To Quit Smoking Why You Really Should Quit Smoking | How To Quit Smoking Review Stop Smoking Tips, in my opinion, it is very perfect! I’ll absorb it my personal favorites. Otherwise, I think you can place your own excellent article content to digg.com, this wil improve your sites flow.
In my opinion it is a truely good point of view. I meet individuals who rather say the things they suppose others want to hear. Good and well written! I’ll return to your site without a doubt!
I have study few of the articles on your blog these couple of days, and that i truly like your way of blogging. I bookmarked it to my top picks blog list and will be checking back soon. Pls visit my site too and tell me your opinion.
hey there and thank you for your information – I’ve definitely picked up anything new from right here. I did however expertise some technical issues using this web site, since I experienced to reload the web site lots of times previous to I could get it to load properly. I had been wondering if your web hosting is OK? Not that I’m complaining, but slow loading instances times will very frequently affect your placement in google and could damage your quality score if advertising and marketing with Adwords. Anyway I’m adding this RSS to my e-mail and can look out for a lot more of your respective interesting content. Ensure that you update this again soon..
Wow, unbelievable blog layout! How lengthy have you been blogging for? you made blogging appear simple. The general search of the web site is magnificent, and also the subject material!
Howdy man!
Great thing i found here, but still i have a question to shoot up, that is , Is that RPC and FDMS is applicable for only the falsh based web apps alone or for Flex AIR applications too…..Though the SQLite provides a convenient way of handling data in offline mode. But i want to make a centralized data provider for all the clients who’d have the AIR app in their system, And there should be an absence of the Server Scripts . .
Howdy man!
Great thing i found here, but still i have a question to shoot up, that is , Is that RPC and FDMS is applicable for only the falsh based web apps alone or for Flex AIR applications too…..Though the SQLite provides a convenient way of handling data in offline mode. But i want to make a centralized data provider for all the clients who’d have the AIR app in their system, And there should be an absence of the Server Scripts . .
Hope to get a quick response…Thanks in advance
The internet site provides you not just a chance to perform a lot of of the exciting totally free mahjongg but also obtain information about the sport. You can get a complete encyclopedia on the video game which would help you know about its historical past. You would also be acquainted with the principles and polices that would support you play the game properly. You can expect hours of frolic and entertaining whilst taking part in these game titles. Mahjongg Solitaire, Mahjongg Connect and Japanese Mahjongg are some of the most common mahjongg video games that are capable of trying to keep you totally engrossed and entertained.
[...] Questions About Enterprise Development Bruce Eckel :: Hybridizing Java Christophe Coenraets :: Building database-driven Flex applications without writing (Client- or server-side) code :: Introduces a SimpleJDBCAssembler FDMS adapter Christophe Coenraets :: Flex Test Drive Server for [...]
[...] Questions About Enterprise Development Bruce Eckel :: Hybridizing Java Christophe Coenraets :: Building database-driven Flex applications without writing (Client- or server-side) code :: Introduces a SimpleJDBCAssembler FDMS adapter Christophe Coenraets :: Flex Test Drive Server for [...]
[...] Coenraets :: Building database-driven Flex applications without writing (Client- or server-side) code :: Introduces a SimpleJDBCAssembler FDMS [...]
[...] Coenraets :: Building database-driven Flex applications without writing (Client- or server-side) code :: Introduces a SimpleJDBCAssembler FDMS [...]
[...] Coenraets :: Building database-driven Flex applications without writing (Client- or server-side) code :: Introduces a SimpleJDBCAssembler FDMS [...]
[...] Questions About Enterprise Development Bruce Eckel :: Hybridizing Java Christophe Coenraets :: Building database-driven Flex applications without writing (Client- or server-side) code :: Introduces a SimpleJDBCAssembler FDMS adapter Christophe Coenraets :: Flex Test Drive Server for [...]
[...] Application - riapedia.com Need a ColdFusion Based FLEX Application Example – mail-archive.com Building database-driven Flex applications without writing (Client- or server-side) code – coenraets.org FLEX Applications Showcase Gallery – flexexamples.blogspot.com Help with simple [...]
[...] – riapedia.com Need a ColdFusion Based FLEX Application Example – mail-archive.com Building database-driven Flex applications without writing (Client- or server-side) code – coenraets.org FLEX Applications Showcase Gallery – flexexamples.blogspot.com Help [...]
[...] – riapedia.com Need a ColdFusion Based FLEX Application Example – mail-archive.com Building database-driven Flex applications without writing (Client- or server-side) code – coenraets.org FLEX Applications Showcase Gallery – flexexamples.blogspot.com Help [...]
Yeah, right! But how can I “run” the flexdemo.script to create the needed tables?
Thanks!
You don’t have to run that script. flexdemo.script “is” the flexdemo database. That’s how HSQLDB stores a database.
Thanks, Christophe!
But I’m getting a SQL table not found exception. Here goes the stack trace:
java.sql.SQLException: Table not found in statement [SELECT * FROM product]
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source)
at org.hsqldb.jdbc.jdbcStatement.executeQuery(Unknown Source)
at flex.samples.assemblers.SimpleJDBCAssembler.fill(SimpleJDBCAssembler.
java:82)
at
I would appreciate if you can help me. Thanks again!
Beck,
In data-management-config.xml can you specify
jdbc:hsqldb:/jdbcassembler/db/flexdemo for the database URL? Let me know how that works.
Thanks,
Christophe
The same error, Christophe!
Here is my data-management-config.xml.
flex.samples.assemblers.SimpleJDBCAssembler
application
org.hsqldb.jdbcDriver
jdbc:hsqldb:/jdbcassembler/db/flexdemo
product
true
Did you unzip jdbcassembler in your root directory? Basically the jdbc URL is a path to your database (flexdemo.script). So jdbc:hsqldb:/jdbcassembler/db/flexdemo assumes that you have the fully populated flexdemo.script in:\jdbcassembler\db\flexdemo.
I too could not get the hsqldb going (I could if I used a absolute path eg: c:\…etc. So i ported it to MySQL. Anyone else doing this or planning to use this great assembler with MySQL a word of advice, I found a little got ya. When you specify the connection string in data-managent.config be sure to use & instead of & when specifying you url eg:
jdbc:mysql://localhost/flexdemo?user=flexdemo&password=flexdemo
instead of
jdbc:mysql://localhost/flexdemo?user=flexdemo&password=flexdemo
otherwise you will get a unfriendly message like:
Configuration error encountered on line 230, column 72: ‘The reference to entity “password” must end with the ‘;’ delimiter.’
if you don´t do this.
Cheers
dd
I’m a java convert from .Net….can I get the .java file for this demo?
Thanks for the great sample!!!
I really like your site, keep up the good work.
This is a wonderful blog I missed all these days.
Getting the same error as Beck above, and I have everything in the right directories (I think)
Hi Christophe,
the link below has a lot of good examples in flex 2 charts, i think but none of them work
http://weblogs.macromedia.com/flex_samples/charts_explorer/explorer.html
could you suggest a similar working site of flex 2 examples
regards
Arthur,
You’re right – these were working the last time I looked at them a few weeks ago…
Anyway, there is a different group of chart samples at http://www.quietlyscheming.com/blog/charts/chart-sampler/. Click the “Charting Sampler” link for the demos. You can check out the code for all of them as well.
Enjoy!
[RPC Fault faultString="No destination 'jdbc-product' exists in service flex.data.DataService" 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/NetConnectionChannel.as$33:NetConnectionMessageResponder::statusHandler()
at mx.messaging::MessageResponder/status()
Hi
Get the above error when I start the application
can you please help,I am new to this stuff
thanks
girish
Christophe – awesome example! I have replicated the product table in Oracle and tried to modify the data-management-config.xml but am getting Channel.Connect.Failure.
Attempting something like this:
flex.samples.assemblers.SimpleJDBCAssembler
application
oracle.jdbc.driver.OracleDriver
jdbc:oracle:thin:uid/pwd@myserver.domain.com:1526:schema
product
true
I’m I missing something? Can you post an example or point me to one?
Thanks!
hi..
i found ur sample interesting but can u revert me or post an sample program for connecting flex with oracle table as i am finding it very difficult to get the solution for this.
thanks
dinesh
hi!
How can I listener the message users are chatting?
I need to store then
its a good example. but could you help me with this exception that i get on load??
[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error undefined url:'rtmp://localhost:2037'"]
at mx.data::ConcreteDataService/http://www.adobe.com/2006/flex/mx/internal::dispatchFaultEvent()
at ::DataListRequestResponder/fault()
at mx.rpc::AsyncRequest/fault()
at mx.messaging::ChannelSet/::faultPendingSends()
at mx.messaging::ChannelSet/channelFaultHandler()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.messaging::Channel/mx.messaging:Channel::connectFailed()
at mx.messaging.channels::PollingChannel/mx.messaging.channels:PollingChannel::connectFailed()
at mx.messaging.channels::RTMPChannel/mx.messaging.channels:RTMPChannel::statusHandler()
Hi Christophe,
I stumbled upon this blog when I was trying to find a solution to an error i’m encountering while using FDS.
Basically i’m modifying the Contact Manager FDS sample to use a ready SQL database but just replacing the MSAccess database with SQL DB throws a wierd error.
I can get my ArrayCollection populated with data from the SQL server but each object is empty.
My Java wrapper lists all the objects correctly before passing to Flex but somewhere they just break and come in Flex as empty objects.
This only happens when using an SQL DB and not with an MS Access DB…everything else stays the same.
The exact error it throws is
The fill method with parameters ‘[Ljava.lang.Object;’ and destination ‘contacts’ returned null.
I would appreciate if you can help me. Thanks!
adf
Arunkumar…
I had the same problem. I solved it by creating the directory path exactly as specified: for example, mine is:
\fds2\jrun4\servers\default\samples\WEB-INF\classes\flex\samples\assemblers
(note that I needed to add a “flex” directory with “samples” and “assemblers” subdirectories)
After restarting the Integrated Flex Server, it worked.
Good luck!
Great example. What about creating an application that talks to a mysql database on a shared server web hosting plan?
Is there really that much code involved in writing a php script to modify and update tables?
First it worked fine and the for some unknown reason
I started to get an SQL table not found exception.
Any ideas, help, suggestions??
How to connect to MS-SQL database and to retrive data ie a row and display it in the flex application please provide the code for the java dao and the flex part.
I m new to flex
plz help me out!!!!
Hi
I am getting following error. I am using Mysql as database and Jrun as application server.
Could you please let me know How do I resolve these errors
[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error undefined url:'rtmp://localhost:2037'"]
at mx.data::ConcreteDataService/http://www.adobe.com/2006/flex/mx/internal::dispatchFaultEvent()
at ::DataListRequestResponder/fault()
at mx.rpc::AsyncRequest/fault()
at mx.messaging::ChannelSet/::faultPendingSends()
at mx.messaging::ChannelSet/channelFaultHandler()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.messaging::Channel/mx.messaging:Channel::connectFailed()
at mx.messaging.channels::PollingChannel/mx.messaging.channels:PollingChannel::connectFailed()
at mx.messaging.channels::RTMPChannel/mx.messaging.channels:RTMPChannel::statusHandler()
Hello! Good Site! Thanks you! jdrvqjjhrqtfrm
hi
Plz send me sample examples of database connectivity with oracle/db2 using flex>also send me the steps for connectivity and the required components like data service
my email
shrinivas.sontakke@gmail.com
Does anyone know a solution to Arunkumar or Vinay’s problem? I am also facing the same issue in tomcat.
Regards,
Karthik.
hi
Plz send me sample examples of database connectivity with oracle/db2 using flex>also send me the steps for connectivity and the required components like data service asap so that it will help me a lot
my email
anitha.govindaswamy@wipro.com
08/06 11:07:38 user MessageBrokerServlet: init
08/06 11:07:39 error Could not pre-load servlet: MessageBrokerServlet[1]flex.messaging.MessageException: Cannot create class of type ‘test.SampleServ
ice’. Type ‘test.SampleService’ not found.
at flex.messaging.util.ClassUtil.createClass(ClassUtil.java:57)
at flex.messaging.factories.JavaFactory$JavaFactoryInstance.getInstanceClass(JavaFactory.java:244)
at flex.messaging.factories.JavaFactory$JavaFactoryInstance.createInstance(JavaFactory.java:251)
at flex.messaging.factories.JavaFactory.createFactoryInstance(JavaFactory.java:93)
at flex.messaging.FactoryDestination.getFactoryInstance(FactoryDestination.java:76)
at flex.messaging.services.remoting.adapters.JavaAdapter.validateInstanceSettings(JavaAdapter.java:254)
at flex.messaging.services.remoting.adapters.JavaAdapter.initialize(JavaAdapter.java:99)
at flex.messaging.services.AbstractService.start(AbstractService.java:206)
at flex.messaging.MessageBroker.startServices(MessageBroker.java:503)
at flex.messaging.MessageBroker.start(MessageBroker.java:181)
at flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:107)
at jrun.servlet.WebApplicationService.loadServlet(WebApplicationService.java:1200)
at jrun.servlet.WebApplicationService.preloadServlets(WebApplicationService.java:791)
at jrun.servlet.WebApplicationService.postStart(WebApplicationService.java:293)
at jrun.deployment.DeployerService.initModules(DeployerService.java:711)
at jrun.deployment.DeployerService.createWatchedDeployment(DeployerService.java:242)
at jrun.deployment.DeployerService.deploy(DeployerService.java:430)
at jrun.deployment.DeployerService.checkWatchedDirectories(DeployerService.java:179)
at jrun.deployment.DeployerService.run(DeployerService.java:891)
at jrunx.scheduler.SchedulerService.invokeRunnable(SchedulerService.java:230)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
[0]flex.messaging.config.ConfigurationException: Error instantiating application scoped instance of type ‘test.SampleService’ for destination ‘sampleService’.
at flex.messaging.factories.JavaFactory.createFactoryInstance(JavaFactory.java:117)
at flex.messaging.FactoryDestination.getFactoryInstance(FactoryDestination.java:76)
at flex.messaging.services.remoting.adapters.JavaAdapter.validateInstanceSettings(JavaAdapter.java:254)
at flex.messaging.services.remoting.adapters.JavaAdapter.initialize(JavaAdapter.java:99)
at flex.messaging.services.AbstractService.start(AbstractService.java:206)
at flex.messaging.MessageBroker.startServices(MessageBroker.java:503)
at flex.messaging.MessageBroker.start(MessageBroker.java:181)
at flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:107)
at jrun.servlet.WebApplicationService.loadServlet(WebApplicationService.java:1200)
at jrun.servlet.WebApplicationService.preloadServlets(WebApplicationService.java:791)
at jrun.servlet.WebApplicationService.postStart(WebApplicationService.java:293)
at jrun.deployment.DeployerService.initModules(DeployerService.java:711)
at jrun.deployment.DeployerService.createWatchedDeployment(DeployerService.java:242)
at jrun.deployment.DeployerService.deploy(DeployerService.java:430)
at jrun.deployment.DeployerService.checkWatchedDirectories(DeployerService.java:179)
at jrun.deployment.DeployerService.run(DeployerService.java:891)
at jrunx.scheduler.SchedulerService.invokeRunnable(SchedulerService.java:230)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
08/06 11:07:39 user FlexSwfServlet: init
08/06 11:07:39 user FlexInternalServlet: init
Any solution for the above problems?
Iam facing this problem when i use RPC.
hi guys i am new i am using struts with flex i got same error as Arunkumar or Vinay’s problem? please help
Hi Guys there could anyone help us(Arunkumar, Vinay, Karthik and myself) with a solution to solve “Channel.Connect.Failed” error. I am working on a crucial prototyping with short deadline. Given below are the steps I have followed installing
1. Install WTP 1.5.3(Eclipse)
2. Install Flex Builder 2.0 Plugin
3. Install Flex Builder 2.0.1 Update
4. Install Flex Builder 2 Hotfix 2
5. Update Flex Builder with Hotfix 3
6. Install Peter Martin FDS Plugin
7. Configure WTP VM param
8. Installation of LCDS 2.5
8. Configure LCDS in WTP
9. Configure Tomcat in WTP
10. Create a sample LCDS Project
Your reply is most awaited !!!
Thanks in advance
David
Hi Guys there could anyone help us(Arunkumar, Vinay, Karthik and myself) with a solution to solve “Channel.Connect.Failed” error. I am working on a crucial prototyping with short deadline. Given below are the steps I have followed installing
1. Install WTP 1.5.3(Eclipse)
2. Install Flex Builder 2.0 Plugin
3. Install Flex Builder 2.0.1 Update
4. Install Flex Builder 2 Hotfix 2
5. Update Flex Builder with Hotfix 3
6. Install Peter Martin FDS Plugin
7. Configure WTP VM param
8. Installation of LCDS 2.5
8. Configure LCDS in WTP
9. Configure Tomcat in WTP
10. Create a sample LCDS Project
Your reply is most awaited !!!
Thanks in advance
David
david.wilfred@gft.com
I encountered the same error log while trying the same kind of sample app, to get rid of it, I just had to restart my jboss server.
I am just trying to work on a sample application using Eclipse,Flex Builder Plugin,LCDS 2.5 and Tomcat.
Can anyone provide a PDF or Link which can guide me through steps
David
david.wilfred@gft.com
I am just trying to work on a sample application using Eclipse,Flex Builder Plugin,LCDS 2.5 and Tomcat using MYSQL as database.
Can anyone provide a PDF or Link which can guide me through steps
David
david.wilfred@gft.com
Now that FDS have been rolled into LiveCycle Data Services, AND that AIR/Flex 3 is in beta, it would be great to have an update to this article/primer on db connectivity w/Flex. If a more current article exists, could someone point me to it?
thx
hi guys
i am getting the following error wen i invoke a java arraylist using ” mx:RemoteObject ” tag to dataProvider of datagrid in flex .
[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error undefined url:'rtmp://10.21.160.235:2037'"]
any sample examples for mx:RemoteObject is apreciated
u can reply to my email id
thanks
kandasami raja.c
kandaraja@gmail.com
Channel.Connect.Failed
I was getting this error, that was because I didn’t extract the .zip on c:\, then the database was on the wrong place.
If you see the data-management-config.xml in the database section we had the following line:
jdbc:hsqldb:/jdbcassembler/db/flexdemo
/jdbcassembler/db/flexdemo -> it’s the path to the database, and the base path is c:\ in windows (note that this path is NOT relative to the CONTEXT ROOT!!), you can adjust this to another directory if you wish.
I have also tested with the fds-tomcat instead of jrun4 sucessfully.
i am new user to the flex i want to know how to connect my application with the database with the help of java (j2ee) codding and i am not using the
i am not using the flex data service
i have the ibm web sphere application developer installed in my system, as well as flex also
please give me some solution to tackle with this issue
it gives an error jdbc-product must required a channel
do you know a good site that will have flex and sql server integration?
thanks
aleks
hiiii iam new to this flex.. and iam not able to under the above process said by “Christophe Coenraets”.. wht athis content-root refers to??
i want to connect to oracle database..
can any one xplain me clearly plzzzz
hi guys
i am getting the following error when i acces my application on live ip
[RPC Fault faultString=”Send failed” faultCode=”Client.Error.MessageSend” faultDetail=”Channel.Connect.Failed error undefined url:’rtmp://203.215.163.72:8080:2037′”]
while my application is working properly on LAN our internal loacal ips like 192.168.200.24 i can access that properly. Can any body tell my if there is any settings in XML or any secuirty policy
u can reply to my email id
zaffargachal@gmail.com
thanks
Zaffar ali
ya mm is hot aparently
y MUMS? COS THEY ROCK
Is there any “simple” way to get notified (and the clients updated) when the data changes in the datasource? Example: I have FLEX client app opened in 3 different machines. When data is changed in the (editable) datagrid, Livecycle DS takes care of updating the clients. Datasource is MS SQL server table. Now, if I change the data directly on that SQL table, nothing happens in the FLEX apps. This is important in environments where different technologies (not only Flex apps) interact with a data source. In my case we have a few different financial applications dealing with different sets of data. Any clue on how to deal with that? Updating the clients when changes in the SQL table occur? (without using fill commands polled every few seconds?).
Hi Fernando,
If the data is manipulated directly in the database without the DS then there is no way this change can be pushed to the clients. Only option would be for the clients to poll the data on a regular interval. Other option that I can think of is to have an insert/update trigger on the table and as part of trigger management somehow notify DS service.
Thanks,
Sanjib
Hi,
Will this tool serve the purpose of integrating the informix database with a Websphere Message broker and can function like JDBC adapter.
thanks.
hi we are planned to take seminar About the FLEx topic can you give the procedure to do the application(Sample Project) in Flex 3.0
Thanks ….
ThankS a lot
ThankS good
I’d highly recommend taking a look at the X2O Framework (www.x2oframework.com).
It’s a web-based data modeling platform that generates the server-side infrastructure (database, server-side, web services) as well as generated AS3 value objects. You don’t have to do any rpc or remoting integration. Instead, it lets you focus on Flex programming and have all your data management there.
I’d highly recommend taking a look at the X2O Framework (www.x2oframework.com).
It’s a web-based data modeling platform that generates the server-side infrastructure (database, server-side, web services) as well as generated AS3 value objects. You don’t have to do any rpc or remoting integration. Instead, it lets you focus on Flex programming and have all your data management there.
hi
Plz send me sample examples of database connectivity with oracle/db2 using flex>also send me the steps for connectivity and the required components like data service asap so that it will help me a lot
my email
arathy@mediainteractive.in
hi
Plz send me sample examples of database connectivity with db2 using flex>also send me the steps for connectivity and the required components like data service asap so that it will help me a lot
my email
arathy@mediainteractive.in
hi
Plz send me sample examples of database connectivity with oracle/db2 using flex>also send me the steps for connectivity and the required components like data service asap so that it will help me a lot
Why do you have to be like MAcGyver to get flex to do anything. You know Adobe better get this data connection thing user friendly or Silverlight will surpass them for these type of projects. I should be able to go to the “Choose Data Source” feature in Flex, choose my server and database then flex needs to create the needed classes to make this work. I shouldnt need to got to useless blog after another to onlt hit more dead ends.
How to connect to MS-SQL database and to retrive data ie a row and display it in the flex application please provide the code for the java dao and the flex part.
Is this database access solution working with Air?
How to connect to MS-SQL database and to retrive data ie a row and display it in the flex application please provide the code for the java dao and the flex part.
hi
Plz send me sample examples of database connectivity with MYSQL using java flex builder 3 also send me the steps for connectivity and the required components like data service asap so that it will help me a lot
hi
Plz send me sample examples of database connectivity with MYSQL using java flex builder 3 also send me the steps for connectivity and the required components. hear attach my mail id : vimal071982@gmail.com
how are you melisa
good demo admin..
mirc sohbet
thank you For admin…!
Thank for this nice informative article.
Well done and good luck with your very great work thanks
THANK YOUR
thanks for information
Flextrine is a Flex/PHP based ORM library that allows rapid developer of database enabled Flex apps (www.flextrine.com)
hey i hv planned to do a project whose front end is flex and back end ‘ll b database…..so u plzz xplain me clearly the connectivity and the drivers needed for it….
thanks you very godd admin
I love how your website is a great one stop shop for anyone looking for more information on this subject. All posts along with this one are perfectly written and are extremely informative to boot.
This internet site is amazing. I’m going to set this in the bookmarks prior to I misplace the url I don’t believe I’ll ever come across my way again in this article often.
As always, another great article. Checking your blog daily for the latest posts has become a routine for me now. I am practically addicted to your blog.
As always, another great article. Checking your blog daily for the latest posts has become a routine for me now. I am practically addicted to your blog.
My good friend recommend me looking your site How To Quit Smoking Why You Really Should Quit Smoking | How To Quit Smoking Review Stop Smoking Tips, in my opinion, it is very perfect! I’ll absorb it my personal favorites. Otherwise, I think you can place your own excellent article content to digg.com, this wil improve your sites flow.
In my opinion it is a truely good point of view. I meet individuals who rather say the things they suppose others want to hear. Good and well written! I’ll return to your site without a doubt!
I have study few of the articles on your blog these couple of days, and that i truly like your way of blogging. I bookmarked it to my top picks blog list and will be checking back soon. Pls visit my site too and tell me your opinion.
Hi ,
Please tell me how we can send flex datagrid data in DB2 data base file at clicking on save button through PHP/XML.
Please let me know as soon as posible
thanx in advance
vishal
Hi ,
Please tell me how we can send flex datagrid data in DB2 data base file at clicking on save button through PHP/XML.
Please let me know as soon as posible
thanx in advance
vishal
please mail me on vishalsharma21@rediffmail.com
visiting your site. It’s really a pleasure knowing a site like this packed with great information.Good bolg, thank you for sharing.
Nice template but audio started playing any time I opened up this website, so irritating!
Thank you for useful information. Waiting for new posts.
My cousin suggested this blog and she was completely correct maintain up the fantastic work.
wunderbare heren mit ssigern und igigenkna vertra, sehr hodeut und dichteiht. webereln schon stewe hat gezfo, vetriel und belybit mit rende.
Hi! Nice stuff, please inform me once you post again something like that!
Saolun Varolun Sizleride Bekleri
Bir Daha Adını Anmayacagım, Thanks you
thanks you admin eline saglık
hey there and thank you for your information – I’ve definitely picked up anything new from right here. I did however expertise some technical issues using this web site, since I experienced to reload the web site lots of times previous to I could get it to load properly. I had been wondering if your web hosting is OK? Not that I’m complaining, but slow loading instances times will very frequently affect your placement in google and could damage your quality score if advertising and marketing with Adwords. Anyway I’m adding this RSS to my e-mail and can look out for a lot more of your respective interesting content. Ensure that you update this again soon..
Wow, unbelievable blog layout! How lengthy have you been blogging for? you made blogging appear simple. The general search of the web site is magnificent, and also the subject material!
Howdy man!
Great thing i found here, but still i have a question to shoot up, that is , Is that RPC and FDMS is applicable for only the falsh based web apps alone or for Flex AIR applications too…..Though the SQLite provides a convenient way of handling data in offline mode. But i want to make a centralized data provider for all the clients who’d have the AIR app in their system, And there should be an absence of the Server Scripts . .
Howdy man!
Great thing i found here, but still i have a question to shoot up, that is , Is that RPC and FDMS is applicable for only the falsh based web apps alone or for Flex AIR applications too…..Though the SQLite provides a convenient way of handling data in offline mode. But i want to make a centralized data provider for all the clients who’d have the AIR app in their system, And there should be an absence of the Server Scripts . .
Hope to get a quick response…Thanks in advance
There are certainly a lot more details to take into consideration, but thanks for giving this info.
The internet site provides you not just a chance to perform a lot of of the exciting totally free mahjongg but also obtain information about the sport. You can get a complete encyclopedia on the video game which would help you know about its historical past. You would also be acquainted with the principles and polices that would support you play the game properly. You can expect hours of frolic and entertaining whilst taking part in these game titles. Mahjongg Solitaire, Mahjongg Connect and Japanese Mahjongg are some of the most common mahjongg video games that are capable of trying to keep you totally engrossed and entertained.
thanks you blog very good
thsnks you salla basını al ucuz mobilya yı
Dai Very significant article for us ,I think the representation of this article is actually superb one. This is my first visit to your site