New Adobe Article: Building your first data management application with ColdFusion and Flex

Flex 3 is now out and it's an exciting time to be a ColdFusion developer. In this article I walk you step by step to using Flex 3 with ColdFusion and the integrated LiveCycle Data Services. There is also a section about using the ColdFusion wizard to quickly build the backend ColdFusion CFC's to get you up and running.

LiveCycle Data Services gives you the ability to create robust applications with very little work, I encourage all ColdFusion developers to get familiar with this technology as it's a great tool on your development belt.
Hope you enjoy the article, and if you have any questions or problems feel free to drop a comment here.

View the Article Here!

Comments
Yves's Gravatar Hello Brian,

Thanks for the article, very informative !!

How about an example when the data in the grid comes from multiple tables !!

Most of the data I present in grids in my app comes from multiple tables since I defined a proper relational model in my db. So No_Customer is often replaced be the Customer name in grids which makes more sense for the users.

So it would be nice to have an example where you would display a list of orders in a grid where the customer name would replace the No_Customer but still the list would update automatically when another user creates a new order.

If you would have a pointer to such an example it would be appreciated !!

Thanks

Yves
# Posted By Yves | 2/29/08 5:00 PM
Al Fifhause's Gravatar I'm trying to work through your tutorial using flexbuilder3 beta 3, to an external server running CF8 with the built-in Livecycle ES data services, installed as a stand-alone on that computer (not "deployed to J2EE server". I cannot seem to get the ColdFusion Server configuration setting right. Nothing I've tried will validate. Can you send an example?
If it would help, I can send privately the link to the coldfusion server we are using.
Thanks.
# Posted By Al Fifhause | 3/3/08 3:36 PM
Gene Godsey's Gravatar Hey Brian,
The artical was really good.
I have tried to get the code to work but I am getting a multiple markers error in the MXML file.
"Multiple Markers at this line" private var dummy:ARTISTS = new ARTISTS();
-1046 Type was not found or was not a compile time constaint. ARTIST.
-1180 Call to possiblely undefined method ARTISTS.

I am trying desperately to figure out what is involved in getting Flex to communicate with a database. If I could get the I/O operations of how and what’s involved in making it talk I would be most appreciative. It unfortunately is not a server client technology like CF or Asp.Net. I really love this stuff but I need more info on the very thing you posted with your article.

Any URL or advice is very, very welcome.

Thanks for everything.

Gene
# Posted By Gene Godsey | 3/5/08 10:22 AM
Francesco's Gravatar Hi Brian very good article.

I tried it, but my firefox's window is blank!! Help!
# Posted By Francesco | 3/5/08 1:20 PM
Brian Szoszorek's Gravatar To Yves,

The way that the wizard works is based only on a single table. I wish myself it would let you define relationships and build the files accordingly. I use the wizard to get the basic code down, then I modify those files to fit the situation.
# Posted By Brian Szoszorek | 3/5/08 1:27 PM
Brian Szoszorek's Gravatar Al,

What step are you at with the remote server? Are you trying to setup an RDS connection to the remote server?
# Posted By Brian Szoszorek | 3/5/08 1:29 PM
Brian Szoszorek's Gravatar Gene,

This sounds like the compiler cannot find the ARTISTS class. You are using Flex 3 correct? Is com.adobe.devnet.example folder under the src folder in your project? Also make sure in ARTISTS.as that the package path is com.adobe.devnet.example.

Let me know what you find out :)
# Posted By Brian Szoszorek | 3/5/08 1:35 PM
Brian Szoszorek's Gravatar Francesco,

What is the URL that you are browsing to? And how do you have CF installed?
# Posted By Brian Szoszorek | 3/5/08 1:37 PM
David Fekke's Gravatar Brian,

I tried your example from the devnet article, but I am getting the following error on Flex builder;

channel not found for reference 'cf-rtmp' in destination 'artgallerydataservice'.

I went and uncommented the cf-rtmp channel in the services-config.xml file, restarted the ColdFusion server, and it still is giving me that error. I am pretty sure there is something not configured correctly, but I have no Idea where to start looking?

Thank you,
David Fekke.
# Posted By David Fekke | 3/5/08 2:56 PM
Brian Szoszorek's Gravatar David,

Can you email me your services-config and data-management-config so I can take a look? You are running only the internal LCDS installed with CF, and not a seperate install of LCDS correct?

And are you running CF standalone or multiserver?

