Expand my Community achievements bar.

RemoteObject 404 error

Avatar

Former Community Member
Hi All,



I am trying to get the mx:RemoteObject functionality to work,
and I am getting the following error on the client:



[RPC Fault faultString="Send failed"
faultCode="Client.Error.MessageSend"
faultDetail="Channel.Connect.Failed error
NetConnection.Call.Failed: HTTP: Status 404"]

at mx.rpc::AbstractInvoker/
http://www.adobe.com/2006/flex/mx/internal::faultHandler()

at mx.rpc::Responder/fault()

at mx.rpc::AsyncRequest/fault()

at mx.messaging::ChannelSet/::faultPendingSends()

at mx.messaging::ChannelSet/channelFaultHandler()

at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at
mx.messaging::Channel/mx.messaging:Channel::connectFailed()

at
mx.messaging.channels::PollingChannel/mx.messaging.channels:PollingChannel::connectFailed()

at
mx.messaging.channels::AMFChannel/mx.messaging.channels:AMFChannel::statusHandler()



On the sever log all I am getting is:



14/08 15:02:45 error Requested resource '/messagebroker/amf'
(%2fmessagebroker%2famf) not found



The full error log is:



D:\fds2\jrun4\bin>jrun start default

Starting Macromedia JRun 4.0 (Build 106363), default server

Flex OEM License for JRun enabled

14/08 15:11:49 warning Unable to open
D:\fds2\jrun4/lib/license.properties

14/08 15:11:50 info JRun Naming Service listening on *:2907

14/08 15:11:50 info No JDBC data sources have been configured
for this server (see jrun-resources.xml)

14/08 15:11:50 info JRun Web Server listening on *:8700

14/08 15:11:50 info Deploying web application "Flex Default
Web Application" from: file:/D:/fds2/jrun4/servers/default/d

efault-war/

14/08 15:11:50 user JSPServlet: init

14/08 15:11:50 info Deploying web application "Flex Data
Services" from: file:/D:/fds2/jrun4/servers/default/flex/

14/08 15:11:50 user JSPServlet: init

14/08 15:11:51 user FlexMxmlServlet: init

14/08 15:11:51 INFO Loading configuration file
D:\fds2\jrun4\servers\default\flex\WEB-INF\flex\flex-webtier-config.xml

14/08 15:11:51 INFO Loading configuration file
D:\fds2\jrun4\servers\default\flex\WEB-INF\flex\flex-config.xml

14/08 15:11:52 user FlexMxmlServlet: Starting Adobe Flex Web
Tier Compiler

14/08 15:11:52 user FlexMxmlServlet: Adobe Flex Web Tier
Compiler Build: 143451

14/08 15:11:52 user MessageBrokerServlet: init

[Flex] [INFO] [Configuration] Starting Adobe Flex Data
Services 2 Express

[Flex] [INFO] [Configuration] Adobe Flex Data Services Build:
143451

[Flex] [INFO] [Configuration] Endpoint my-amf created with
security: None

at URI:
http://{server.name}:{server.port}/{context.root}/messagebroker/amf

[Flex] [INFO] [Configuration] Endpoint my-polling-amf created
with security: None

at URI:
http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling

[Flex] [INFO] [Configuration] Endpoint my-http created with
security: None

at URI:
http://{server.name}:{server.port}/{context.root}/messagebroker/http

[Flex] [INFO] [Configuration] Endpoint my-secure-amf created
with security: None

at URI:
https://{server.name}:9100/{context.root}/messagebroker/amfsecure

[Flex] [INFO] [Configuration] Endpoint my-rtmp created with
security: None

at URI: rtmp://{server.name}:2038

[Flex] [INFO] [Configuration] Endpoint my-secure-http created
with security: None

at URI:
https://{server.name}:9100/{context.root}/messagebroker/httpsecure

14/08 15:11:52 user FlexSwfServlet: init

[Flex] [INFO] [Endpoint.RTMP] RTMP-Server listening on
port:2038

14/08 15:11:52 user FlexInternalServlet: init

14/08 15:11:52 info Deploying web application "Flex Admin Web
Application" from: file:/D:/fds2/jrun4/servers/default/fle

x-admin/

14/08 15:11:52 user JSPServlet: init

14/08 15:11:52 user MessageBrokerServlet: init

14/08 15:11:53 info Deploying web application "Flex Data
Services Samples" from: file:/D:/fds2/jrun4/servers/default/sam

ples/

14/08 15:11:53 user JSPServlet: init

14/08 15:11:53 user FlexMxmlServlet: init

14/08 15:11:53 INFO Loading configuration file
D:\fds2\jrun4\servers\default\samples\WEB-INF\flex\flex-webtier-config.xm

l

14/08 15:11:53 INFO Loading configuration file
D:\fds2\jrun4\servers\default\samples\WEB-INF\flex\flex-config.xml

14/08 15:11:53 user FlexMxmlServlet: Starting Adobe Flex Web
Tier Compiler

14/08 15:11:53 user FlexMxmlServlet: Adobe Flex Web Tier
Compiler Build: 143451

14/08 15:11:53 user MessageBrokerServlet: init

14/08 15:11:54 user FlexSwfServlet: init

14/08 15:11:54 user FlexInternalServlet: init

14/08 15:11:54 info Deploying enterprise application "JRun
4.0 Internal J2EE Components" from: file:/D:/fds2/jrun4/lib/j

run-comp.ear

14/08 15:11:54 info Deploying EJB "JRunSQLInvoker" from:
file:/D:/fds2/jrun4/lib/jrun-comp.ear

Server default ready (startup time: 6 seconds)

14/08 15:12:29 user FileServlet: init

14/08 15:12:29 user FileServlet: init

14/08 15:12:29 error Requested resource '/messagebroker/amf'
(%2fmessagebroker%2famf) not found





The example code is trivial and uses the sample services:



<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"


layout="absolute"

creationComplete="myService.getSandwitchList();">



<mx:RemoteObject

id="myService"

destination="simpleService"/>



<mx:DataGrid x="319" y="403"

dataProvider="{myService.getSandwichList.lastResult}">

</mx:DataGrid>



</mx:Application>
3 Replies

Avatar

Level 1
Have you setup the destination object in the flex config
files? You specify a remote object and tell it a destination, but
without specifying the destination of simpleService in the Flex
config, Flex does not know where to go for it. Thats my
understanding of it anyway.

Avatar

Level 3
Hi

By looking at your serverlog and error message, server didn't
know the url. I think you know the problem too, since you
particularly pointed out that in your server log

14/08 15:02:45 error Requested resource '/messagebroker/amf'
(%2fmessagebroker%2famf) not found

However, I can see the server reporting the available channel
in default web app

[Flex] [INFO] [Configuration] Endpoint my-amf created with
security: None

at URI:
http://{server.name}:{server.port}/{context.root}/messagebroker/amf

Not sure your default web's context root is '/' , or did you
change it? Also please check your servlet mapping in your web.xml
is

/messagebroker/*



Thanks!

William









Avatar

Former Community Member
Hi All,



thanks for the replies.



I have found a solution moving by Flex Data Services project
to compile on the server, somehow I must have configured the
project incorrectly.



regards Malcolm Edgar