Monday, October 6, 2008

http://localhost:8080/WebContent/messagebroker/amf


[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 404: url: 'http://localhost:8080/WebContent/messagebroker/amf'"]
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[E:\dev\3.1.0\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:218]
at mx.rpc::Responder/fault()[E:\dev\3.1.0\frameworks\projects\rpc\src\mx\rpc\Responder.as:53]
at mx.rpc::AsyncRequest/fault()[E:\dev\3.1.0\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:103]
at mx.messaging::ChannelSet/faultPendingSends()[E:\dev\3.1.0\frameworks\projects\rpc\src\mx\messaging\ChannelSet.as:1482]
at mx.messaging::ChannelSet/channelFaultHandler()[E:\dev\3.1.0\frameworks\projects\rpc\src\mx\messaging\ChannelSet.as:975]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.messaging::Channel/connectFailed()[E:\dev\3.1.0\frameworks\projects\rpc\src\mx\messaging\Channel.as:997]
at mx.messaging.channels::PollingChannel/connectFailed()[E:\dev\3.1.0\frameworks\projects\rpc\src\mx\messaging\channels\PollingChannel.as:354]
at mx.messaging.channels::AMFChannel/statusHandler()[E:\dev\3.1.0\frameworks\projects\rpc\src\mx\messaging\channels\AMFChannel.as:390]


Solution:

To resolve, change the serverContextRoot to point to your Project name instead of WebContent folder.

Here how it is done in .flexProperties file created by eclipse

serverContextRoot="/WebContent"

change this to

serverContextRoot="/your project name"

10 comments:

Unknown said...

Thanks man. I would kiss you for this. I struggled so hard. Ur a genius.

Shankar said...

Thanks

Bitsqueezer said...

Thanks for the tip, this helped me to solve the problem.

To be more detailed it is not the project name in all cases, it is the name of the setting "Context Root" in the project properties in the property "Web Project Settings". Normally the default is that this is identical to the project name but if you changed this during project setup to be different, this must be chosen here.

Cheers,

Christian

Gemas de Uruguay said...

Thanks man. I've been struggling with this error for the whole day. You were my salvation :)

holla2040 said...

Thanks. This helped.

Unknown said...

thank you so much for this post man, you have saved my life :) and possibly many others lives :D

Keep it up~

Unknown said...

Beauty.. Keep it up..

Miguel said...

i have this same error but i dont see this file in my project. what is the exact name of this file?

Justin Daily said...

I've tried this fix, by changing the serverContextRoot property in the .flexProperties file for my project, but when I re-open the project, it gets overwritten back to the old values. Is there another way to change this setting?

chandanpandey05 said...

I ran into same issue and although serverContextRoot was pointing to correct context .. follwoign was issue
--By default <\servlet-class\>flex.messaging.MessageBrokerServlet\<\/servlet-class\> is declared with <\load-on-startup\>1<\/load-on-startup\>.
In my case i had changed <\load-on-startup\>1<\/load-on-startup\> to some other servlet ..and ran in this issue ..Conclusion <\load-on-startup\>1<\/load-on-startup\> MUST be used with <\servlet-class\>flex.messaging.MessageBrokerServlet<\/servlet-class\> It's NOT OPTIONAL