Thanks,
Brian
# Posted By Brian Szoszorek | 3/5/08 3:04 PM
Al Fifhause's Gravatar Brian,
I believe I have RDS working. I can browse through tables and columns on a MS Sql Svr database on my server. I'm stuck on the "Configure ColdFusion Server" screen in the wizard.
It's a standalone ColdFusion server, running on Windows IIS. Nothing I enter into the ColdFusion root folder, Web root, and Root URL boxes will validate,
# Posted By Al Fifhause | 3/5/08 4:13 PM
Adrian's Gravatar Hello Brian,

I am also having some issues with trying to connect to either lcds or coldfusion:

"Unable to invoke CFC - Error invoking CFC fill operation:Could not find the ColdFusion Component or Interface com.adobe.devnet.example.ARTISTSDAO"

I noticed that Flex created a myProject-debug directory in the wwwroot folder of coldfusion. But the data-management-config.xml does have the folder stated anywhere in the code.

I was able to fix the rtmp error by uncommented the rtmp channel in the services-config.xml.

Hope this info helps you figure out our technical issues.

Thanks,

Adrian
# Posted By Adrian | 3/5/08 9:31 PM
Cody R.'s Gravatar Hi Brian,

Thanks for the article! I am also having problems, similar to David... I think. Below is a copy of the error I receive after trying to Run the mxml file.

[MessagingError message='Destination 'artgallerydataservice' either does not exist or the destination has no channels defined (and the application does not define any default channels.)']

I'm not running J2EE.. instead I have CF set up as a standalone server.
# Posted By Cody R. | 3/5/08 10:34 PM
Mack's Gravatar Hey Brian, Great article but I am getting the same error as David and Cody.
[MessagingError message='Destination 'artgallerydataservice' either does not exist or the destination has no channels defined (and the application does not define any default channels.)']
   at mx.messaging.config::ServerConfig$/internalGetChannelSet()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\config\ServerConfig.as:624]
   at mx.messaging.config::ServerConfig$/getChannelSet()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\config\ServerConfig.as:255]
   at mx.messaging::MessageAgent/initChannelSet()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\MessageAgent.as:1083]
   at mx.messaging::MessageAgent/internalSend()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\MessageAgent.as:1059]
   at














































mx.messaging::Producer/internalSend()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\Producer.as:143]
   at mx.messaging::AbstractProducer/connect()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\AbstractProducer.as:408]

I have a project comming up where I need to use fuctionality like this.

CF8 installed as StandAlone under IIS
FB3
FireFox
   at mx.data::DataStore/http://www.adobe.com/2006/flex/mx/internal::initia...()[C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\DataStore.as:2196]
   at mx.data::ConcreteDataService/fill()[C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\ConcreteDataService.as:895]
   at mx.data.mxml::DataService/fill()[C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\mxml\DataService.as:526]
   at LCD/fillArtistDP()[C:\WebContent\wwwroot\LCD\src\LCD.mxml:19]
# Posted By Mack | 3/8/08 5:14 AM
Keith Dodd's Gravatar Am getting same type of errors that others reporting. Am on IIS with stand alone cf. Uncommented the cf-rmpt in services-config.xml too.
Below is error message:

[RPC Fault faultString="Error invoking fill-method 'fill' for destination artgallerydataservice: Unable to invoke CFC - Error invoking CFC fill operation:Could not find the ColdFusion Component or Interface com.adobe.devnet.example.ARTISTSAssembler." faultCode="Server.Processing" faultDetail="null"]

Great tutorial and nice stuff about setting up for CF. All went fine until tried to use browser!

Keith
# Posted By Keith Dodd | 3/8/08 4:39 PM
bob avena's Gravatar Hello Brian:

thank you for the example.

i am having problems running it. I am running cf8 development version from localhost at 8500; i am windows xpsp3. PS i am definitely a novice on both Flex and CF8. any help would be appreciatedhere is the error message:

404
/myProject-debug/myProject.html


java.io.FileNotFoundException: /myProject-debug/myProject.html
   at jrun.servlet.file.FileServlet.service(FileServlet.java:349)
   at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
   at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
   at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:284)
   at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
   at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
   at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
   at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
   at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
   at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
# Posted By bob avena | 3/8/08 9:25 PM
Al Fifhause's Gravatar Hi Brian,
I've gotten up to the point where I think Gene is above, although my message is a little different. When I browse to myProject, I am now getting the following:

2 Errors found.

Error C:\Inetpub\wwwroot\myProject.mxml:10
Type was not found or was not a compile-time constant: ARTISTS.

9: //This dummy variable forces Flex Builder to include Artists object in build
10: private var dummy:ARTISTS = new ARTISTS();
11:

