Skip navigation
Currently Being Moderated

faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed

Mar 8, 2010 1:55 AM

I've installed the turnkey installation of blazeds.

I've started the sampledb, started the tomcat server, chosen the correct configs in my flex client application.

I made a simple javaclass "MyTestClass" with a getString method and put it in [turnkeyinstallationfolder]/tomcat/webapps/samples/WEB-INF/classes/fl ex/samples

I configured a destination in the remoting-config.xml of the samples with source flex.samples.MyTestClass.

When I run my flex client application I always get this error message: (below is the code of my java class, flex air client app and the remoting-config.xml)


error message
[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: 'http://lazeTestRemoting.swf/samples/messagebroker/amf'"]
    at mx.rpc::AbstractInvoker/[E:\dev\gumbo_beta2\frameworks\projects\rpc\src\mx\rpc\AbstractInvok]
    at mx.rpc::Responder/fault()[E:\dev\gumbo_beta2\frameworks\projects\rpc\ src\mx\rpc\]
    at mx.rpc::AsyncRequest/fault()[E:\dev\gumbo_beta2\frameworks\projects\r pc\src\mx\rpc\]
    at mx.messaging::ChannelSet/faultPendingSends()[E:\dev\gumbo_beta2\frame works\projects\rpc\src\mx\messaging\]
    at mx.messaging::ChannelSet/channelFaultHandler()[E:\dev\gumbo_beta2\fra meworks\projects\rpc\src\mx\messaging\]
    at mx.messaging::Channel/connectFailed()[E:\dev\gumbo_beta2\frameworks\p rojects\rpc\src\mx\messaging\]
    at mx.messaging.channels::PollingChannel/connectFailed()[E:\dev\gumbo_be ta2\frameworks\projects\rpc\src\mx\messaging\channels\PollingChannel.a s:406]
    at mx.messaging.channels::AMFChannel/statusHandler()[E:\dev\gumbo_beta2\ frameworks\projects\rpc\src\mx\messaging\channels\]
java class
public class MyTestClass {
    public MyTestClass(){}

    public String getString()
        return "test";

flex app
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx=""
        <!-- Place non-visual elements (e.g., services, value objects) here -->
        <s:RemoteObject id="myService" destination="testbestemming"/>
    <s:Label text="{myService.getString()}"/>


<?xml version="1.0" encoding="UTF-8"?>
<service id="remoting-service"

        <adapter-definition id="java-object" class="" default="true"/>

        <channel ref="my-amf"/>

    <destination id="product">

    <destination id="chat-room-service">

    <destination id="census">

    <destination id="flex-client-qos-config" channels="per-client-qos-polling-amf">
    <destination id="testbestemming">

  • Currently Being Moderated
    Jul 21, 2010 3:46 AM   in reply to ee88

    i have problem same to you.


    Did you fix that?


    Could you explain to me how to resolve that problem?




    Mark as:
  • Currently Being Moderated
    Oct 25, 2010 12:18 AM   in reply to phamquochiep

    Same problem here...anyone get to the bottom of it?

    Mark as:
  • Currently Being Moderated
    Jan 18, 2011 6:19 PM   in reply to ee88

    I'm having the same issue. Is there a resolution?  Pls help! thx

    Mark as:
  • Currently Being Moderated
    Jan 19, 2011 8:12 AM   in reply to davidabrooks

    You need to make sure you are running the SWF file that is served up from the application server via HTTP.  Often times the connect will fail because the channel defined in the services-config.xml (in the case "my-amf") has the {} and {server.port} tokens in it and when you run the SWF from the file system the Flash player does not have a server name (or port) to fill in to the channel URL.  so the connection fails.


    Hope that helps.

    Mark as:
  • Currently Being Moderated
    Jan 19, 2011 12:26 PM   in reply to tomj

    Thank you for replying!


    I believe I am running the correct SWF file because in the fault detail the tokens are replaced with what seems like correct values. This is what I see in the debugger:


    Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 404: url: 'http://localhost:8080/web/messagebroker/amf'


    Or perhaps this isn't the best way to test/confirm your suggestion?

    Mark as:
  • Currently Being Moderated
    Jan 19, 2011 2:24 PM   in reply to davidabrooks

    You are correct about the tokens. The tokens wouldn't resolve if the swf was being run from the file system. A 404 is a page not found error. What do you get if you paste the url http://localhost:8080/web/messagebroker/amf into your web browser? You should get an empty/blank page and not a 404. If you're getting a 404 it's possible the message broker didn't start up successfully. If that's the case, you should see an error in the server console output or the server log. Also confirm that the port number is correct. Hope that helps.



    Mark as:
  • Currently Being Moderated
    Jan 19, 2011 5:07 PM   in reply to Alex Glosband

    I've resolved my issue. Perhaps you are correct that my tokens were not resolving, but since you did not offer a way to fix that, I was still on my own. There was nothing helpful that I could find in the console or log.


    I found this article, and after using his architecture (using an external config file to define the amf endpoint at runtime) I was able to connect to the back end. I was also looking for a good way to externalize information, so I recommend reading this article:


    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points