Skip to main content
Participant
July 1, 2009
Question

Flex Remote Object Problems

  • July 1, 2009
  • 1 reply
  • 4707 views

Probably a typical question for this section. I am going to give a ton of details, just so people can see where I may have gone wrong in this process:

Error

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

This is what I get on my local machine compiles, and on my live server (which is bad practice, but I wanted to test it). I'll start with the local problems, because I know more details.

/Applications/JRun4/servers/cfusion/cfusion-ear/cfusion-war/ is where I understand the cfusion server to be located.

I have become quite used to opening up the services-config.xml file, but to no avail. I use fcsh to compile (no flex builder), so I attempt to add the services-config as an external service by entering: mxmlc -services=/Applications/JRun4/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/flex/servics-config.xml

When I attempt to add it I get the following error.

...

Loading configuration file /Applications/flex_sdk_3/frameworks/flex-config.xml
Error: The services configuration includes a channel-definition 'my-cfamf-secure' that has an endpoint with a context.root token but a context root has not been defined. Please specify a context-root compiler argument.

flex.messaging.config.ConfigurationException: The services configuration includes a channel-definition 'my-cfamf-secure' that has an endpoint with a context.root token but a context root has not been defined. Please specify a context-root compiler argument.
        at flex.messaging.config.ChannelSettings.parseClientUri(ChannelSettings.java:171)
        at flex.messaging.config.ChannelSettings.getClientParsedUri(ChannelSettings.java:130)
        at flex.messaging.config.ServicesDependencies.codegenXmlInit(ServicesDependencies.java:492)
        at flex.messaging.config.ServicesDependencies.<init>(ServicesDependencies.java:67)
        at flex2.compiler.common.CompilerConfiguration.getServicesDependencies(CompilerConfiguration.java:1247)
        at flex2.tools.Compiler.calculateServicesChecksum(Compiler.java:733)
        at flex2.tools.Compiler.processConfiguration(Compiler.java:670)
        at flex2.tools.Compiler.processConfiguration(Compiler.java:526)
        at flex2.tools.SimpleShell.mxmlc(SimpleShell.java:799)
        at flex2.tools.SimpleShell.process(SimpleShell.java:129)
        at flex2.tools.SimpleShell.main(SimpleShell.java:75)

...

My context root is specified as the default "/" When I remove the context root variable from the services-config.xml, it can't find the file. I don't know where I can change context root, but I am confused as to what it should be, regardless.

I run a MAMP server on the computer, but I have been attempting to identify the problem by doing standalone flex compiles, and not involving server paths, but sticking instead with local paths, still problematic.

The most confusing thing is that compiled older flex applications on my hostmysite hosting account work fine with <mx:RemoteObject destination="ColdFusion"..., if I use the exact same destination (and source) field, when I add a new swf to the server, it has trouble connecting with the CFC's, while at the same time, the original file can connect fine. I just started the maintenance on this application, so there could be a few overhead details I am unaware of.

Attached is my flex file that gets the error, and my services-config.xml file, zipped.

This topic has been closed for replies.

1 reply

Muzak
Inspiring
July 1, 2009
My context root is specified as the default "/" When I remove the context root variable from the services-config.xml, it can't find the file. I don't know where I can change context root, but I am confused as to what it should be, regardless.

Add the -context-root to the compiler options, just like -services and set it to an empty string

-services="/Applications/JRun4/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/f lex/servics-config.xml" -context-root=""