Error C:\Inetpub\wwwroot\myProject.mxml:10
Call to a possibly undefined method ARTISTS.

9: //This dummy variable forces Flex Builder to include Artists object in build
10: private var dummy:ARTISTS = new ARTISTS();
11:


Using your suggestion to Gene, I verified the location of com.adobe.devnet.example folder and I edited ARTISTS.as package path from src.com.adobe.devnet.example to com.adobe.devnet.example (removing the "src." from the beginning).

I still get the same error when I browse to the page.

Thanks for any help you can give. I really need to get the flex/cf data connection going.
# Posted By Al Fifhause | 3/12/08 7:27 PM
Brian Szoszorek's Gravatar Hey All,

1. If you installed CF8 in standalone, make sure to uncomment the cf-rtmp in the services-config.xml and restart ColdFusion.

2. When you generate the CFC’s and ActionScript files, the default path Flex Builder might display for both may be src.com.adobe.devnet.example, change this to com.adobe.devnet.example by removing “src.”before generating the files as in Figure #13 in the article.

3. Make sure that the com folder is under you webroot, not under myProject folder.



Hope this helps guys!

If after ensuring the above steps are correct and anyone is still getting an error, let me know and maybe we can all do a Connect meeting.
Regards,
Brian Szoszorek
# Posted By Brian Szoszorek | 3/17/08 10:59 AM
Keith Dodd's Gravatar I am set up with IIS. Are you saying in this that my com folder (with the adobe.devnet.example folders) should be right under Inetput/wwwroot/, regardless of where the myProject folder is? Am restarting from scratch and want to start correctly.

Thanks
# Posted By Keith Dodd | 3/17/08 11:28 AM
Brian Szoszorek's Gravatar Correct,

However if you wish to put the folder in another location, just remember to modify the data management config xml file to reflect this where it asks the path to the CFC. If you wanted to leave it in myProject folder under your webroot for example, then make sure the following code is a such.

<!-- The component name or path on the CF server -->
<component>myProject.com.adobe.devnet.example.ARTISTSAssembler</component>
# Posted By Brian Szoszorek | 3/17/08 12:07 PM
Keith Dodd's Gravatar Still getting error that can't find the assembler cfc.

I have structure of: inetpub/wwwroot/dmProject/ and put the com under that.
Changed the datamanagement config component to dmProject.com.adobe.devnet.example.ARTISTSAssembler

To test my set up, I wrote a cfm template to invoke the assmembler cfc:
<cfset myComp = CreateObject("component", "com.adobe.devnet.example.ARTISTSAssembler") />
It finds the assembler, but produces an error when the assmember tries to find the DAO. The only way I can get the fill method to work (running just in cfm) is to remove all com.adobe, etc stuff so the assember and dao just look for the component name (ie: ARTISTSDAO).

Not sure that's any insight, but ...

Keith
# Posted By Keith Dodd | 3/17/08 2:29 PM
wolf's Gravatar Hey Brian, do you ever do work for hire? I've got a project that I need some backend work done on. So many 'web programmers' are snake-oil - I want someone with your proven knowledge and experience. It's a great project I think you'd be really excited to be involved with.
# Posted By wolf | 3/18/08 2:18 PM
Mrs_kariem's Gravatar Hi
I Face the same error which is:

[MessagingError message='Destination 'artgallerydataservice' either does not exist or the destination has no channels defined (and the application does not define any default channels.)']
   at mx.messaging.config::ServerConfig$/internalGetChannelSet()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\config\ServerConfig.as:624]
   at mx.messaging.config::ServerConfig$/getChannelSet()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\config\ServerConfig.as:255]
   at mx.messaging::MessageAgent/initChannelSet()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\MessageAgent.as:1083]
   at mx.messaging::MessageAgent/internalSend()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\MessageAgent.as:1059]
   at mx.messaging::Producer/internalSend()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\Producer.as:143]
   at mx.messaging::AbstractProducer/connect()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\AbstractProducer.as:408]
   at mx.data::DataStore/http://www.adobe.com/2006/flex/mx/internal::initia...()[C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\DataStore.as:2196]
   at mx.data::ConcreteDataService/fill()[C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\ConcreteDataService.as:895]
   at mx.data.mxml::DataService/fill()[C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\mxml\DataService.as:526]
   at Tests/fillArtistDP()[C:\Documents and Settings\salsheeb\My Documents\Flex Builder 3\Tests\src\Tests.mxml:19]
   at Tests/___Tests_Application1_creationComplete()[C:\Documents and Settings\salsheeb\My Documents\Flex Builder 3\Tests\src\Tests.mxml:3]
   at flash.events::EventDispatcher/dispatchEventFunction()
   at flash.events::EventDispatcher/dispatchEvent()
   at mx.core::UIComponent/dispatchEvent()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:9051]
   at mx.core::UIComponent/set initialized()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:1167]
   at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:698]
   at Function/http://adobe.com/AS3/2006/builtin::apply()
   at mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8460]
   at mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8403]
I did all what you say step by step.

Maybe you typed something wrong or you miss something. Please Help me I need it urgent.

Thanks
# Posted By Mrs_kariem | 3/20/08 7:21 AM
Steven's Gravatar Hi Brian,

Your article is very detailed and great for a wanna be Coldfusion convert to Flex.
I am having a bit of trouble with the tutorial. I have followed your posts about this tutorial of yours which has helped me with some issues. I am having one last issue.
The application is comiling without errors now, but I get an empty datagrid when I run the app.
The debugger doesn't show any errors at all.
I followed your instructions carefully and can't seem to find the error of my ways.

I have CF with integrated LCDS ES setup on a linux box in a multi-instance mode.

Any help would be greatly appreciated.

Steven
# Posted By Steven | 3/24/08 3:07 AM
Steven's Gravatar Here's the error I get when I run the app:

[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error undefined url:'rtmp://10.100.0.210:2048'"]
   at mx.data::ConcreteDataService/http://www.adobe.com/2006/flex/mx/internal::dispat...()
   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::tempStatusHandler()

Thanks for any help!
# Posted By Steven | 3/24/08 10:59 PM
Mrs_kariem's Gravatar Hey Brian,

Every time I get a different error. Once the File Not Found, twice the "artgalleryservice" destination is not exists or no channels defined, third error invoking fill-method 'fill' for destination artgallerydataservice......

Please help me I need it urgent. My last error is "The File is not found", it doesn't generate html
file in the server. Please Help me
# Posted By Mrs_kariem | 3/25/08 7:00 AM
Brian Szoszorek's Gravatar Steven,

Can you check your CF admin logs after running the example and see if there are any CF app errors logged? Let me know what you find...

Brian
# Posted By Brian Szoszorek | 3/26/08 4:02 PM
Brian Szoszorek's Gravatar Mrs_kariem,

Can you tell me a little more about your setup (CF standalone or multiserver, OS, and webserver)?

Brian
# Posted By Brian Szoszorek | 3/26/08 4:05 PM
Shaishav's Gravatar Hey Brian,

Please can you advice how can we fetch Paged data using Flex, Cold Fusion 8 & LCDS. Please can you site some example.

Cheers,
Shaishav
# Posted By Shaishav | 3/28/08 10:37 AM
kron's Gravatar hello brain,
I met a problem similar to David Fekke,I am getting the following error on Flex builder;

channel not found for reference 'cf-rtmp' in destination 'artgallerydataservice'.

I don't know how to slove it ,can you tell me ?

thank you
kron
# Posted By kron | 4/8/08 8:58 PM
Sam Juvonen's Gravatar I am running CF on an IIS server. It seems that in order to get this to work, I need to copy the com\adobe\devnet\example\*.cfc folder structure and files into jrun4\servers\cfusion\cfusion-ear\cfusion-war. It seems that the RTMP channel is configured to use port 2048 on my server and only looks in the cfusion-war folder for the cfcs. I would like to learn if it is possible to deploy just to IIS as the example describes.
# Posted By Sam Juvonen | 4/9/08 8:36 AM
Sam Juvonen's Gravatar The population of the data grid works according to my previous post, however editing cells does not. Attempts to edit result in the error
Error: Unknown Property: 'constructor'.
   at mx.collections::ListCollectionView/http://www.adobe.com/2006/actionscript/flash/proxy...()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\collections\ListCollectionView.as:692]
   at mx.data::Conflict()[C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\Conflict.as:82]
   at mx.data::DataStore/http://www.adobe.com/2006/flex/mx/internal::proces...()[C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\DataStore.as:2292]
   at mx.data::CommitResponder/result()[C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\CommitResponder.as:363]
   at mx.rpc::AsyncRequest/acknowledge()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:74]
   at NetConnectionMessageResponder/resultHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\channels\NetConnectionChannel.as:469]
   at mx.messaging::MessageResponder/result()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\MessageResponder.as:199]


