faultDetail = "Channel.Connect.Failed error NetConnection.Call.Failed:

480 views
Skip to first unread message

neeru

unread,
Jan 3, 2009, 6:58:55 AM1/3/09
to Flex India Community
Hai to all,

I have developed an application using hibernate,springs,flex in flex
builder for eclipse plug-in.

And my code in the main application is as given below.....

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" >
<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
import mx.controls.Alert;
import mx.collections.ArrayCollection;
import mx.rpc.events.FaultEvent;
import mx.controls.Alert;
import mx.utils.ObjectUtil;
import mx.messaging.channels.AMFChannel;
import mx.messaging.ChannelSet;
import mx.rpc.events.FaultEvent;
import mx.rpc.remoting.RemoteObject;

private function handleResult(e:ResultEvent):void {
monthlyPayment.text = e.result as String;
}

// Handle a message fault.
private function handleFault(event:FaultEvent):void {
Alert.show(ObjectUtil.toString(event.fault));
}

]]>
</mx:Script>
<mx:ChannelSet id="cset">
<mx:channels>
<mx:AMFChannel id="myamf" uri="http://localhost:8080/WebContent/
messagebroker/amf"/>
</mx:channels>
</mx:ChannelSet>

<mx:RemoteObject id="ro" destination="mortgageService"
channelSet="{cset}" result="handleResult(event)" fault="handleFault
(event)"/>

<mx:TextInput id="amount"/>
<mx:Button label="Calculate" click="ro.calculate(Number
(amount.text))"/>
<mx:TextInput id="monthlyPayment" text="{ro.calculate.lastResult}"/>

</mx:Application>


And in applicationcontext.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"
default-lazy-init="true">

<bean id="rateFinderBean"
class="flex.samples.spring.mortgage.SimpleRateFinder"/>

<bean id="mortgageBean"
class="flex.samples.spring.mortgage.Mortgage">
<property name="rateFinder" ref="rateFinderBean"/>
</bean>

</beans>


So when i run the application and when i click the button it is giving
the following exception


(mx.rpc::Fault)#0
content = (Object)#1
errorID = 0
faultCode = "Client.Error.MessageSend"
faultDetail = "Channel.Connect.Failed error
NetConnection.Call.Failed: HTTP: Status 404: url: 'http://localhost:
8080/WebContent/messagebroker/amf'"
faultString = "Send failed"
message = "faultCode:Client.Error.MessageSend faultString:'Send
failed' faultDetail:'Channel.Connect.Failed error
NetConnection.Call.Failed: HTTP: Status 404: url: 'http://localhost:
8080/WebContent/messagebroker/amf''"
name = "Error"
rootCause = (mx.messaging.events::ChannelFaultEvent)#2
bubbles = false
cancelable = false
channel = (mx.messaging.channels::AMFChannel)#3
authenticated = false
channelSets = (Array)#4
[0] (mx.messaging::ChannelSet)#5
authenticated = false
channelIds = (Array)#6
[0] "my-amf"
channels = (Array)#7
[0] (mx.messaging.channels::AMFChannel)#3
clustered = false
connected = false
currentChannel = (mx.messaging.channels::AMFChannel)#3
initialDestinationId = (null)
messageAgents = (Array)#8
[0] (mx.rpc::AsyncReq

........
I am unable solve this problem .
Please help me in this.


Thanking you ,

Cindy

unread,
Feb 18, 2009, 8:28:27 AM2/18/09
to Flex India Community
Hi!!


i have the same error with messageBroker,"Error 404 The requested URL /
hotelex/messagebroker/amf was not found on this server. "


i run a remote debug with flex 3 and have this error:
Channel.Connect.Failed error NetConnection.Call.Failed:,

the application work fine in localhost.

Root URL http://localhost:8080/hotelexOnline
Context root /hotelexOnline


my web.xml

<servlet-mapping>
<servlet-name>MessageBrokerServlet</servlet-name>
<url-pattern>/messagebroker/*</url-pattern>
</servlet-mapping>


really i need help , Thanks
>        xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-2.0.xsd"

Akhil Agrawal

unread,
Feb 24, 2009, 1:57:24 AM2/24/09
to Flex India Community
i have the same problem plz give any solution
> xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-2.0.xsd"

Vishwanath

unread,
Mar 13, 2009, 10:42:43 AM3/13/09
to Flex India Community
Hi All,

Please give solution for this issue, even me facing the same issue
for long time and looking for the solution in couple of forums... but
no luck....
I am using Flex SDK 3, BlazeDS, Tomcat 6.

Please Please respond to this!!!!!!!!
> >        xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework..."
> > Thanking you ,- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages