>> GreenByte.info By Nick Tong (quiksilv) | Supported by: TalkWebSolutions.co.uk

Errors in Flex communication with coldfusion

So i've had a bad 24 hours. I've had my server go down and I can't get flex to work on my local machine. I've been fighting trying to get it to work so I can take advantage of Brian Rinaldis Code Generator. It all started when i got an error saying:

Send failed
Client.Error.MessageSend
Fault occurred in GetTemplateCommand

Hmm, well that doesn't really help. I did a bit of searching and found a hint in some comments on boyzoid from Bruce that suggested that

the Flex2Gateway to work correctly in CF the Java VM (virtual machine) must be higher then 1.4.2_05.

So of i went to update my JVM here (link found here)

I followed the tech note which informed me:

ColdFusion MX 7.0.2, JRun 4 Updater 6 have been certified for JVM 1.4.2_11.

I then followed the TechNote 2d547983 for more information on how to switch ColdFusion/JRun to use the new JVM. It tells me that I need to change the path to the JVM to the new downloaded JVM:
C:/j2sdk1.4.2_11/jre -
This can be found in c:\jrun\bin\jvm.config | note the forward slashes!

I then did a couple of reboots and checked to see that my JVM file had been updated (http://localhost/CFIDE/administrator/reports/index.cfm)

This looked great - i started the cfcGenerator and i didn't get the error mentioned above... I got his one instead:

could not find coldfusion component

Now I know that I have the correct mappings because I can run the pages directly and the test page runs fine: http://cfcgenerator/com/cf/model/test.cfm

A bit more searching and I can see from a comment by Timothy Rubel on a post at Ben Fortas blog, that I might need to update JRun. I do this and reboot. Again no joy.

A bit more searching and I see that Flex binds on port 1099, and this is hard coded so sadly this can't be changed. I then see if anything else is bound to this port and notice that jrun is also running on this port, thanks to Sarge for his post.

I then think I might try changing my server identity in the administrator (I'm willing to try anything at this point) and click update..., bang! I then get this error

Error attempting to update settings:
Unable to register Flex Assembler Service in RMI registry: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: java.net.MalformedURLException: no protocol: of.

So more searching... and this is starting to really bug me now, and I find that it's a known issue with Adobe

Summary
I did all the above change and still i can't get the damn thing to work.

Does anyone have any suggestions?


 
Comments
Dan Lancelot's Gravatar I feel your pain m8 - I spent 2 hours last night getting the flexgateway working - as posted:
http://www.danlance.co.uk/index.cfm/2007/3/27/Page...
Within your \WEB-INF\flex\services-config.xml file, find the following line:

<use-mappings>false</use-mappings>

And set this to true.

It sounds from your description that flexgateway cannot find the CFC rather than the flexgateway its self is not working.

Let me know if that fixes things ;)
# Posted By Dan Lancelot | 27/03/07 11:36 | Report abusive comment
nick tong's Gravatar Dan, thats it! You're a life saver. Thats a beer I owe you at Scotch!
# Posted By nick tong | 27/03/07 11:44 | Report abusive comment
DataNotion's Gravatar For those looking around for another solution as well:

http://groups.google.com/group/cfcgenerator/t/50ca...

Thanks
-pat
www.datanotion.com
# Posted By DataNotion | 29/10/07 23:23 | Report abusive comment
BlogCFC was created by Raymond Camden. This blog is running version 5.5.1.