Any thoughts on this ?
# Posted By Sam Juvonen | 4/9/08 8:40 AM
Tim Whitbeck's Gravatar hi Brian,

I'm not familiar with Coldfusion at all, but thanks to your tutorial I've gotten this much to work.

Now I'd like to be able to add a new record to the database. I have a table with 3 fields, and I have 3 corresponding text entry ui elements with a button that runs a function createAndAdd(). This fills the dummy object we created with the contents of the text entry elements and tries to run

DataService.createItem(dummy);

But when I try to run this, I get this error:

[RPC Fault faultString="Error during create: Error Executing Database Query." faultCode="null" faultDetail="null"]

My question is: after having followed your tutorial, is the "create" function in the DAO.cfc able to add records to the database. If so, how. If not, how do we change it to make it do that. Thanks!!!!
# Posted By Tim Whitbeck | 4/9/08 4:02 PM
brian's Gravatar Changing the services-config.xml got me past the channel not found for reference 'cf-rtmp' in destination 'artgallerydataservice' error, but now I'm getting:

Encountered errors or warnings while building project lounge.mxml.
lounge.mxml: Definition mx.data:IManaged could not be found.
lounge.mxml: Definition mx.data.utils:Managed could not be found.
lounge.mxml: Definition mx.data:IManaged could not be found.
lounge.mxml: Definition mx.data.utils:Managed could not be found.

Heeeelllllllllllllllllllllllpppppppppppppppppp!!!!!!!!!!!!
# Posted By brian | 4/10/08 9:09 AM
Gary Funk's Gravatar I was getting the "Error invoking fill-method 'fill' for destination" until I added a mapping for the com directory.
# Posted By Gary Funk | 4/11/08 12:15 AM
Jeff Self's Gravatar @Gary,
What exactly did you add to your mapping?
# Posted By Jeff Self | 4/22/08 1:20 PM
Jeff Self's Gravatar @Gary,
I figured it out.

Wow! Flex has some possibilities here!
# Posted By Jeff Self | 4/22/08 1:24 PM
Brian Szoszorek's Gravatar Hey All,

There is an update to the Adobe article that will help clear some things up. I found out from Adobe that they commented out the RTMP channel as customers were having issues with their corporate firewall. The alternative is to use the CF-AMF-Polling. This will all be explained in the update to the article coming in the next week or so. It will also cover adding mappings if you want to store your com folder in a different location.

Thanks
# Posted By Brian Szoszorek | 4/22/08 5:03 PM
Brian Szoszorek's Gravatar To Sam,

Try adding a mapping in the CF admin that points to your com folder under the IIS website. That should do the trick.
# Posted By Brian Szoszorek | 4/22/08 5:07 PM
Brian Szoszorek's Gravatar To Brian:

"Changing the services-config.xml got me past the channel not found for reference 'cf-rtmp' in destination 'artgallerydataservice' error, but now I'm getting:

Encountered errors or warnings while building project lounge.mxml.
lounge.mxml: Definition mx.data:IManaged could not be found.
lounge.mxml: Definition mx.data.utils:Managed could not be found.
lounge.mxml: Definition mx.data:IManaged could not be found.
lounge.mxml: Definition mx.data.utils:Managed could not be found."

Looks like you may be missing the fds_rb.swc file in your library path. Check and see if you have that or the fds.swc in your library path.
# Posted By Brian Szoszorek | 4/22/08 5:12 PM
Brian Szoszorek's Gravatar To TIM:

"DataService.createItem(dummy);

But when I try to run this, I get this error:

[RPC Fault faultString="Error during create: Error Executing Database Query." faultCode="null" faultDetail="null"]"

Tim, I would need to know a little more. Are you creating a brand new instance called dummy in this case and trying to commit that back to the DataService. It looks like your commit is making it to the create in the DAO, however there is an SQL error happening. In my experience I always end up editing the DAO as you will get errors like this sometimes.

Remember, the wizzard gets the base code down for you to save some time but you may still need to make some tweaks depending on your situation.

Please let me know if you have any other trouble :)
# Posted By Brian Szoszorek | 4/22/08 5:17 PM
Stphn's Gravatar What mapping should be used (and why?) I'm getting the "Error invoking fill-method 'fill' for destination.... etc" error.... I'm using the standalone installation of CF8 with an Apache webroot in /Library/Apache/ & a Flex project folder in /Users/err/Adobe/Flex/myProject (if any of that helps - i don't use default folder locations too often and sometimes this causes an extra learning experience....) thanks!
# Posted By Stphn | 4/24/08 2:18 PM
Brian Sadler's Gravatar For those having problems with "Definition mx.data:IManaged could not be found" have a look at
http://accidentalpatterns.blogspot.com/2008/04/fle... - it worked for me!
# Posted By Brian Sadler | 5/3/08 11:03 AM
nickelstar's Gravatar I was able to work around the "Could not find the ColdFusion Component or Interface com.adobe.devnet.example.ARTISTSAssembler" error by moving the com folder to the
wwwroot of the coldfusion server.
# Posted By nickelstar | 5/13/08 8:47 PM
Marc Truitt's Gravatar Hello Brian,

