第一次按照例子做的FLEX DEMO ,出现如下错误 ,在此记录一下:
[FaultEvent fault=[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'"] messageId="C25D6E12-4A22-9827-849A-C56BBBB434F4" type="fault" bubbles=false cancelable=true eventPhase=2]
解决方法:
在
<mx:RemoteObject id="firstRO" destination="FirstJavaClassRemoteObject" fault="faultEvent(event)" [color=red][b]endpoint="http://localhost:8080/FlexDemo/messagebroker/amf"[/b][/color]/>
此处一定要有endpoint的属性,后面的值可参照上面的错误的URL,但要将其WebContent 改为你的项目名称.也就是Context root
然后右击你的项目名称--->Properties--->Flex Server-->Context root设置好为FlexDemo
然后重启TOMCAT即可..
[FaultEvent fault=[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'"] messageId="C25D6E12-4A22-9827-849A-C56BBBB434F4" type="fault" bubbles=false cancelable=true eventPhase=2]
解决方法:
在
<mx:RemoteObject id="firstRO" destination="FirstJavaClassRemoteObject" fault="faultEvent(event)" [color=red][b]endpoint="http://localhost:8080/FlexDemo/messagebroker/amf"[/b][/color]/>
此处一定要有endpoint的属性,后面的值可参照上面的错误的URL,但要将其WebContent 改为你的项目名称.也就是Context root
然后右击你的项目名称--->Properties--->Flex Server-->Context root设置好为FlexDemo
然后重启TOMCAT即可..