This is a very nice article, I got everything working, and took the next step trying to connect to another database. I tried connecting to the ‘Northwind’ database, I even got that working sort of, it return the data but when it does an update I get a strange error message, when I run your project I don’t get the error message and updates work fine. The table I am connecting to is the ‘Customers’ table in the ‘Northwind’ database. I have searched online and can’t find any other resources related to LCDS errors have you seen any errors like this before. We like using LCDS but if we can’t get it working with a simple database it is going to be a hard sell to management. Any ideas would be appreciated, thanks.

Error

Error: Unknown Property: 'constructor'.
   at mx.collections::ListCollectionView/http://www.adobe.com/2006/actionscript/flash/proxy...()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\collections\ListCollectionView.as:692]
   at mx.data::Conflict()[C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\Conflict.as:82]
   at mx.data::DataStore/http://www.adobe.com/2006/flex/mx/internal::proces...()[C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\DataStore.as:2292]
   at mx.data::CommitResponder/result()[C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\CommitResponder.as:363]
   at mx.rpc::AsyncRequest/acknowledge()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:74]
   at NetConnectionMessageResponder/resultHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\channels\NetConnectionChannel.as:469]
   at mx.messaging::MessageResponder/result()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\MessageResponder.as:199]



Marc Truitt
# Posted By Marc Truitt | 5/16/08 12:56 PM
Jeremy Severson's Gravatar Found your article very helpful, but I have tried it many times and in different ways but everytime I get to the end and test the app I get an error outputted to me from flash,

[RPC Fault faultString="No destination with id 'artgallerydataservice' is registered with any service." faultCode="Server.Processing" faultDetail="null"] at mx.data::ConcreteDataService/http://www.adobe.com/2006/flex/mx/internal::dispat...()[C:\depot\flex\branches\enterprise_bridgeman_final_hotfixes\frameworks\mx\data\ConcreteDataService.as:2112] at DataListRequestResponder/fault()[C:\depot\flex\branches\enterprise_bridgeman_final_hotfixes\frameworks\mx\data\ConcreteDataService.as:5986] at mx.rpc::AsyncRequest/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:103] at NetConnectionMessageResponder/statusHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\channels\NetConnectionChannel.as:523] at mx.messaging::MessageResponder/status()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\MessageResponder.as:222]
# Posted By Jeremy Severson | 5/21/08 11:43 AM
Steve Carson's Gravatar Jeremy,
I believe I got the message you refer to before I stopped and then restarted the server. I guess the data service is not registered till rebooted.

Marc,
I got the same message you get when trying to connect to a different database. However when looking further I noticed that I can also get the same error if you try to edit records
7, 11,13,14 and 15 in the Artists example application. Anybody else get the same 'Unknown Property 'contructor' error on those records? I don't see any odvious data differences in these records.


I was able to get the example app to work
# Posted By Steve Carson | 5/21/08 5:51 PM
Polykrom's Gravatar The population of the data grid works according to my previous post, however editing cells does not. Attempts to edit result in the error
Error: Unknown Property: 'constructor'.
at mx.collections::ListCollectionView/http://www.adobe.com/2006/actionscript/flash/proxy......()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\collections\ListCollectionView.as:692]
at mx.data::Conflict()[C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\Conflict.as:82]
at mx.data::DataStore/http://www.adobe.com/2006/flex/mx/internal::proces......()[C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\DataStore.as:2292]
at mx.data::CommitResponder/result()[C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\CommitResponder.as:363]
at mx.rpc::AsyncRequest/acknowledge()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:74]
at NetConnectionMessageResponder/resultHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\channels\NetConnectionChannel.as:469]
at mx.messaging::MessageResponder/result()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\MessageResponder.as:199]


Any thoughts on this ?
# Posted By Polykrom | 5/22/08 12:30 PM
Francois's Gravatar I don't get any response about the 'constructor' error on some fields (as mention previously), but now i have another problem, i try the example with my own MySql DB, the application launch without any errors, but my datagrid is totally empty !!
Is it Coldfusion or LCDS related or either flex.. don't know, i have no trace :(
LCDS seems to be a fantastic tool but if we get errors on errors, i'll let it to other ;)

thx

Francois
# Posted By Francois | 6/2/08 7:13 AM
Francois's Gravatar Now it works with my Mysql DB (don't understand why) but when i try to update a field i have the following error message :

[RPC Fault faultString="Error during update: The OLDBEAN argument passed to the update function is not of type com.immovillages.lc.test.users." faultCode="null" faultDetail="null"]
   at mx.data::ConcreteDataService/http://www.adobe.com/2006/flex/mx/internal::dispat...()[C:\depot\flex\branches\enterprise_bridgeman_final_hotfixes\frameworks\mx\data\ConcreteDataService.as:2112]
   at mx.data::CommitResponder/sendCommitEvent()[C:\depot\flex\branches\enterprise_bridgeman_final_hotfixes\frameworks\mx\data\CommitResponder.as:697]
   at mx.data::CommitResponder/sendEvents()[C:\depot\flex\branches\enterprise_bridgeman_final_hotfixes\frameworks\mx\data\CommitResponder.as:682]
   at mx.data::CommitResponder/dispatchFaultEvents()[C:\depot\flex\branches\enterprise_bridgeman_final_hotfixes\frameworks\mx\data\CommitResponder.as:505]
   at mx.data::CommitResponder/result()[C:\depot\flex\branches\enterprise_bridgeman_final_hotfixes\frameworks\mx\data\CommitResponder.as:417]
   at mx.rpc::AsyncRequest/acknowledge()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:74]
   at NetConnectionMessageResponder/resultHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\channels\NetConnectionChannel.as:469]
   at mx.messaging::MessageResponder/result()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\MessageResponder.as:199]

it seems that's a type conflict... but why ??

thx
# Posted By Francois | 6/2/08 8:31 AM
Francois's Gravatar now it works, and another one, i don't know why, but i still get the
Unknown Property: 'constructor'.
at mx.collections::ListCollectionView/http://www.adobe.com/2006/actionscript/flash/proxy.........()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\collections\ListCollectionView.as:692]
at mx.data::Conflict()[C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\Conflict.as:82]
at mx.data::DataStore/http://www.adobe.com/2006/flex/mx/internal::proces.........()[C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\DataStore.as:2292]
at mx.data::CommitResponder/result()[C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\CommitResponder.as:363]
at mx.rpc::AsyncRequest/acknowledge()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:74]
at NetConnectionMessageResponder/resultHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\channels\NetConnectionChannel.as:469]
at mx.messaging::MessageResponder/result()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\MessageResponder.as:199

error message... it seems that it's a bug coming from Coldfusion or Mysql : http://bugs.adobe.com/jira/browse/SDK-14661 ...
if it's a bug ,it's unbelievable !!

regards
# Posted By Francois | 6/2/08 3:19 PM
Amer's Gravatar Hi,
I have tried doing this, and I got the data showing up in the grid. The only problem I'm faced with is getting this error when trying to update something in the grid. Also the data doesnt update when something is updated in the DB. so in short the data push is not happening. and I get this error:

[RPC Fault faultString="Error during update: The cause of this output exception was that: java.lang.NullPointerException." faultCode="null" faultDetail="null"]
   at mx.data::ConcreteDataService/http://www.adobe.com/2006/flex/mx/internal::dispat...()[C:\depot\flex\branches\enterprise_corfu_b2\frameworks\projects\data\src\mx\data\ConcreteDataService.as:2401]
   at mx.data::CommitResponder/sendCommitEvent()[C:\depot\flex\branches\enterprise_corfu_b2\frameworks\projects\data\src\mx\data\CommitResponder.as:713]
   at mx.data::CommitResponder/sendEvents()[C:\depot\flex\branches\enterprise_corfu_b2\frameworks\projects\data\src\mx\data\CommitResponder.as:698]
   at mx.data::CommitResponder/dispatchFaultEvents()[C:\depot\flex\branches\enterprise_corfu_b2\frameworks\projects\data\src\mx\data\CommitResponder.as:511]
   at mx.data::CommitResponder/result()[C:\depot\flex\branches\enterprise_corfu_b2\frameworks\projects\data\src\mx\data\CommitResponder.as:423]
   at mx.rpc::AsyncRequest/acknowledge()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:74]
   at NetConnectionMessageResponder/resultHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\channels\NetConnectionChannel.as:469]
   at mx.messaging::MessageResponder/result()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\MessageResponder.as:199]

I arrived to this after so much work:
I did many steps just to get it to compile in flex
I had to install lifecycle ds 2.6 beta 2 (rather than using the integrated version) then copy fds.swc to the flex sdk lib directory and the local directory. I also needed to create a mapping for my package and uncommented the rtmp channel in the services-config.xml file and all that got me through many issues but still in the end it was not updating(java lang null pointer error when trying to update data in the grid)

any suggestions would really be nice to make it work!
# Posted By Amer | 6/23/08 9:54 PM
mary's Gravatar I don't get any response about the 'constructor' error on some fields (as mention previously), but now i have another problem, i try the example http://www.nakliyatfirmalari.org with my own MySql DB, the application launch without any errors, but my datagrid is totally empty !!
Is it Coldfusion or LCDS related or either flex.. don't know, i have no trace :(
# Posted By mary | 6/26/08 4:53 PM
Amer's Gravatar Hi Brian, I finally got this to work, I was trying it with my own table, the table had many data types etc, and I needed to do some manual work, so I just created a simple table and it worked. But I have one question, with this exmple only the changes that are done through the flex app/flash app is pushed but not the changes that are done by other apps. do you know if it is possible to develop data push directly from the databse using dataservice ? so if i go to the table in the database and change a record it would get pushed to the flex data grid.. I thought it is possible, is it?
cheers
Amer
# Posted By Amer | 6/26/08 10:20 PM
# Posted By asdfsdf | 8/9/08 9:04 AM
Brian Szoszorek's Gravatar Hi Amer,

I'm not sure off hand if for example, some process updates a record in the DB, that you then inform LiveCycle to refresh the fills in some way.

This may not be the best idea, but remember using the gateways, we can do publish/subscribe messaging between CF and Flex. So you could create a CF web service to called maybe UserRecordUpdated(). We write as a web service so other technologies can use it that might be interacting with the same data.

So if your [other process here] changes a record, then then call the userRecordUpdate() on the web service. The CF web service method using the flex event gateway would broadcast a message to subscribing Flex applications telling them of the event. Now you could call a refresh on your dataservice thus getting you all latest data.

Actually for performance you web service should be given a record ID, this you can pass along to the Flex app the exact record that changed. Then do a getItem() on your dataservice and only get that one record that changed.

There probably is a better way to do this, but off the top of my head you could try this.

-Brian
# Posted By Brian Szoszorek | 8/13/08 3:07 PM
Brian Szoszorek's Gravatar To Francois:

This can mean a couple things. is the class com.immovillages.lc.test.users in you Flex application. Meaning do you see an import statement. If not do this, private var _test:MyClass = new MyClass;

See, you can get back typed objects from CF and display them in a grid. Lets say the returning object type is User. Here is the thing, if your Flex application does not have the actionscript equivalent of the User class compiled it the swf. Flex will view these return objects as generic objects.

So, since Flex views your User object now as a Generic object. When you make a change to a record in the grid and Flex sends an object down to CF, its sending a generic object, NOT and User object. Thus CF throws an error, because you not passing a proper object. It will fail on create operations as well.

If you noted in the code from the article you will see this in the code:
//This dummy variable forces Flex Builder to include Artists object in build
         private var dummy:ARTISTS = new ARTISTS();


Hope this helps.
# Posted By Brian Szoszorek | 8/13/08 3:19 PM
# Posted By asdf | 8/16/08 1:01 AM
Amer's Gravatar Thanks Brian, I found a chat example similar to your idea, I hope it will be useful for you and the readers of your blog.It is using a messaging event gateway.
http://www.onflexwithcf.org/index.cfm/2007/8/2/Col...
cheers
# Posted By Amer | 8/17/08 7:59 PM
Iamlo's Gravatar Debt educational nursing program reduction, air force nurse transition program, nursing school test bank questions, Lpn program and pennsylvania 2008 Enroll in one of Columbia College's Evening Campus degree programs - Nursing Degree ... be able to leave with a degree in Business Administration and very little student debt
http://richardpaige.seitenclique.net/nursing9255.h...
http://gitertt.sitebooth.com/nursing9026.html
http://gitertt.fizwig.com/nursing3699.html
http://gitertt.1stfreehosting.com/nursing398.html
http://beverlyjenkins.domaingler.com/nursing5997.h...
http://gitertt.my3gb.com/nursing8331.html
http://cherylcutting.gigazu.com/nursing5293.html
# Posted By Iamlo | 8/24/08 4:46 PM